SettingWindow.xaml.cs 691 B

12345678910111213141516171819202122232425262728
  1. using AIDiagnosisDemo.ViewModel;
  2. using System.Windows;
  3. namespace AIDiagnosisDemo.Presentation
  4. {
  5. /// <summary>
  6. /// SettingWindow.xaml 的交互逻辑
  7. /// </summary>
  8. public partial class SettingWindow : Window
  9. {
  10. private SettingPageViewModel _settingPageViewModel;
  11. public SettingWindow()
  12. {
  13. InitializeComponent();
  14. _settingPageViewModel = new SettingPageViewModel();
  15. DataContext = _settingPageViewModel;
  16. }
  17. private void OnSaveAndExit(object sender, RoutedEventArgs e)
  18. {
  19. if (_settingPageViewModel.Save())
  20. {
  21. Close();
  22. }
  23. }
  24. }
  25. }