コード例 #1
0
        private void NewBtn_Click(object sender, RoutedEventArgs e)
        {
            EditingWindow newWindow = new EditingWindow();

            newWindow.DataContext = new EditingWindowViewModel(Mediator.Instance);
            newWindow.ShowDialog();
        }
コード例 #2
0
        private void EditBtn_Click(object sender, RoutedEventArgs e)
        {
            MainWindowViewModel viewModel  = (MainWindowViewModel)DataContext;
            EditingWindow       editWindow = new EditingWindow();

            editWindow.DataContext = new EditingWindowViewModel(viewModel.CurrentUser.Clone(), Mediator.Instance);
            editWindow.ShowDialog();
        }