public bool CWPluginInit(Version CWVersion, CWLicenseType UserLicenseType, IDEControl ControlObject)
        {
            // We need "Self" to be our current instance so we can be accessed elsewhere.  We also need
            // to set our control object so we can communicate with the IDE
            ClipManagerPlugin.controlObject = ControlObject;
            ClipManagerPlugin.self          = this;

            // Set our version info
            this.cwVersion     = CWVersion;
            this.cwLicenseType = UserLicenseType;

            // Register our tab icon
            workspaceIconHandle = controlObject.AddWorkspaceTabIconResource(global::ClipManagerPlugin.Properties.Resource.clipboard);

            // Register our editor context menu
            controlObject.RegisterCustomEditorContextMenu(editorContext);

            // Register plugin menu item and handler
            controlObject.RegisterCustomPluginMenu(pluginMenu);
            pluginMenu.Click += new EventHandler(pluginMenu_Click);

            // Register our config page
            controlObject.RegisterCustomConfigTab(this, "Clip Manager", clipManagerConfig);

            // Add our handlers to the context menu
            editorContext.DropDownOpening += new EventHandler(editorContext_DropDownOpening);

            // Our "Add" context menu is bound here
            editorContextAdd.Click += new EventHandler(editorContextAdd_Click);

            return(true);
        }
Exemple #2
0
 public EditorTrigger(ICodeweaverPlugin plugin, Keys keys, Keys mods, string name, TriggerStateWhen when)
 {
     this.plugin      = plugin;
     TriggerKeys      = keys;
     TriggerModifiers = mods;
     TriggerName      = name;
     TriggerWhen      = when;
 }
Exemple #3
0
        public static object ConfigGetValue(ICodeweaverPlugin _this, string configKey, object defaultValue)
        {
            if (!g.Config.PluginConfigs.ContainsKey(_this.CWPluginGuid.ToString() + "__" + configKey))
            {
                return(defaultValue);
            }

            return(g.Config.PluginConfigs[_this.CWPluginGuid.ToString() + "__" + configKey]);
        }
Exemple #4
0
        public static void RegisterEditorTrigger(ICodeweaverPlugin _this, Keys TriggerKeys, Keys TriggerModifiers, string TriggerName, TriggerStateWhen TriggerWhen)
        {
            if (g.EditorTriggers.HasKey(TriggerName))
            {
                throw new PluginException("A trigger by this name already exists.", "RegisterEditorTrigger");
            }

            // Register the trigger with the collection
            g.EditorTriggers.Add(new EditorTrigger(_this, TriggerKeys, TriggerModifiers, TriggerName, TriggerWhen));
        }
Exemple #5
0
 public static void ConfigSetValue(ICodeweaverPlugin _this, string configKey, object configValue)
 {
     if (g.Config.PluginConfigs.ContainsKey(_this.CWPluginGuid.ToString() + "__" + configKey))
     {
         g.Config.PluginConfigs[_this.CWPluginGuid + "__" + configKey] = configValue;
     }
     else
     {
         g.Config.PluginConfigs.Add(_this.CWPluginGuid.ToString() + "__" + configKey, configValue);
     }
 }
Exemple #6
0
 public CWPlugin(string name, Version version, string description, string author, string copyright, Version validUntil, Guid guid, ICodeweaverPlugin plugin)
 {
     this._name        = name;
     this._version     = version;
     this._description = description;
     this._author      = author;
     this._copyright   = copyright;
     this._valid_until = validUntil;
     this._guid        = guid;
     this._plugin      = plugin;
 }
Exemple #7
0
        public static void RegisterCustomConfigTab(ICodeweaverPlugin _this, string TabText, Control Tab)
        {
            CustomConfigTab ct = g.CustomConfigTabs.FindByControl(Tab);

            if (ct != null)
            {
                return;
            }

            g.CustomConfigTabs.Add(new CustomConfigTab(_this, Tab, TabText));
            GC.SuppressFinalize(Tab);
        }
Exemple #8
0
        public static void RegisterEnvironmentTab(ICodeweaverPlugin _this, string TabText, int TabIcon, Control TabContent)
        {
            // Make sure there isn't already a tab with this same control in it
            if (g.OtherTabs.FindByControl(TabContent) != null)
            {
                return;
            }

            // Add the tab
            Crownwood.DotNetMagic.Controls.TabPage newpage = new Crownwood.DotNetMagic.Controls.TabPage(
                TabText,
                TabContent,
                g.Main.ilDocBar,
                TabIcon
                );

            // Add the tab to the collection
            g.OtherTabs.Add(new PrimaryTab <Control>(newpage, TabContent, _this));

            // Display the tab in the interface
            g.Main.tabMain.ActiveLeaf.TabPages.Add(newpage);
        }
Exemple #9
0
 public void RegisterCustomConfigTab(ICodeweaverPlugin _this, string TabText, Control CustomConfigTab)
 {
     __RegisterCustomConfigTab(_this, TabText, CustomConfigTab);
 }
Exemple #10
0
 public void ConfigSetValue(ICodeweaverPlugin _this, string configKey, object configValue)
 {
     __ConfigSetValue(_this, configKey, configValue);
 }
Exemple #11
0
 public object ConfigGetValue(ICodeweaverPlugin _this, string configKey, object defaultValue)
 {
     return __ConfigGetValue(_this, configKey, defaultValue);
 }
Exemple #12
0
 public static void ConfigSetValue(ICodeweaverPlugin _this, string configKey, object configValue)
 {
     if (g.Config.PluginConfigs.ContainsKey(_this.CWPluginGuid.ToString() + "__" + configKey))
         g.Config.PluginConfigs[_this.CWPluginGuid + "__" + configKey] = configValue;
     else
         g.Config.PluginConfigs.Add(_this.CWPluginGuid.ToString() + "__" + configKey, configValue);
 }
Exemple #13
0
 public void RegisterEnvironmentTab(ICodeweaverPlugin _this, string TabText, int TabIcon, Control TabContent)
 {
     __RegisterEnvironmentTab(_this, TabText, TabIcon, TabContent);
 }
Exemple #14
0
 public void ConfigSetValue(ICodeweaverPlugin _this, string configKey, object configValue)
 {
     __ConfigSetValue(_this, configKey, configValue);
 }
Exemple #15
0
        public static void RegisterCustomConfigTab(ICodeweaverPlugin _this, string TabText, Control Tab)
        {
            CustomConfigTab ct = g.CustomConfigTabs.FindByControl(Tab);

            if (ct != null)
                return;

            g.CustomConfigTabs.Add(new CustomConfigTab(_this, Tab, TabText));
            GC.SuppressFinalize(Tab);
        }
Exemple #16
0
 public void RegisterEditorTrigger(ICodeweaverPlugin _this, Keys TriggerKey, Keys TriggerModifiers, string TriggerName, TriggerStateWhen context)
 {
     __RegisterEditorTrigger(_this, TriggerKey, TriggerModifiers, TriggerName, context);
 }
Exemple #17
0
        public static void RegisterEditorTrigger(ICodeweaverPlugin _this, Keys TriggerKeys, Keys TriggerModifiers, string TriggerName, TriggerStateWhen TriggerWhen)
        {
            if (g.EditorTriggers.HasKey(TriggerName))
                throw new PluginException("A trigger by this name already exists.", "RegisterEditorTrigger");

            // Register the trigger with the collection
            g.EditorTriggers.Add(new EditorTrigger(_this, TriggerKeys, TriggerModifiers, TriggerName, TriggerWhen));
        }
Exemple #18
0
        public static void RegisterEnvironmentTab(ICodeweaverPlugin _this, string TabText, int TabIcon, Control TabContent)
        {
            // Make sure there isn't already a tab with this same control in it
            if (g.OtherTabs.FindByControl(TabContent) != null)
                return;

            // Add the tab
            Crownwood.DotNetMagic.Controls.TabPage newpage = new Crownwood.DotNetMagic.Controls.TabPage(
                TabText,
                TabContent,
                g.Main.ilDocBar,
                TabIcon
            );

            // Add the tab to the collection
            g.OtherTabs.Add(new PrimaryTab<Control>(newpage, TabContent, _this));

            // Display the tab in the interface
            g.Main.tabMain.ActiveLeaf.TabPages.Add(newpage);
        }
Exemple #19
0
 public void RegisterEnvironmentTab(ICodeweaverPlugin _this, string TabText, int TabIcon, Control TabContent)
 {
     __RegisterEnvironmentTab(_this, TabText, TabIcon, TabContent);
 }
        public bool CWPluginInit(Version CWVersion, CWLicenseType UserLicenseType, IDEControl ControlObject)
        {
            // We need "Self" to be our current instance so we can be accessed elsewhere.  We also need
            // to set our control object so we can communicate with the IDE
            ClipManagerPlugin.controlObject = ControlObject;
            ClipManagerPlugin.self = this;

            // Set our version info
            this.cwVersion = CWVersion;
            this.cwLicenseType = UserLicenseType;

            // Register our tab icon
            workspaceIconHandle = controlObject.AddWorkspaceTabIconResource(global::ClipManagerPlugin.Properties.Resource.clipboard);

            // Register our editor context menu
            controlObject.RegisterCustomEditorContextMenu(editorContext);

            // Register plugin menu item and handler
            controlObject.RegisterCustomPluginMenu(pluginMenu);
            pluginMenu.Click += new EventHandler(pluginMenu_Click);

            // Register our config page
            controlObject.RegisterCustomConfigTab(this, "Clip Manager", clipManagerConfig);

            // Add our handlers to the context menu
            editorContext.DropDownOpening += new EventHandler(editorContext_DropDownOpening);

            // Our "Add" context menu is bound here
            editorContextAdd.Click += new EventHandler(editorContextAdd_Click);

            return true;
        }
Exemple #21
0
 public object ConfigGetValue(ICodeweaverPlugin _this, string configKey, object defaultValue)
 {
     return(__ConfigGetValue(_this, configKey, defaultValue));
 }
Exemple #22
0
 public PrimaryTab(Crownwood.DotNetMagic.Controls.TabPage NewPage, T Control, ICodeweaverPlugin plugin)
 {
     this._control = Control;
     this.page     = NewPage;
     this.plugin   = plugin;
 }
Exemple #23
0
 public void RegisterEditorTrigger(ICodeweaverPlugin _this, Keys TriggerKey, Keys TriggerModifiers, string TriggerName, TriggerStateWhen context)
 {
     __RegisterEditorTrigger(_this, TriggerKey, TriggerModifiers, TriggerName, context);
 }
Exemple #24
0
 public CustomConfigTab(ICodeweaverPlugin Plugin, Control TabControl, string TabText)
 {
     this.TabControl = TabControl;
     this.TabText    = TabText;
     this.Plugin     = Plugin;
 }
Exemple #25
0
 public void RegisterCustomConfigTab(ICodeweaverPlugin _this, string TabText, Control CustomConfigTab)
 {
     __RegisterCustomConfigTab(_this, TabText, CustomConfigTab);
 }
Exemple #26
0
        public static object ConfigGetValue(ICodeweaverPlugin _this, string configKey, object defaultValue)
        {
            if (!g.Config.PluginConfigs.ContainsKey(_this.CWPluginGuid.ToString() + "__" + configKey))
                return defaultValue;

            return g.Config.PluginConfigs[_this.CWPluginGuid.ToString() + "__" + configKey];
        }