Пример #1
0
 private void buttonAdd_Click(object sender, RoutedEventArgs e)
 {
     AddEditHeadWindow headWindow = new AddEditHeadWindow { Owner = Window.GetWindow(this) };
     headWindow.Closed += (sndr, handler) => _vm.Reset();
     headWindow.SetOperationType(OperationType.Add);
     headWindow.ShowDialog();
 }
Пример #2
0
        internal void buttonAdd_Click(object sender, RoutedEventArgs e)
        {
            AddEditHeadWindow headWindow = new AddEditHeadWindow {
                Owner = Window.GetWindow(this)
            };

            headWindow.Closed += (sndr, handler) => _vm.Reset();
            headWindow.SetOperationType(OperationType.Add);
            headWindow.ShowDialog();
        }
Пример #3
0
 private void buttonView_Click(object sender, RoutedEventArgs e)
 {
     Head head = _vm.SelectedGridItem;
     if (head != null)
     {
         AddEditHeadWindow headWindow = new AddEditHeadWindow(head) { Owner = Window.GetWindow(this) };
         headWindow.Closed += (sndr, handler) => _vm.Reset();
         headWindow.SetOperationType(OperationType.Update);
         headWindow.ShowDialog();
     }
     else MessageBox.Show("No head is selected.");
 }
Пример #4
0
        private void buttonView_Click(object sender, RoutedEventArgs e)
        {
            Head head = _vm.SelectedGridItem;

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