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"));

        }
Ejemplo n.º 2
0
        public override void Initialize(InitializationContext context)
        {
            _extensionHost = (LiteExtensionHost)context.Host;

            var generalSettingsEditorControl = new GeneralSettingsEditor(_settings = LiteDevelopSettings.Instance) { Dock = DockStyle.Fill };
            var internationalSettingsEditorControl = new InternationalSettingsEditor(_settings) { Dock = DockStyle.Fill };
            var appearanceEditorControl = new AppearanceEditor() { Dock = DockStyle.Fill };

            var generalSettingsNode = new SettingsNode("General", generalSettingsEditorControl);
            var internationalSettingsNode = new SettingsNode("International", internationalSettingsEditorControl);
            var appearanceNode = new SettingsNode("Appearance", appearanceEditorControl);

            _settingsNode = new SettingsNode("LiteDevelop", generalSettingsEditorControl);
            _settingsNode.Nodes.AddRange(new TreeNode[]
            {
                generalSettingsNode,
                appearanceNode,
                internationalSettingsNode,
            });

            _componentMuiIdentifiers = new Dictionary<object, string>()
            {
                {generalSettingsNode, "LiteDevelopExtension.GeneralSettings"},
                {appearanceNode, "LiteDevelopExtension.Appearance"},
                {internationalSettingsNode, "LiteDevelopExtension.InternationalSettings"},
            };

            _extensionHost.UILanguageChanged += extensionHost_UILanguageChanged;
            extensionHost_UILanguageChanged(null, null);

            _appearanceMapPath = Path.Combine(Constants.AppDataDirectory, "appearance.xml");
            _defaultAppearanceMap  = AppearanceMap.LoadFromFile(Path.Combine(
                    Path.GetDirectoryName(typeof(LiteDevelopExtension).Assembly.Location),
                    "default_appearance.xml"));

            try { _appearanceMap = AppearanceMap.LoadFromFile(_appearanceMapPath); }
            catch { _appearanceMap = _defaultAppearanceMap; }
        }
 public override void Initialize(InitializationContext context)
 {
     ExtensionHost = context.Host;
     SetupFileTemplates();
     SetupProjectTemplates();
 }
 /// <summary>
 /// Initializes the extension.
 /// </summary>
 /// <param name="context">The initialization context to use for initializing the extension.</param>
 public abstract void Initialize(InitializationContext context);
Ejemplo n.º 5
0
        public override void Initialize(InitializationContext context)
        {
            ExtensionHost = context.Host;

            try
            {
                Settings = CodeEditorSettings.LoadSettings(context.Host.SettingsManager);
            }
            catch
            {
                Settings = CodeEditorSettings.Default.Clone() as CodeEditorSettings;
            }

            SetupGui();
            SetupTemplates();
        }
 public override void Initialize(InitializationContext context)
 {
     ExtensionHost = context.Host;
 }
 /// <inheritdoc />
 public override void Initialize(InitializationContext context)
 {
     _muiProcessor = new MuiProcessor(context.Host, Path.Combine(Application.StartupPath, "MUI"));
 }
 protected abstract void InitializeCore(InitializationContext context);
 public override void Initialize(InitializationContext context)
 {
     DebuggerBase.EnsureBaseIsLoaded(context.Host.ExtensionManager);
     InitializeCore(context);
 }