public override void Initialize(InitializationContext context) { ExtensionHost = context.Host; RegisteredEditors = new Dictionary<Type, IResourceViewContentProvider>() { {typeof(Bitmap), ImageViewContent.Provider}, {typeof(string), TextViewContent.Provider} }; MuiProcessor = new MuiProcessor(ExtensionHost, Path.Combine(Path.GetDirectoryName(typeof(ResourceEditorExtension).Assembly.Location), "Mui")); }
public GeneralSettingsControl(ILiteExtensionHost host, MuiProcessor muiProcessor, DebuggerBaseSettings settings) { InitializeComponent(); _host = host; _muiProcessor = muiProcessor; _settings = settings; _componentMuiIdentifiers = new Dictionary<object, string>() { {breakOnHandledExceptionCheckBox, "GeneralSettingsControl.BreakOnHandledException"}, {evaluationCheckBox, "GeneralSettingsControl.EnableFunctionEvaluation"}, }; host.UILanguageChanged += host_UILanguageChanged; host_UILanguageChanged(null, null); }
public AutoCompleteSettingsControl(ILiteExtensionHost extensionHost, MuiProcessor muiProcessor, CodeEditorSettings settings) { InitializeComponent(); _settings = settings; _extensionHost = extensionHost; _muiProcessor = muiProcessor; _componentMuiIdentifiers = new Dictionary<object, string>() { {this.autoListMembersCheckBox, "AutoCompleteSettingsControl.AutoListMembers.Title"}, {this.showSuggestionsListWhenLabel, "AutoCompleteSettingsControl.AutoListMembers.PopupTime.Title"}, {this.commitSelectedItemWhenLabel, "AutoCompleteSettingsControl.AutoListMembers.CommitItemOnKeyChars"}, {this.completeOnSpaceBarCheckBox, "AutoCompleteSettingsControl.AutoListMembers.CommitItemOnSpaceBar"}, {this.autoCompleteCodeBlocksCheckBox, "AutoCompleteSettingsControl.AutoCompleteCodeBlocks"}, {this.autoAddParanthesesCheckBox, "AutoCompleteSettingsControl.AutoAddParantheses"}, }; _extensionHost.UILanguageChanged += _extensionHost_UILanguageChanged; }
public GeneralSettingsControl(ILiteExtensionHost extensionHost, MuiProcessor muiProcessor, CodeEditorSettings settings) { InitializeComponent(); _settings = settings; _extensionHost = extensionHost; _muiProcessor = muiProcessor; _componentMuiIdentifiers = new Dictionary<object, string>() { {this.lineNumbersCheckBox, "GeneralSettingsControl.ShowLineNumbers"}, {this.wordWrapCheckBox, "GeneralSettingsControl.WordWrap"}, {this.syntaxHighlightingCheckBox, "GeneralSettingsControl.SyntaxHighlighting"}, {this.trackChangesCheckBox, "GeneralSettingsControl.TrackUnsavedChanges"}, {this.highLightCurrentLineCheckBox, "GeneralSettingsControl.HighlightCurrentLine"}, {this.documentMiniMapCheckBox, "GeneralSettingsControl.ShowDocumentMiniMap"}, }; _extensionHost.UILanguageChanged += _extensionHost_UILanguageChanged; }
/// <inheritdoc /> public override void Initialize(ILiteExtensionHost extensionHost) { _muiProcessor = new MuiProcessor(extensionHost, Path.Combine(Application.StartupPath, "MUI")); }
private void InitializeExtensionHost() { _extensionHost = new LiteExtensionHost(); var solutionExplorer = _mainForm.GetToolWindow<SolutionExplorerContent>(); var outputWindow = _mainForm.GetToolWindow<OutputContent>(); _extensionHost.SettingsManager = new ExtensionSettingsManager(); _extensionHost.ControlManager = new ControlManager(_extensionHost) { DockPanel = _mainForm.DockPanel, ToolStripPanel = _mainForm.ToolStripPanel, MenuStrip = _mainForm.MenuStrip, EditMenu = _mainForm.EditItem, ViewMenu = _mainForm.ViewItem, DebugMenu = _mainForm.DebugItem, ToolsMenu = _mainForm.ToolsItem, StatusStrip = _mainForm.StatusStrip, SolutionExplorerMenu = FindControl(solutionExplorer, "mainTreeView").ContextMenuStrip }; _extensionHost.FileService = new FileService(_extensionHost); _extensionHost.BookmarkManager = new BookmarkManager(); _extensionHost.ErrorManager = new ErrorManager(); _extensionHost.OutputContent = outputWindow; _extensionHost.ProgressBar = _mainForm.DefaultStatusProgressBar.ProgressBar; _extensionHost.CredentialManager = new CredentialManager(); _extensionHost.UILanguage = UILanguage.GetLanguageById(LiteDevelopSettings.Instance.GetValue("Application.LanguageID")); _muiProcessor = new Framework.Mui.MuiProcessor(_extensionHost, Path.Combine(Application.StartupPath, "MUI")); _extensionHost.ExtensionManager = new ExtensionManager(_extensionHost); _appearanceProcessor = _extensionHost.ControlManager.GlobalAppearanceMap.Processor; }
private void SetupMuiComponents() { _muiProcessor = LiteDevelopApplication.Current.MuiProcessor; _componentMuiIdentifiers = new Dictionary<object, string>() { {this, "AboutDialog.Title"}, {closeButton, "Common.Close"}, {projectFounderHeaderLabel,"AboutDialog.ProjectFounder"}, {versionHeaderLabel, "AboutDialog.Version"}, {repositoryHeaderLabel, "AboutDialog.Repository"}, {columnHeader1, "AboutDialog.ModuleListHeaders.Module"}, {columnHeader2, "AboutDialog.ModuleListHeaders.Version"}, {extensionNameHeaderLabel, "AboutDialog.ExtensionDetails.Name"}, {extensionVersionHeaderLabel, "AboutDialog.ExtensionDetails.Version"}, {extensionAuthorHeaderLabel, "AboutDialog.ExtensionDetails.Author"}, {extensionDescriptionHeaderLabel, "AboutDialog.ExtensionDetails.Description"}, {extensionCopyrightHeaderLabel, "AboutDialog.ExtensionDetails.Copyright"}, {additionalReleaseInfoLabel, "AboutDialog.ExtensionDetails.AdditionalReleaseInformation"}, }; _muiProcessor.ApplyLanguageOnComponents(_componentMuiIdentifiers); }
private void SetupGui() { ExtensionHost.ControlManager.InvokeOnMainThread(new Action(() => { MuiProcessor = new MuiProcessor(ExtensionHost, Path.Combine(Path.GetDirectoryName(typeof(CodeEditorExtension).Assembly.Location), "MUI")); AddToMuiIdentifiers(SetupSettingsControls()); AddToMuiIdentifiers(SetupToolbar()); AddStatusBarItems(); ExtensionHost.UILanguageChanged += ExtensionHost_UILanguageChanged; ExtensionHost_UILanguageChanged(null, null); })); _appearanceMapPath = Path.Combine(ExtensionHost.SettingsManager.GetSettingsDirectory(this), "appearance.xml"); _defaultAppearanceMap = AppearanceMap.LoadFromFile(Path.Combine( Path.GetDirectoryName(typeof(CodeEditorExtension).Assembly.Location), "CodeEditor", "default_appearance.xml")); try { _appearanceMap = AppearanceMap.LoadFromFile(_appearanceMapPath); } catch { _appearanceMap = new AppearanceMap(); _defaultAppearanceMap.CopyTo(_appearanceMap); } StyleMap = new Gui.Styles.StyleMap(_appearanceMap, _defaultAppearanceMap); }
private void Current_InitializedApplication(object sender, EventArgs e) { _host = LiteDevelopApplication.Current.ExtensionHost; _muiProcessor = LiteDevelopApplication.Current.MuiProcessor; }
/// <inheritdoc /> public override void Initialize(InitializationContext context) { _muiProcessor = new MuiProcessor(context.Host, Path.Combine(Application.StartupPath, "MUI")); }