Esempio n. 1
0
        private void LoginButton_Click(object sender, EventArgs e)
        {
            int currentUserID = -1;
            var loginResponse = accountManager.Login(new LoginFormData {
                Username = usernameTextBox.Text, Password = passwordTextBox.Text
            }, true);
            var response = loginResponse.TransactionObject;

            //var response = accountManager.CheckCreedientals(new LoginFormData { Username=usernameTextBox.Text, Password=passwordTextBox.Text });

            currentUserID = response.IsSuccess == true ? loginResponse.ID : -1;

            if (currentUserID != -1)
            {
                if (screenShareComplexManager.IsRequestExists(currentUserID))
                {
                    this.Hide();
                    PendingConnections pc = new PendingConnections(currentUserID);
                    pc.FormClosed += (s, args) => this.Close();
                    pc.Show();
                }
                else
                {
                    this.Hide();
                    CategorySelector cs = new CategorySelector(currentUserID);
                    cs.FormClosed += (s, args) => this.Close();
                    cs.Show();
                }
            }
            else
            {
                MessageBox.Show("Your login creedientals are wrong!", "Login Error");
            }
        }
Esempio n. 2
0
        private void btnSkipRequests_Click(object sender, EventArgs e)
        {
            this.Hide();
            CategorySelector cs = new CategorySelector(userID);

            cs.FormClosed += (s, args) => this.Close();
            cs.Show();
        }