public SettingsForm(PhotobucketConfiguration config) : base() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); AcceptButton = buttonOK; CancelButton = buttonCancel; }
public SettingsForm(PhotobucketConfiguration config) : base() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); AcceptButton = buttonOK; CancelButton = buttonCancel; Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); }
/// <summary> /// Implementation of the IGreenshotPlugin.Initialize /// </summary> /// <param name="host">Use the IGreenshotPluginHost interface to register events</param> /// <param name="metadata">IDictionary<string, object></param> /// <returns>true if plugin is initialized, false if not (doesn't show)</returns> public override bool Initialize(IGreenshotHost pluginHost, IDictionary <string, object> metadata) { this.host = (IGreenshotHost)pluginHost; // Get configuration config = IniConfig.GetIniSection <PhotobucketConfiguration>(); resources = new ComponentResourceManager(typeof(PhotobucketPlugin)); // Register our configuration SettingsWindow.RegisterSettingsPage <PhotobucketSettingsPage>("settings_plugins,photobucket.settings_title"); return(true); }
/// <summary> /// Implementation of the IGreenshotPlugin.Initialize /// </summary> /// <param name="host">Use the IGreenshotPluginHost interface to register events</param> /// <param name="captureHost">Use the ICaptureHost interface to register in the MainContextMenu</param> /// <param name="pluginAttribute">My own attributes</param> /// <returns>true if plugin is initialized, false if not (doesn't show)</returns> public virtual bool Initialize(IGreenshotHost pluginHost, PluginAttribute myAttributes) { this.host = (IGreenshotHost)pluginHost; Attributes = myAttributes; // Get configuration config = IniConfig.GetIniSection<PhotobucketConfiguration>(); resources = new ComponentResourceManager(typeof(PhotobucketPlugin)); itemPlugInConfig = new ToolStripMenuItem(Language.GetString("photobucket", LangKey.configure)); itemPlugInConfig.Tag = host; itemPlugInConfig.Click += delegate { config.ShowConfigDialog(); }; itemPlugInConfig.Image = (Image)resources.GetObject("Photobucket"); PluginUtils.AddToContextMenu(host, itemPlugInConfig); Language.LanguageChanged += new LanguageChangedHandler(OnLanguageChanged); return true; }
/// <summary> /// Implementation of the IGreenshotPlugin.Initialize /// </summary> /// <param name="host">Use the IGreenshotPluginHost interface to register events</param> /// <param name="captureHost">Use the ICaptureHost interface to register in the MainContextMenu</param> /// <param name="pluginAttribute">My own attributes</param> /// <returns>true if plugin is initialized, false if not (doesn't show)</returns> public virtual bool Initialize(IGreenshotHost pluginHost, PluginAttribute myAttributes) { this.host = (IGreenshotHost)pluginHost; Attributes = myAttributes; // Get configuration config = IniConfig.GetIniSection <PhotobucketConfiguration>(); resources = new ComponentResourceManager(typeof(PhotobucketPlugin)); itemPlugInConfig = new ToolStripMenuItem(Language.GetString("photobucket", LangKey.configure)); itemPlugInConfig.Tag = host; itemPlugInConfig.Click += delegate { config.ShowConfigDialog(); }; itemPlugInConfig.Image = (Image)resources.GetObject("Photobucket"); PluginUtils.AddToContextMenu(host, itemPlugInConfig); Language.LanguageChanged += new LanguageChangedHandler(OnLanguageChanged); return(true); }
/// <summary> /// Implementation of the IGreenshotPlugin.Initialize /// </summary> /// <param name="pluginHost">Use the IGreenshotPluginHost interface to register events</param> /// <param name="myAttributes">My own attributes</param> /// <returns>true if plugin is initialized, false if not (doesn't show)</returns> public virtual bool Initialize(IGreenshotHost pluginHost, PluginAttribute myAttributes) { _host = pluginHost; Attributes = myAttributes; // Get configuration _config = IniConfig.GetIniSection <PhotobucketConfiguration>(); _resources = new ComponentResourceManager(typeof(PhotobucketPlugin)); _itemPlugInConfig = new ToolStripMenuItem(Language.GetString("photobucket", LangKey.configure)) { Tag = _host, Image = (Image)_resources.GetObject("Photobucket") }; _itemPlugInConfig.Click += delegate { _config.ShowConfigDialog(); }; PluginUtils.AddToContextMenu(_host, _itemPlugInConfig); Language.LanguageChanged += OnLanguageChanged; return(true); }