Exemplo n.º 1
0
 private void useAPIKeysToolStripMenuItem_Click(object sender, EventArgs e)
 {
     CredentialsForm credentialsForm = new CredentialsForm("API Key", "Secret Key", false, false);
     DialogResult r = credentialsForm.ShowDialog();
     if (r == DialogResult.OK) {
         try {
             client = new Client(new Uri(textBoxUrl.Text), credentialsForm.UserName, credentialsForm.Password);
             WriteToLogBox("Warning: credentials have not be validated!!");
             UpdateCurentUser(credentialsForm.UserName.Substring(0, 10));
         } catch (Exception ex) {
             WriteToLogBox(ex.ToString());
         }
     }
 }
Exemplo n.º 2
0
 private void ssoToolStripMenuItem_Click(object sender, EventArgs e)
 {
     CredentialsForm credentialsForm = new CredentialsForm("User Name", "SSO Key", true, false);
     DialogResult r = credentialsForm.ShowDialog();
     if (r == DialogResult.OK) {
         try {
             client = new Client(new Uri(textBoxUrl.Text));
             client.LoginWithSso(credentialsForm.UserName, credentialsForm.Password, credentialsForm.DomainName);
             UpdateCurentUser(credentialsForm.UserName);
         } catch (Exception ex) {
             WriteToLogBox(ex.ToString());
         }
     }
 }