예제 #1
0
        public JiraForm(JiraConnector jiraConnector)
        {
            InitializeComponent();
            this.Icon    = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
            AcceptButton = uploadButton;
            CancelButton = cancelButton;

            initializeComponentText();

            this.columnSorter = new GreenshotColumnSorter();
            this.jiraListView.ListViewItemSorter = columnSorter;

            this.jiraConnector = jiraConnector;

            changeModus(false);
            try {
                if (!jiraConnector.isLoggedIn)
                {
                    jiraConnector.login();
                }
            } catch (Exception e) {
                MessageBox.Show(Language.GetFormattedString("jira", LangKey.login_error, e.Message));
            }
            uploadButton.Enabled = false;
            updateForm();
        }
예제 #2
0
        /// <summary>
        /// Implementation of the IPlugin.Configure
        /// </summary>
        public virtual void Configure()
        {
            string url = config.Url;

            if (config.ShowConfigDialog())
            {
                // check for re-login
                if (jiraConnector != null && jiraConnector.isLoggedIn && !string.IsNullOrEmpty(url))
                {
                    if (!url.Equals(config.Url))
                    {
                        jiraConnector.logout();
                        jiraConnector.login();
                    }
                }
            }
        }