private void addExtenderFormat_Click(object sender, RoutedEventArgs e) { var form = new AddExtenderFormat { Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner }; var result = form.ShowDialog(); if (result == true) { var parser = new FormatParser(commonConfig.ExtenderNativeTypes); parser.Add(form.formatName.Text); commonConfig.ExtenderNativeTypes = parser.ToString(); RefreshExtenderFormats(); SaveConfig(); } }
private void removeExtenderFormat_Click(object sender, RoutedEventArgs e) { var format = extenderFormats.SelectedItem as string; if (format != null) { var message = "Remove \"" + format + "\"?"; if ( MessageBox.Show(message, "Remove folder", MessageBoxButton.YesNoCancel) == MessageBoxResult.Yes) { var parser = new FormatParser(config.ExtenderNativeTypes); parser.Remove(format); config.ExtenderNativeTypes = parser.ToString(); RefreshExtenderFormats(); SaveConfig(); } } }
private void removeExtenderFormat_Click(object sender, RoutedEventArgs e) { var format = extenderFormats.SelectedItem as string; if (format != null) { var message = "Remove \"" + format + "\"?"; if ( MessageBox.Show(message, "Remove folder", MessageBoxButton.YesNoCancel) == MessageBoxResult.Yes) { var parser = new FormatParser(commonConfig.ExtenderNativeTypes); parser.Remove(format); commonConfig.ExtenderNativeTypes = parser.ToString(); RefreshExtenderFormats(); SaveConfig(); } } }
private void addExtenderFormat_Click(object sender, RoutedEventArgs e) { var form = new AddExtenderFormat {Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner}; var result = form.ShowDialog(); if (result == true) { var parser = new FormatParser(commonConfig.ExtenderNativeTypes); parser.Add(form.formatName.Text); commonConfig.ExtenderNativeTypes = parser.ToString(); RefreshExtenderFormats(); SaveConfig(); } }