예제 #1
0
        private void LogOutButton_Click(object sender, EventArgs e)
        {
            this.Hide();

            //Declaring a variable for LoginForm
            LogInForm form1 = new LogInForm();

            //Showing LoginForm
            form1.ShowDialog();
        }
        // Code to add Log out functionality
        private void LogOutButton_Click(object sender, EventArgs e)
        {
            DialogResult resultLogout = MessageBox.Show("Do you wish to Log out??", "Log out confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

            if (resultLogout == DialogResult.Yes)
            {
                this.Hide();

                //Declaring a variable for LoginForm
                LogInForm form1 = new LogInForm();

                //Showing WelcomeForm
                form1.ShowDialog();
            }

            else
            {
            }
        }