public Student_profile() { InitializeComponent(); // set postion this.Location = new System.Drawing.Point(ClientSize.Width / 2 - this.Width / 2, ClientSize.Height / -this.Height); this.WindowState = FormWindowState.Normal; this.StartPosition = FormStartPosition.CenterScreen; SQL.ProfileInformation_Show(Login_usercontrol.Username); //bunifuElipse1.ApplyElipse(pictureBox1, 20); Dashboard_btn.color = btn_activeColor(); dashboard_usercontrol2.BringToFront(); minimize_picbox.BringToFront(); exit_picbox.BringToFront(); //------------------ Loginform loginform = new Loginform(); loginform.Close(); // check first login if (SQL.Check_IsFirstLogin(Login_usercontrol.Username) == true) // mean this is first login { SQL.Set_IsFristLogin(false, Login_usercontrol.Username); ProfileIntero profileIntero = new ProfileIntero(); profileIntero.ShowDialog(); if (ProfileIntero.Intero_StepPos == 4 && SQL.Check_IsFirstLogin(Login_usercontrol.Username) == false) { FirstAccountConfig firstAccountConfig = new FirstAccountConfig(); firstAccountConfig.ShowDialog(); } } }
private void button1_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Are u sure ?", "Logout", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { this.Hide(); Loginform loginform = new Loginform(); loginform.ShowDialog(); } }
private void timer1_Tick(object sender, EventArgs e) { count--; if (count == 0) { timer1.Enabled = false; this.Hide(); Loginform loginform = new Loginform(); loginform.ShowDialog(); this.Close(); } }