protected ScriptContent(IThemeManager themeManager, IReplEditorCreator replEditorCreator, ReplEditorOptions replOpts, IServiceLocator serviceLocator) { this.replEditorUI = replEditorCreator.Create(replOpts); this.scriptControl = new ScriptControl(); this.scriptControl.SetTextEditorObject(this.replEditorUI.UIObject); this.scriptControlVM = CreateScriptControlVM(this.replEditorUI, serviceLocator); this.scriptControlVM.OnCommandExecuted += ScriptControlVM_OnCommandExecuted; this.replEditorUI.Tag = this; this.scriptControl.DataContext = this.scriptControlVM; themeManager.ThemeChanged += ThemeManager_ThemeChanged; }
protected ScriptContent(IReplEditorProvider replEditorProvider, ReplEditorOptions replOpts, ReplSettings replSettings, IServiceLocator serviceLocator, string appearanceCategory) { replOpts.Roles.Add(PredefinedDsTextViewRoles.RoslynRepl); replEditor = replEditorProvider.Create(replOpts); replEditor.TextView.Options.SetOptionValue(DefaultWpfViewOptions.AppearanceCategory, appearanceCategory); scriptControl = new ScriptControl(); scriptControl.SetTextEditorObject(replEditor.UIObject); scriptControlVM = CreateScriptControlVM(replEditor, serviceLocator, replSettings); scriptControlVM.OnCommandExecuted += ScriptControlVM_OnCommandExecuted; RoslynReplEditorUtils.AddInstance(scriptControlVM, replEditor.TextView); replEditor.Tag = this; scriptControl.DataContext = scriptControlVM; }