Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            onStartLoading();
            Result <string> result = ZenTaoManage.login(websiteUrl.Text, username.Text, password.Text);

            this.toolStripProgressBar1.Value = 100;
            if (result.isSuccess())
            {
                MessageBox.Show(Plugin.lang.getText("LoginSuccess"));
            }
            else
            {
                MessageBox.Show(result.msg);
            }

            onEndLoading();
        }
Esempio n. 2
0
        /// <summary>
        /// 进入BUG和任务详情界面
        /// </summary>
        /// <param name="url"></param>
        /// <param name="user"></param>
        /// <param name="password"></param>
        public void enterIssueForm(string url, string user, string password)
        {
            zenTaoManage = new ZenTaoManage(url, user, password);
            Result <string> loginRes = zenTaoManage.login();

            if (!loginRes.isSuccess())
            {
                MessageBox.Show(Plugin.lang.getText("login failed") + ":" + loginRes.msg);
            }
            else
            {
                siteManage.Hide();
                DialogResult result = issForm.ShowDialog();
                if (result == DialogResult.OK)
                {
                    siteManage.DialogResult = DialogResult.OK;
                }
            }
        }