Beispiel #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            
            selectPageCategory.Visible = false;
            this.Visible = false;
            using (var logfrm = new LogonForm())
            {
                if (logfrm.ShowDialog() == DialogResult.OK)
                {
                    this.StartPosition = FormStartPosition.CenterScreen;
                    this.Visible = true;
                    this.Location = new Point(Screen.PrimaryScreen.WorkingArea.Size.Width / 2 - this.Size.Width / 2, Screen.PrimaryScreen.WorkingArea.Size.Height / 2 - this.Size.Height / 2);

                }
                else
                {
                    islogcancel = true;
                }
            }
            if (islogcancel)
                this.Close();
        }
Beispiel #2
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     selectPageCategory.Visible = false;
     this.Visible = false;
     using (var logfrm = new LogonForm())
     {
         if (logfrm.ShowDialog() == DialogResult.OK)
         {
             this.StartPosition = FormStartPosition.CenterScreen;
             this.Visible       = true;
             this.Location      = new Point(Screen.PrimaryScreen.WorkingArea.Size.Width / 2 - this.Size.Width / 2, Screen.PrimaryScreen.WorkingArea.Size.Height / 2 - this.Size.Height / 2);
         }
         else
         {
             islogcancel = true;
         }
     }
     if (islogcancel)
     {
         this.Close();
     }
 }