コード例 #1
0
        private void CopyConfiguration_OnClick(object sender, RoutedEventArgs e)
        {
            var name = new UniqueNamerWindow(AppSettings.Settings.EditorControlThemes.Keys, "My Theme")
            {
                Owner = OwnerSettingsWindow
            };

            name.ShowDialog();

            if (name.Canceled)
            {
                return;
            }


            AppSettings.Settings.AddEditorControlTheme(name.ChosenName);

            EditorThemeNames.Add(name.ChosenName);

            var newTheme = AppSettings.Settings.EditorControlThemes[name.ChosenName];

            newTheme.MemberwiseAssign(AppSettings.Settings.EditorControlThemes[SelectedEditorThemeName].Clone());

            EditorThemeCombobox.SelectedIndex = EditorThemeNames.Count - 1;
        }
コード例 #2
0
        private void RenameConfiguration_OnClick(object sender, RoutedEventArgs e)
        {
            var x = new UniqueNamerWindow(AppSettings.Settings.EditorControlThemes.Keys, SelectedEditorThemeName,
                                          false);

            x.ShowDialog();

            if (x.Canceled)
            {
                return;
            }

            AppSettings.Settings.RenameEditorControlTheme(SelectedEditorThemeName, x.ChosenName);


            EditorThemeNames.Clear();

            foreach (var v in AppSettings.Settings.EditorControlThemes.Keys)
            {
                EditorThemeNames.Add(v);
            }

            SelectedEditorThemeName = x.ChosenName;
        }