Esempio n. 1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            Users cUser = new Users();

            if (UserLogin(cUser))
            {
                userToken  = accountManager.GetToken(txtEmail.Text);
                userSecret = accountManager.GetSecret(txtEmail.Text);

                MessageBox.Show("Login Successful");

                DropTray dTray = new DropTray();
                dTray.Email        = txtEmail.Text;
                dTray.UserToken    = userToken;
                dTray.UserSecret   = userSecret;
                dTray.UserPassword = txtPassword.Text;
                dTray.Show();

                this.Hide();
                return;
            }
            else
            {
                MessageBox.Show("Login Unsuccessful" + Environment.NewLine + "Please check your details and internet connection!", "Error");
            }
        }
Esempio n. 2
0
        private void DropTray_Load(object sender, EventArgs e)
        {
            UserToken  = accMan.GetToken(Email);
            UserSecret = accMan.GetSecret(Email);

            _Client = new DropNetClient(appKey, appSecret, UserToken, UserSecret);

            if (UserToken == "Error" && UserSecret == "Error")
            {
                MessageBox.Show(returnError());
            }
            else
            {
                Rectangle workingArea = Screen.GetWorkingArea(this);
                this.Location = new Point(workingArea.Right - Size.Width,
                                          workingArea.Bottom - Size.Height);

                this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            }
        }