Esempio n. 1
0
        private void Login_Click(object sender, EventArgs e)
        {
            //perform calls to verify user credentials
            masterObject.pass = Password.Text;
            var res  = masterObject.JRvalid(masterObject.jiraLogin);
            var rest = masterObject.TRvalid(masterObject.testrailLogin);

            //jira 19 validation
            if (res.IsSuccessStatusCode == false)
            {
                ResetForm("Jira cred, Retry!");
            }
            string credet = CredentialCache.DefaultCredentials.ToString();

            //testrail validation, if credentials are good, rest is not null
            if (rest == null)
            {
                ResetForm("Testrail cred Retry");
            }
            if (res.IsSuccessStatusCode && rest != null)
            {
                LoginPanel.Hide();
                TestrailPanel.Show();
                JiraPanel.Show();
                GetPlansB.Hide();
            }
            masterObject.pass = Password.Text;
        }
Esempio n. 2
0
        public MainContainer()
        {
            masterObject = new AllTheShinies();
            masterObject.LoginPreparations();
            string name = masterObject.givenName;

            InitializeComponent();
            TestrailPanel.Hide();
            JiraPanel.Hide();
            LoginPanel.Show();
            GenRep.Show();
            GenRepPlan.Hide();
            GenRepJira.Enabled = false;
            TestplanList.Hide();
            ReadtheJira.Enabled = false;
            userBox.Text        = "Welcome " + name;
        }