コード例 #1
0
ファイル: fMainWindow.cs プロジェクト: fjknc/giaThuZ119
        private void tảiToolStripMenuItem_Click(object sender, EventArgs e)
        {
            (sender as ToolStripMenuItem).Enabled = false;
            fLoadForm frm = new fLoadForm();

            frmTai.FormClosing += FrmTai_FormClosing;
            frm.MdiParent       = this;
            frm.Show();
        }
コード例 #2
0
ファイル: fMainWindow.cs プロジェクト: kimphg/giaThuZ119
        private void tảiToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form fc = Application.OpenForms["fLoadForm"];

            if (fc == null)
            {
                fLoadForm frm = new fLoadForm();
                frm.MdiParent = this;
                frm.Show();
            }
            else
            {
                fc.Show();
                fc.BringToFront();
            }
        }
コード例 #3
0
ファイル: fMainWindow.cs プロジェクト: kimphg/giaThuZ119
        private void createLoadForm()
        {
            frmTai              = new fLoadForm();
            frmTai.FormClosing += FrmTai_FormClosing;
            frmTai.MdiParent    = this;
            frmTai.LoadData();//todo here
            frmTai.WindowState   = FormWindowState.Normal;
            frmTai.StartPosition = FormStartPosition.Manual;

            frmTai.Location = Common.Const.proConf.locationLoad;

            if (frmTai.Location.Y < 0)
            {
                frmTai.Location = new Point(50, 50);
            }
            frmTai.Show();
        }
コード例 #4
0
ファイル: fMainWindow.cs プロジェクト: fjknc/giaThuZ119
        // Sau khi chon project thi bao len laf da chon
        void frm_SelectedProject(object sender, EventArgs e)
        {
            (sender as Project.fOpen).Close();

            EnabledMenu();

            tsmenuItemSystem.Enabled = false;

            if (frmPower != null)
            {
                frmPower.Close();
            }
            if (frmSwitch != null)
            {
                frmSwitch.Close();
            }
            if (frmTai != null)
            {
                frmTai.Close();
            }
            if (fcheck != null)
            {
                fcheck.Close();
            }

            //MessageBox.Show("Đã chọn dự án");

            frmPower  = new fPower1();
            frmSwitch = new fSwitchForm();
            frmTai    = new fLoadForm();
            fcheck    = new fCheckForm();

            frmPower.FormClosing  += FrmPower_FormClosing;
            frmSwitch.FormClosing += FrmSwitch_FormClosing;
            frmTai.FormClosing    += FrmTai_FormClosing;
            fcheck.FormClosing    += Fcheck_FormClosing;

            tsmenuItemControlPower.Enabled  = false;
            tsmenuItemControlSwitch.Enabled = false;
            tảiToolStripMenuItem.Enabled    = false;
            tsmenuItemControlCheck.Enabled  = false;

            frmPower.MdiParent  = this;
            frmSwitch.MdiParent = this;
            frmTai.MdiParent    = this;
            fcheck.MdiParent    = this;


            frmPower.Show();
            frmPower.Location = new Point(0, 0);

            frmSwitch.Show();
            frmSwitch.Location = new Point(929, 0);

            frmTai.Show();
            frmTai.Location = new Point(1247, 0);


            fcheck.Show();
            fcheck.Location = new Point(100, 100);

            fcheck.StartAll += fcheck_StartAll;
            fcheck.StopAll  += fcheck_StopAll;
        }