Example #1
0
        //private void tsmiEntrollment_Click(object sender, EventArgs e)
        public void tsmiEntrollment_Click(object sender, EventArgs e)
        {
            //-- 若已開啟登入頁面,關閉
            if (Application.OpenForms["Database"] as Database != null)
            {
                Application.OpenForms["Database"].Close();
            }

            //-- 開啟註冊頁面
            if (Application.OpenForms["Entrollment"] as Entrollment != null)
            {
                this.Size = EntrollformSize;

                Application.OpenForms["Entrollment"].WindowState = FormWindowState.Maximized;
            }
            else
            {
                // open
                Entrollment Entrollform = new Entrollment();
                Entrollform.MdiParent = this;

                //-- 設定呈現大小
                EntrollformSize         = Entrollform.Size;
                this.Size               = Entrollform.Size;
                Entrollform.WindowState = FormWindowState.Maximized;

                Entrollform.Show();
            }
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //-- 若已開啟登入頁面,關閉
            if (Application.OpenForms["Database"] as Database != null)
            {
                Application.OpenForms["Database"].Close();
            }

            //-- 開啟註冊頁面
            if (Application.OpenForms["Entrollment"] as Entrollment != null)
            {
                FC.Size = EntrollformSize;

                Application.OpenForms["Entrollment"].WindowState = FormWindowState.Maximized;
            }
            else
            {
                // open
                Entrollment Entrollform = new Entrollment();
                Entrollform.MdiParent = FC;

                ////-- 設定呈現大小
                EntrollformSize         = Entrollform.Size;
                FC.Size                 = Entrollform.Size;
                Entrollform.WindowState = FormWindowState.Maximized;

                //Entrollform.Size = new System.Drawing.Size(1028, 538);

                Entrollform.Show();
            }
        }