예제 #1
0
		public SettingsForm(JiraConfiguration config) :base () {
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			AcceptButton = buttonOK;
			CancelButton = buttonCancel;
		}
예제 #2
0
 public SettingsForm(JiraConfiguration config) : base()
 {
     //
     // The InitializeComponent() call is required for Windows Forms designer support.
     //
     InitializeComponent();
     AcceptButton = buttonOK;
     CancelButton = buttonCancel;
 }
예제 #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;
            jiraPluginAttributes = myAttributes;

            // Register configuration (don't need the configuration itself)
            config    = IniConfig.GetIniSection <JiraConfiguration>();
            resources = new ComponentResourceManager(typeof(JiraPlugin));
            return(true);
        }
예제 #4
0
 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();
 }
예제 #5
0
        /// <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);
        }
예제 #6
0
 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();
 }
예제 #7
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 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);
        }
예제 #8
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;
			jiraPluginAttributes = myAttributes;

			// Register configuration (don't need the configuration itself)
			config = IniConfig.GetIniSection<JiraConfiguration>();
			resources = new ComponentResourceManager(typeof(JiraPlugin));
			return true;
		}