private void OpenTheme(IThemeEditorViewModel themeEditorViewModel) { if (AvalonDockWorkspaceViewModel.OpenDocuments.Contains(themeEditorViewModel)) { AvalonDockWorkspaceViewModel.SwitchActiveDocument(themeEditorViewModel); } else { AvalonDockWorkspaceViewModel.AddDocument(themeEditorViewModel); } }
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); } }