public SettingsForm(FacebookConfiguration config) { _config = config; // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); Icon = GreenshotResources.getGreenshotIcon(); }
/// <summary> /// Implementation of the IGreenshotPlugin.Initialize /// </summary> /// <param name="pluginHost">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 bool Initialize(IGreenshotHost pluginHost, IDictionary<string, object> metadata) { host = pluginHost; // Get configuration config = IniConfig.GetIniSection<FacebookConfiguration>(); resources = new ComponentResourceManager(typeof(FacebookPlugin)); itemPlugInConfig = new ToolStripMenuItem(Language.GetString("facebook", LangKey.configure)) {Tag = host}; itemPlugInConfig.Click += delegate { config.ShowConfigDialog(); }; itemPlugInConfig.Image = (Image)resources.GetObject("Facebook"); PluginUtils.AddToContextMenu(host, itemPlugInConfig); Language.LanguageChanged += OnLanguageChanged; return true; }