Example #1
0
 private void AddDetailToMachineButton_Click(object sender, RoutedEventArgs e)
 {
     if (EditorData.SelectedMachine != null)
     {
         var dlg = new MachineDetailsEditor {
             Owner = this
         };
         dlg.Show();
     }
 }
Example #2
0
        private void SelectMachineButton_Click(object sender, RoutedEventArgs e)
        {
            object Name = ((Button)sender).CommandParameter;

            EditorData.SelectedMachine = (EditorData.Machines as ObservableCollection <MachineViewModel>)
                                         .Where(i => i.Name == Name.ToString()).First();
            var dlg = new MachineDetailsEditor {
                Owner = this
            };

            dlg.Show();
        }