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);
        }
Пример #2
0
        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);
        }