Пример #1
0
        private void EditScreensExecute(object sender, ExecutedRoutedEventArgs e)
        {
            ScreenAdder   EWV = new ScreenAdder();
            WellViewModel wm;

            if (TheTabs.SelectedIndex == 0)
            {
                wm = List.SelectedItem as WellViewModel;
            }
            else
            {
                wm = ListWells.SelectedItem as WellViewModel;
            }

            if (wm != null)
            {
                ScreenAdderViewModel sc = new ScreenAdderViewModel(wm);

                EWV.DataContext = sc;
                EWV.ShowDialog();
            }
            e.Handled = true;
        }
Пример #2
0
    private void EditScreensExecute(object sender, ExecutedRoutedEventArgs e)
    {
      ScreenAdder EWV = new ScreenAdder();
      WellViewModel wm;

      if (TheTabs.SelectedIndex == 0)
        wm = List.SelectedItem as WellViewModel;
      else
        wm = ListWells.SelectedItem as WellViewModel;

      if (wm != null)
      {
        ScreenAdderViewModel sc =new ScreenAdderViewModel(wm);

        EWV.DataContext = sc;
        EWV.ShowDialog();
      }
      e.Handled = true;
    }