private void buttonAdd_Click(object sender, RoutedEventArgs e)
 {
     AddEditProjectWindow projectWindow = new AddEditProjectWindow { Owner = Window.GetWindow(this) };
     projectWindow.Closed += (sndr, eventArgs) => _vm.Reset();
     projectWindow.SetOperationType(OperationType.Add);
     projectWindow.ShowDialog();
 }
Beispiel #2
0
        internal void buttonAdd_Click(object sender, RoutedEventArgs e)
        {
            AddEditProjectWindow projectWindow = new AddEditProjectWindow {
                Owner = Window.GetWindow(this)
            };

            projectWindow.Closed += (sndr, eventArgs) => _vm.Reset();
            projectWindow.SetOperationType(OperationType.Add);
            projectWindow.ShowDialog();
        }
 private void buttonView_Click(object sender, RoutedEventArgs e)
 {
     Project project = _vm.SelectedGridItem;
     if (project != null)
     {
         AddEditProjectWindow projectWindow = new AddEditProjectWindow(project) { Owner = Window.GetWindow(this) };
         projectWindow.Closed += (sndr, eventArgs) => _vm.Reset();
         projectWindow.SetOperationType(OperationType.Update);
         projectWindow.ShowDialog();
     }
     else MessageBox.Show("No project is selected.");
 }
Beispiel #4
0
        private void buttonView_Click(object sender, RoutedEventArgs e)
        {
            Project project = _vm.SelectedGridItem;

            if (project != null)
            {
                AddEditProjectWindow projectWindow = new AddEditProjectWindow(project)
                {
                    Owner = Window.GetWindow(this)
                };
                projectWindow.Closed += (sndr, eventArgs) => _vm.Reset();
                projectWindow.SetOperationType(OperationType.Update);
                projectWindow.ShowDialog();
            }
            else
            {
                MessageBox.Show("No project is selected.");
            }
        }