WinModeCheck.xaml.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.ComponentModel;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Windows;
  8. using Microsoft.Win32;
  9. using SAGA.DotNetUtils;
  10. using SAGA.DotNetUtils.Extend;
  11. using System.Windows.Forms;
  12. using System.Windows.Threading;
  13. namespace Saga.PlugIn.ModelCheck
  14. {
  15. /// <summary>
  16. /// WinModeCheckSetting.xaml 的交互逻辑
  17. /// </summary>
  18. public partial class WinModeCheck
  19. {
  20. public WinModeCheck(VMModelCheck viewmodel)
  21. {
  22. InitializeComponent();
  23. this.DataContext = viewmodel;
  24. }
  25. #region BindingProperty
  26. #endregion
  27. #region Action
  28. private void ButtonNext_OnClick(object sender, RoutedEventArgs e)
  29. {
  30. this.DialogResult = true;
  31. }
  32. #endregion
  33. private void SelectFile_OnClick(object sender, RoutedEventArgs e)
  34. {
  35. FolderBrowserDialog dialog = new FolderBrowserDialog();
  36. dialog.Description = "请选择文件路径";
  37. if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  38. {
  39. txtPath.Text = dialog.SelectedPath;
  40. }
  41. }
  42. }
  43. }