private void NewButton_Click(object sender, RoutedEventArgs e) { var itemEditor = new ParameterItemEditor(null) { Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner }; if ((bool)itemEditor.ShowDialog()) { AddParameterChoices(); } }
private void EditButton_Click(object sender, RoutedEventArgs e) { if ((GaugeTypes.SelectedItem) != null) { var parameter = ConfigManager.ParamData.GetParam(((VMSListBoxItem)GaugeTypes.SelectedItem).ID); var itemEditor = new ParameterItemEditor(parameter) { Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner }; if ((bool)itemEditor.ShowDialog()) { AddParameterChoices(); } } }