private void btnSave_Click(object sender, EventArgs e)
        {
            Banckle.Auth auth = new Banckle.Auth();
            auth.APIKey = tbAPIKey.Text;
            lblStatus.Text = "Connecting to Banckle...";
            if (auth.authenticate())
            {
                lblStatus.Text = "Connected!";
                Properties.Settings.Default.APIKey = auth.APIKey;
                Properties.Settings.Default.Save();
                lblStatus.Text = "Saved!";
            }
            else
            {
                lblStatus.Text = "Authentication faild :(";
                MessageBox.Show("Authentication faild :(", "Authentication");
            }

            this.Dispose();
        }
Exemplo n.º 2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            Banckle.Auth auth = new Banckle.Auth();
            auth.APIKey    = tbAPIKey.Text;
            lblStatus.Text = "Connecting to Banckle...";
            if (auth.authenticate())
            {
                lblStatus.Text = "Connected!";
                Properties.Settings.Default.APIKey = auth.APIKey;
                Properties.Settings.Default.Save();
                lblStatus.Text = "Saved!";
            }
            else
            {
                lblStatus.Text = "Authentication faild :(";
                MessageBox.Show("Authentication faild :(", "Authentication");
            }

            this.Dispose();
        }
Exemplo n.º 3
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            Banckle.Auth auth = new Banckle.Auth();
            auth.APIKey = String.IsNullOrEmpty(tbAPIKey.Text) ? "xxxxxx" : tbAPIKey.Text;
            auth.getToken(String.IsNullOrEmpty(tbBanckleId.Text) ? "xxxxxx" : tbBanckleId.Text, String.IsNullOrEmpty(tbPassword.Text) ? "xxxxxx" : tbPassword.Text);

            lblStatus.Text = "Connecting to Banckle...";
            if (auth.authenticate(tbBanckleId.Text, tbPassword.Text))
            {
                lblStatus.Text = "Connected!";
                Properties.Settings.Default.APIKey   = auth.APIKey;
                Properties.Settings.Default.Id       = tbBanckleId.Text;
                Properties.Settings.Default.Password = tbPassword.Text;
                Properties.Settings.Default.Save();
                lblStatus.Text = "Saved!";
            }
            else
            {
                lblStatus.Text = "Authentication faild :(";
                MessageBox.Show("Authentication faild :(", "Authentication");
            }

            this.Dispose();
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            Banckle.Auth auth = new Banckle.Auth();
            auth.APIKey = String.IsNullOrEmpty(tbAPIKey.Text) ? "xxxxxx" : tbAPIKey.Text;
            auth.getToken(String.IsNullOrEmpty(tbBanckleId.Text) ? "xxxxxx" : tbBanckleId.Text, String.IsNullOrEmpty(tbPassword.Text) ? "xxxxxx" : tbPassword.Text);

            lblStatus.Text = "Connecting to Banckle...";
            if (auth.authenticate(tbBanckleId.Text, tbPassword.Text))
            {
                lblStatus.Text = "Connected!";
                Properties.Settings.Default.APIKey = auth.APIKey;
                Properties.Settings.Default.Id = tbBanckleId.Text;
                Properties.Settings.Default.Password = tbPassword.Text;
                Properties.Settings.Default.Save();
                lblStatus.Text = "Saved!";
            }
            else
            {
                lblStatus.Text = "Authentication faild :(";
                MessageBox.Show("Authentication faild :(", "Authentication");
            }

            this.Dispose();
        }