Пример #1
0
        void DummyMechModelAddDeleteControl_deleteClicked(object sender, UIControls.AddModifyDeleteSelectionChangedEventArgs e)
        {
            if (e.SelectedIndex == -1)
            {
                return;
            }
            MessageBox.Show("Model will be Deleted. Press OK to Confirm", "Application Info",
                            MessageBoxButton.OK, MessageBoxImage.Exclamation);
            dataAccess.DeleteModel(DummyElecModels[e.SelectedIndex]);

            loadModels();
        }
Пример #2
0
        void DummyElecModelAddDeleteControl_selectionChanged(object sender, UIControls.AddModifyDeleteSelectionChangedEventArgs e)
        {
            gbModelDetails.Visibility = System.Windows.Visibility.Hidden;

            if (e.SelectedIndex == -1)
            {
                return;
            }

            ModelDetailsControl.CurrentModel = DummyElecModels[e.SelectedIndex];

            gbModelDetails.Visibility = System.Windows.Visibility.Visible;
        }