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); }
public EditorTrigger(ICodeweaverPlugin plugin, Keys keys, Keys mods, string name, TriggerStateWhen when) { this.plugin = plugin; TriggerKeys = keys; TriggerModifiers = mods; TriggerName = name; TriggerWhen = when; }
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]); }
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)); }
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); } }
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; }
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); }
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); }
public void RegisterCustomConfigTab(ICodeweaverPlugin _this, string TabText, Control CustomConfigTab) { __RegisterCustomConfigTab(_this, TabText, CustomConfigTab); }
public void ConfigSetValue(ICodeweaverPlugin _this, string configKey, object configValue) { __ConfigSetValue(_this, configKey, configValue); }
public object ConfigGetValue(ICodeweaverPlugin _this, string configKey, object defaultValue) { return __ConfigGetValue(_this, configKey, defaultValue); }
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); }
public void RegisterEnvironmentTab(ICodeweaverPlugin _this, string TabText, int TabIcon, Control TabContent) { __RegisterEnvironmentTab(_this, TabText, TabIcon, TabContent); }
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); }
public void RegisterEditorTrigger(ICodeweaverPlugin _this, Keys TriggerKey, Keys TriggerModifiers, string TriggerName, TriggerStateWhen context) { __RegisterEditorTrigger(_this, TriggerKey, TriggerModifiers, TriggerName, context); }
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)); }
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); }
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; }
public object ConfigGetValue(ICodeweaverPlugin _this, string configKey, object defaultValue) { return(__ConfigGetValue(_this, configKey, defaultValue)); }
public PrimaryTab(Crownwood.DotNetMagic.Controls.TabPage NewPage, T Control, ICodeweaverPlugin plugin) { this._control = Control; this.page = NewPage; this.plugin = plugin; }
public CustomConfigTab(ICodeweaverPlugin Plugin, Control TabControl, string TabText) { this.TabControl = TabControl; this.TabText = TabText; this.Plugin = Plugin; }
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]; }