public SettingsForm(JiraConfiguration config) :base () { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); AcceptButton = buttonOK; CancelButton = buttonCancel; }
public SettingsForm(JiraConfiguration config) : base() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); AcceptButton = buttonOK; CancelButton = buttonCancel; }
/// <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; jiraPluginAttributes = myAttributes; // Register configuration (don't need the configuration itself) config = IniConfig.GetIniSection <JiraConfiguration>(); resources = new ComponentResourceManager(typeof(JiraPlugin)); return(true); }
public SettingsForm(JiraConfiguration 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 = pluginHost; // Register configuration (don't need the configuration itself) config = IniConfig.GetIniSection <JiraConfiguration>(); // Register our configuration SettingsWindow.RegisterSettingsPage <JiraSettingsPage>("settings_plugins,jira.settings_title"); 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 bool Initialize(IGreenshotHost pluginHost, PluginAttribute myAttributes) { // Register configuration (don't need the configuration itself) _config = IniConfig.GetIniSection <JiraConfiguration>(); // Make sure the loggin is enable for the corect level. if (Log.IsDebugEnabled) { LogSettings.RegisterDefaultLogger <Log4NetLogger>(LogLevels.Verbose); } else if (Log.IsInfoEnabled) { LogSettings.RegisterDefaultLogger <Log4NetLogger>(LogLevels.Info); } else if (Log.IsWarnEnabled) { LogSettings.RegisterDefaultLogger <Log4NetLogger>(LogLevels.Warn); } else if (Log.IsErrorEnabled) { LogSettings.RegisterDefaultLogger <Log4NetLogger>(LogLevels.Error); } else if (Log.IsErrorEnabled) { LogSettings.RegisterDefaultLogger <Log4NetLogger>(LogLevels.Error); } else { LogSettings.RegisterDefaultLogger <Log4NetLogger>(LogLevels.Fatal); } // Add a SVG converter, although it doesn't fit to the Jira plugin there is currently no other way ImageHelper.StreamConverters["svg"] = (stream, s) => { stream.Position = 0; try { return(SvgImage.FromStream(stream).Image); } catch (Exception ex) { Log.Error("Can't load SVG", ex); } return(null); }; 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; jiraPluginAttributes = myAttributes; // Register configuration (don't need the configuration itself) config = IniConfig.GetIniSection<JiraConfiguration>(); resources = new ComponentResourceManager(typeof(JiraPlugin)); return true; }