public SettingsForm(PicasaConfiguration config) { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); InitializeTexts(); combobox_uploadimageformat.Items.Clear(); foreach (OutputFormat format in Enum.GetValues(typeof(OutputFormat))) { combobox_uploadimageformat.Items.Add(format.ToString()); } comboBox_DefaultSize.Items.Clear(); foreach (PictureDisplaySize displaySize in Enum.GetValues(typeof(PictureDisplaySize))) { comboBox_DefaultSize.Items.Add(displaySize.ToString()); } PicasaUtils.LoadHistory(); if (config.runtimePicasaHistory.Count > 0) { historyButton.Enabled = true; } else { historyButton.Enabled = false; } }
public SettingsForm(PicasaConfiguration config) { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); InitializeTexts(); combobox_uploadimageformat.Items.Clear(); foreach(OutputFormat format in Enum.GetValues(typeof(OutputFormat))) { combobox_uploadimageformat.Items.Add(format.ToString()); } comboBox_DefaultSize.Items.Clear(); foreach (PictureDisplaySize displaySize in Enum.GetValues(typeof(PictureDisplaySize))) { comboBox_DefaultSize.Items.Add(displaySize.ToString()); } PicasaUtils.LoadHistory(); if (config.runtimePicasaHistory.Count > 0) { historyButton.Enabled = true; } else { historyButton.Enabled = false; } }
/// <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> public virtual bool Initialize(IGreenshotHost pluginHost, PluginAttribute myAttributes) { this.host = (IGreenshotHost)pluginHost; Attributes = myAttributes; // Get configuration config = IniConfig.GetIniSection <PicasaConfiguration>(); resources = new ComponentResourceManager(typeof(PicasaPlugin)); ToolStripMenuItem itemPlugInRoot = new ToolStripMenuItem(); itemPlugInRoot.Text = "Picasa"; itemPlugInRoot.Tag = host; itemPlugInRoot.Image = (Image)resources.GetObject("Picasa"); ToolStripMenuItem itemPlugInHistory = new ToolStripMenuItem(); itemPlugInHistory.Text = lang.GetString(LangKey.History); itemPlugInHistory.Tag = host; itemPlugInHistory.Click += new System.EventHandler(HistoryMenuClick); itemPlugInRoot.DropDownItems.Add(itemPlugInHistory); ToolStripMenuItem itemPlugInConfig = new ToolStripMenuItem(); itemPlugInConfig.Text = lang.GetString(LangKey.Configure); itemPlugInConfig.Tag = host; itemPlugInConfig.Click += new System.EventHandler(ConfigMenuClick); itemPlugInRoot.DropDownItems.Add(itemPlugInConfig); PluginUtils.AddToContextMenu(host, itemPlugInRoot); return(true); }
public SettingsForm(PicasaConfiguration config) : base() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); CancelButton = buttonCancel; AcceptButton = buttonOK; }
public SettingsForm(PicasaConfiguration config) : base() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); CancelButton = buttonCancel; AcceptButton = buttonOK; 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 = pluginHost; // Get configuration config = IniConfig.GetIniSection <PicasaConfiguration>(); resources = new ComponentResourceManager(typeof(PicasaPlugin)); // Register our configuration SettingsWindow.RegisterSettingsPage <PicasaSettingsPage>("settings_plugins,picasa.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> public virtual bool Initialize(IGreenshotHost pluginHost, PluginAttribute myAttributes) { this.host = (IGreenshotHost)pluginHost; Attributes = myAttributes; // Get configuration config = IniConfig.GetIniSection<PicasaConfiguration>(); resources = new ComponentResourceManager(typeof(PicasaPlugin)); itemPlugInRoot = new ToolStripMenuItem(); itemPlugInRoot.Text = Language.GetString("picasa", LangKey.Configure); itemPlugInRoot.Tag = host; itemPlugInRoot.Image = (Image)resources.GetObject("Picasa"); itemPlugInRoot.Click += new System.EventHandler(ConfigMenuClick); PluginUtils.AddToContextMenu(host, itemPlugInRoot); 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> public virtual bool Initialize(IGreenshotHost pluginHost, PluginAttribute myAttributes) { this.host = (IGreenshotHost)pluginHost; Attributes = myAttributes; // Get configuration config = IniConfig.GetIniSection <PicasaConfiguration>(); resources = new ComponentResourceManager(typeof(PicasaPlugin)); itemPlugInRoot = new ToolStripMenuItem(); itemPlugInRoot.Text = Language.GetString("picasa", LangKey.Configure); itemPlugInRoot.Tag = host; itemPlugInRoot.Image = (Image)resources.GetObject("Picasa"); itemPlugInRoot.Click += new System.EventHandler(ConfigMenuClick); PluginUtils.AddToContextMenu(host, itemPlugInRoot); 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> public virtual bool Initialize(IGreenshotHost pluginHost, PluginAttribute myAttributes) { _host = pluginHost; Attributes = myAttributes; // Get configuration _config = IniConfig.GetIniSection <PicasaConfiguration>(); _resources = new ComponentResourceManager(typeof(PicasaPlugin)); _itemPlugInRoot = new ToolStripMenuItem { Text = Language.GetString("picasa", LangKey.Configure), Tag = _host, Image = (Image)_resources.GetObject("Picasa") }; _itemPlugInRoot.Click += ConfigMenuClick; PluginUtils.AddToContextMenu(_host, _itemPlugInRoot); Language.LanguageChanged += 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> public virtual bool Initialize(IGreenshotHost pluginHost, PluginAttribute myAttributes) { this.host = (IGreenshotHost)pluginHost; Attributes = myAttributes; // Get configuration config = IniConfig.GetIniSection<PicasaConfiguration>(); resources = new ComponentResourceManager(typeof(PicasaPlugin)); ToolStripMenuItem itemPlugInRoot = new ToolStripMenuItem(); itemPlugInRoot.Text = "Picasa"; itemPlugInRoot.Tag = host; itemPlugInRoot.Image = (Image)resources.GetObject("Picasa"); ToolStripMenuItem itemPlugInHistory = new ToolStripMenuItem(); itemPlugInHistory.Text = lang.GetString(LangKey.History); itemPlugInHistory.Tag = host; itemPlugInHistory.Click += new System.EventHandler(HistoryMenuClick); itemPlugInRoot.DropDownItems.Add(itemPlugInHistory); ToolStripMenuItem itemPlugInConfig = new ToolStripMenuItem(); itemPlugInConfig.Text = lang.GetString(LangKey.Configure); itemPlugInConfig.Tag = host; itemPlugInConfig.Click += new System.EventHandler(ConfigMenuClick); itemPlugInRoot.DropDownItems.Add(itemPlugInConfig); PluginUtils.AddToContextMenu(host, itemPlugInRoot); return true; }