/// <summary> /// Edits the on click. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param> private void EditOnClick(object sender, RoutedEventArgs e) { if (SelectedItem == null) { return; } var pair = EditWindow.Show(SelectedItem); if (pair.Value != MessageBoxResult.OK && pair.Value != MessageBoxResult.Yes) { return; } EnvVarActions.SetEnvVar(pair.Key); Update(OptionTarget); }
/// <summary> /// Adds the on click. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param> private void AddOnClick(object sender, RoutedEventArgs e) { var setting = SelectedItem; if (SelectedItem == null) { return; } setting.Name += UIText.Copy; var pair = EditWindow.Show(setting); if (pair.Value != MessageBoxResult.OK && pair.Value != MessageBoxResult.Yes) { return; } EnvVarActions.SetEnvVar(pair.Key); Update(OptionTarget); }