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; }
public static ScriptContent GetScriptContent(IReplEditorUI replEditorUI) => (ScriptContent)replEditorUI.Tag;
public ReplEditorCtxMenuContext(IReplEditorUI ui) { this.UI = ui; this.VM = ScriptContent.GetScriptContent(ui).ScriptControlVM; }
public static ScriptContent GetScriptContent(IReplEditorUI replEditorUI) { return (ScriptContent)replEditorUI.Tag; }
public static ScriptContent GetScriptContent(IReplEditorUI replEditorUI) { return((ScriptContent)replEditorUI.Tag); }