Пример #1
0
        /// <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);
        }
Пример #2
0
        /// <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);
        }
Пример #3
0
		/// <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;
		}
Пример #4
0
 /// <summary>
 /// Implementation of the IPlugin.Configure
 /// </summary>
 public virtual void Configure()
 {
     config.ShowConfigDialog();
 }