Ejemplo n.º 1
0
        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;
        }
        public void ApplySettings()
        {
            RootSettingsNode.ApplySettingsInAllNodes();
            _extensionHost.UILanguage = UILanguage.GetLanguageById(_settings.GetValue("Application.LanguageID"));
            _settings.Save();

            _appearanceMap.Save(_appearanceMapPath);

            if (AppliedSettings != null)
            {
                AppliedSettings(this, EventArgs.Empty);
            }
        }
Ejemplo n.º 3
0
        public override void LoadUserDefinedPresets()
        {
            var language = UILanguage.GetLanguageById(_settings.GetValue("Application.LanguageID"));

            comboBox1.SelectedItem = language.Name;
        }