예제 #1
0
 private void OpenTheme(IThemeEditorViewModel themeEditorViewModel)
 {
     if (AvalonDockWorkspaceViewModel.OpenDocuments.Contains(themeEditorViewModel))
     {
         AvalonDockWorkspaceViewModel.SwitchActiveDocument(themeEditorViewModel);
     }
     else
     {
         AvalonDockWorkspaceViewModel.AddDocument(themeEditorViewModel);
     }
 }
예제 #2
0
        private void OnEditMasterThemeCommand()
        {
            var openMasterThemForScript =
                AvalonDockWorkspaceViewModel.OpenMasterThemeForScript(AvalonDockWorkspaceViewModel.ActiveScriptViewModel);

            if (openMasterThemForScript != null)
            {
                AvalonDockWorkspaceViewModel.SwitchActiveDocument(openMasterThemForScript);
            }
            else
            {
                var themeViewModel =
                    _themeProvider.MasterThemeForScript(AvalonDockWorkspaceViewModel.ActiveScriptViewModel.Script);
                OpenTheme(themeViewModel);
            }
        }