Exemplo n.º 1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            CBox_JOG.SelectedIndex = 0;
            MCCL.MCC_EnableLimitSwitchCheck(0);

            //連線EMP-Z
            MCCLManager.ConnectEMPZ();
            PB_PowerLight.Image = Image.FromFile(Application.StartupPath + "\\Picture\\Power_Light2.png");

            //執行緒
            bgwThred.RunWorkerAsync();

            //將所有分頁加載入MainPanel
            MainPanel.Controls.Add(coordinate);
            MainPanel.Controls.Add(gCode);
            MainPanel.Controls.Add(information);
            MainPanel.Controls.Add(monitor);
            MainPanel.Controls.Add(tool);

            //顯示所有分頁
            coordinate.Show();
            gCode.Show();
            information.Show();
            monitor.Show();
            tool.Show();

            //僅先顯示coordinate頁面
            coordinate.Visible  = true;
            gCode.Visible       = false;
            information.Visible = false;
            monitor.Visible     = false;
            tool.Visible        = false;
        }