//txtComments mouse click...

        private void txtComments_MouseClick(object sender, MouseEventArgs e)
        {
            Close();

            Add_Comment nf = new Add_Comment();

            nf.Show();
        }
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Close();

            Add_Comment nf = new Add_Comment();

            nf.Show();
        }
Exemple #3
0
        private void pbSwitchM_Click(object sender, EventArgs e)
        {
            Close();

            if (radioButton1.Checked == true)
            {
                Register nf = new Register();
                nf.Show();
            }
            else if (radioButton2.Checked == true)
            {
                Add_Comment nf = new Add_Comment();
                nf.Show();
            }
            else
            {
                View_All nf = new View_All();
                nf.Show();
            }
        }
Exemple #4
0
        //KeyDown event...

        private void Signin_and_Select_Task_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (SignedIn == "Yes")
                {
                    Close();

                    if (radioButton1.Checked == true)
                    {
                        Register nf = new Register();
                        nf.Show();
                    }
                    else if (radioButton2.Checked == true)
                    {
                        Add_Comment nf = new Add_Comment();
                        nf.Show();
                    }
                    else
                    {
                        View_All nf = new View_All();
                        nf.Show();
                    }
                }
                else
                {
                    if (txtUserName.Text != "" && txtPassword.Text != "")
                    {
                        txtUserName.Text = txtUserName.Text.ToLower();
                        txtPassword.Text = txtPassword.Text.ToLower();

                        if ((txtUserName.Text == "a") && (txtPassword.Text == "a"))
                        {
                            //Enable Switch Pane...

                            radioButton1.Enabled = true;
                            radioButton2.Enabled = true;
                            radioButton3.Enabled = true;

                            radioButton1.Checked = true;

                            pbSwitch.Visible = true;

                            //Signed In...

                            SignedIn = "Yes";

tryagain:
                            try
                            {
                                ExecuteUpdate(SignedIn);
                            }
                            catch (Exception ex)
                            {
                                goto tryagain;
                            }

                            //Lock Controls...

                            txtUserName.Enabled = false;
                            txtPassword.Enabled = false;
                            pbSignin.Visible    = false;

                            MessageBox.Show("You are signed in now!");
                        }
                        else
                        {
                            MessageBox.Show("Username & Passsword didn't match. Please try again!");

                            txtUserName.Text = "";
                            txtPassword.Text = "";
                        }
                    }
                }
            }
        }