예제 #1
0
        /// <summary>
        /// When clicking the back button you return to the previous screen and close this one
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_back_Click(object sender, EventArgs e)
        {
            //Back to previous screen
            this.Hide();
            var User_Selection = new User_Login();

            User_Selection.Closed += (s, args) => this.Close();
            User_Selection.Show();
        }
예제 #2
0
        /// <summary>
        /// Logout user (eventhandler click)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_logout_Click(object sender, EventArgs e)
        {
            //Hide the current form
            this.Hide();

            //Make instance of new form
            var userlogin = new User_Login();

            userlogin.Closed += (s, args) => this.Close();

            //Open new form
            userlogin.Show();
        }