Interaction logic for ClientEditorWindow.xaml
Inheritance: MahApps.Metro.Controls.MetroWindow
コード例 #1
0
ファイル: MainViewModel.cs プロジェクト: Irdis/VSTalk
 private void AddNewAccountExecuted()
 {
     var clientVM = new ClientEditorViewModel();
     var clientWindow = new ClientEditorWindow();
     clientWindow.DataContext = clientVM;
     clientVM.Saved += clientWindow.Close;
     clientVM.Rejected += clientWindow.Close;
     clientWindow.Show();
 }
コード例 #2
0
 private void EditClientExecuted(Client client)
 {
     var clientVM = new ClientEditorViewModel(SelectedClient);
     var clientWindow = new ClientEditorWindow();
     var onClose = new Action(() =>
     {
         clientWindow.Close();
         clientVM.StopListen();
     });
     clientWindow.DataContext = clientVM;
     clientVM.Rejected += onClose;
     clientVM.Saved += onClose;
     clientWindow.Show();
 }