コード例 #1
0
        private void lsThresholdTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (productComboBox.Text != "")
            {
                double threshold = 10.00;

                if (e.KeyChar >= (Char)48 && e.KeyChar <= (Char)57 || e.KeyChar == (Char)8)
                {
                    e.Handled = false;
                }
                else if (e.KeyChar == (Char)13)
                {
                    Double.TryParse(lsThresholdTextBox.Text, out threshold);

                    if (Parameter.CurrentDevice == DeviceType.HL9309)
                    {
                        Parameter.DeviceHL9309.Stability_Threshold = threshold;
                    }
                    else
                    {
                        Parameter.DeviceHL9308.Stability_Threshold = threshold;
                    }

                    Sqlite.UpdateStabilityThreshold(Parameter.CurrentDevice, productComboBox.Text, threshold);

                    this.ActiveControl = logoPictureBox;
                }
                else if (e.KeyChar == (Char)46)
                {
                    if (lsThresholdTextBox.Text.Contains('.'))
                    {
                        e.Handled = true;
                    }
                    else
                    {
                        e.Handled = false;
                    }
                }
                else
                {
                    e.Handled = true;
                }
            }
            else
            {
                e.Handled = true;
            }
        }
コード例 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            String name = Process.GetCurrentProcess().ProcessName;

            Process[] ps = Process.GetProcessesByName(name);
            if (ps.Length > 1)
            {
                System.Environment.Exit(2);
            }

            Sqlite.Open();
            OracleClient.Open();

            _LatestThread = new Thread(new ThreadStart(HL930_Run));
            _LatestThread.Start();
        }
コード例 #3
0
        private void ePercentTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (productComboBox.Text != "")
            {
                int percent = 10;

                if (e.KeyChar >= (Char)48 && e.KeyChar <= (Char)57 || e.KeyChar == (Char)8)
                {
                    e.Handled = false;
                }
                else if (e.KeyChar == (Char)13)
                {
                    Int32.TryParse(ePercentTextBox.Text, out percent);

                    if (Parameter.CurrentDevice == DeviceType.HL9309)
                    {
                        Parameter.DeviceHL9309.Energy_Percent = percent;
                    }
                    else
                    {
                        Parameter.DeviceHL9308.Energy_Percent = percent;
                    }

                    Sqlite.UpdateEnergyPercent(Parameter.CurrentDevice, productComboBox.Text, percent);

                    this.ActiveControl = logoPictureBox;
                }
                else
                {
                    e.Handled = true;
                }
            }
            else
            {
                e.Handled = true;
            }
        }
コード例 #4
0
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (_Run)
            {
                _Run = false;
                _LatestThread.Abort();
            }

            _hl9309WaferDieDic.Clear();
            _hl9309WaferDieDic = null;

            _hl9308WaferDieDic.Clear();
            _hl9308WaferDieDic = null;

            try
            {
                Sqlite.Close();
                OracleClient.Close();
            }
            catch (Exception ex)
            {
                EventLog.Write(ex.Message);
            }
        }
コード例 #5
0
        private void refenceTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (productComboBox.Text != "")
            {
                int refence = 10;

                if (e.KeyChar >= (Char)48 && e.KeyChar <= (Char)57 || e.KeyChar == (Char)8)
                {
                    e.Handled = false;
                }
                else if (e.KeyChar == (Char)13)
                {
                    Int32.TryParse(refenceTextBox.Text, out refence);

                    if (Parameter.CurrentDevice == DeviceType.HL9309)
                    {
                        Parameter.DeviceHL9309.Refence = refence;
                    }
                    else
                    {
                        Parameter.DeviceHL9308.Refence = refence;
                    }

                    Sqlite.UpdateRefence(Parameter.CurrentDevice, productComboBox.Text, refence);
                    this.ActiveControl = logoPictureBox;
                }
                else
                {
                    e.Handled = true;
                }
            }
            else
            {
                e.Handled = true;
            }
        }