SshHandlerSettings.xaml.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // SSH Handler Settings
  2. //
  3. // Douglas Thrift
  4. //
  5. // SshHandlerSettings.xaml.cs
  6. /* Copyright 2014 Douglas Thrift
  7. *
  8. * Licensed under the Apache License, Version 2.0 (the "License");
  9. * you may not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. */
  20. using System.Diagnostics;
  21. using System.Reflection;
  22. using System.Windows;
  23. public partial class SshHandlerSettings : Window
  24. {
  25. public SshHandlerSettings()
  26. {
  27. InitializeComponent();
  28. }
  29. private void OkButton_Click(object sender, RoutedEventArgs e)
  30. {
  31. Apply();
  32. DialogResult = true;
  33. }
  34. private void ApplyButton_Click(object sender, RoutedEventArgs e)
  35. {
  36. Apply();
  37. }
  38. private void Apply()
  39. {
  40. string program = Assembly.GetEntryAssembly().Location;
  41. string[] arguments = { "/openssh", "/bash" };
  42. Debug.WriteLine("\"{0}\" {1} \"%1\"", program, string.Join(" ", arguments));
  43. }
  44. }