示例#1
0
        private void FocusReturnButton_Click(object sender, EventArgs e)
        {
            SetupPage setup = new SetupPage();

            setup.Show();
            setup.SetDesktopLocation(this.Bounds.X, this.Bounds.Y);

            FocusTimer.Stop();
            Taskbar.Show();
            this.Hide();
        }
示例#2
0
        private void FocusTimer_Tick(object sender, EventArgs e)
        {
            if (ticks++ == maxTicks)
            {
                Taskbar.Show();
                BreakPage breakPage = new BreakPage();
                breakPage.Show();
                breakPage.SetDesktopLocation(this.Bounds.X, this.Bounds.Y);
                breakPage.Activate();

                FocusTimer.Stop();
                Taskbar.Show();
                this.Hide();
            }
            this.Activate();
        }
示例#3
0
        private void button_Start_Click(object sender, EventArgs e)
        {
            if (button_Start.Text == "Start")
            {
                masterCode = comboBox_Master.Text;
                boxCode    = comboBox_BoxCode.Text;
                lotCode    = comboBox_LotCode.Text;

                masterIndex = comboBox_Master.SelectedIndex;
                boxIndex    = comboBox_BoxCode.SelectedIndex;
                lotIndex    = comboBox_LotCode.SelectedIndex;

                try
                {
                    this.tray_1Box   = Int32.Parse(textBox_TRAYperBox.Text);
                    this.sample_Tray = Int32.Parse(textBox_SAMPLEperTray.Text);
                }
                catch
                {
                    if (function.BOX_LOT_CODE == false && function.COUNT_SETUP == false)
                    {
                        MessageBox.Show(this, "Must write down \"Box Qty\" and \"Lot Qty\" Number!", "[Error]", MessageBoxButtons.OK);
                        return;
                    }
                }

                this.sample_1Box          = this.tray_1Box * this.sample_Tray;
                textBox_SAMPLEperBOX.Text = this.sample_1Box.ToString();

                currentLotNumber = 1;
                sumOfLot         = 1;
                currentSeqQty    = 0;
                currentTestCount = 0;
                failCount        = 0;
                passCount        = 0;
                sumOfPassCount   = 0;

                if (function.COUNT_SETUP == false)
                {
                    this.label_TrayNumber.Text = this.sumOfLot.ToString();
                    this.label_TestCount.Text  = this.currentSeqQty.ToString();
                }
                else
                {
                    this.label_TrayNumber.Text = "";
                    this.label_TestCount.Text  = "";
                }

                this.button_PassFail.Text = "PASS (" + (this.passCount).ToString() + ") / FAIL (" + (this.failCount).ToString() + ")";

                comboBox_Master.DropDownStyle = ComboBoxStyle.Simple;

                if (function.BOX_LOT_CODE == false)
                {
                    comboBox_BoxCode.Enabled       = true;
                    comboBox_LotCode.Enabled       = true;
                    comboBox_BoxCode.DropDownStyle = ComboBoxStyle.Simple;
                    comboBox_LotCode.DropDownStyle = ComboBoxStyle.Simple;
                }
                else
                {
                    comboBox_BoxCode.Text    = "";
                    comboBox_LotCode.Text    = "";
                    comboBox_BoxCode.Enabled = false;
                    comboBox_LotCode.Enabled = false;
                }

                button_Start.BackColor = Color.Tomato;
                button_Start.Text      = "Stop";

                textBox_Scanned.Text = "";

                FocusTimer.Enabled = true;
                FocusTimer.Start();
            }
            else
            {
                masterCode = "";
                boxCode    = "";
                lotCode    = "";

                masterIndex = 0;
                boxIndex    = 0;
                lotIndex    = 0;

                currentLotNumber = 1;
                sumOfLot         = 1;
                currentSeqQty    = 0;

                textBox_SAMPLEperBOX.Text  = "";
                textBox_TRAYperBox.Text    = "";
                textBox_SAMPLEperTray.Text = "";
                this.label_TrayNumber.Text = "0";

                comboBox_Master.DropDownStyle  = ComboBoxStyle.DropDown;
                comboBox_BoxCode.DropDownStyle = ComboBoxStyle.DropDown;
                comboBox_LotCode.DropDownStyle = ComboBoxStyle.DropDown;

                button_Start.BackColor = Color.LimeGreen;
                button_Start.Text      = "Start";

                FocusTimer.Enabled = false;
                FocusTimer.Stop();
            }
        }