Ejemplo n.º 1
0
        private void manufacturingInfoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                FormOperaterID formWorkerID = new FormOperaterID();
                formWorkerID.ShowDialog();

                testID      = formWorkerID.WorkerID;
                testStation = formWorkerID.WorkStation;
                testSite    = formWorkerID.WorkSite;

                toolStripStatusLabelTestSite.Text    = "Test Site: " + testSite;
                toolStripStatusLabelTestStation.Text = "Test Station: " + testStation;
                toolStripStatusLabelTestID.Text      = "Test ID: " + testID;
            }
            catch (Exception ex)
            {
                Log.error(ex.Message);
            }
        }
Ejemplo n.º 2
0
        private void manufacturingInfoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                FormOperaterID formWorkerID = new FormOperaterID();
                formWorkerID.ShowDialog();

                testID = formWorkerID.WorkerID;
                testStation = formWorkerID.WorkStation;
                testSite = formWorkerID.WorkSite;

                toolStripStatusLabelTestSite.Text = "Test Site: " + testSite;
                toolStripStatusLabelTestStation.Text = "Test Station: " + testStation;
                toolStripStatusLabelTestID.Text = "Test ID: " + testID;

            }
            catch (Exception ex)
            {
                Log.error(ex.Message);
            }
        }
Ejemplo n.º 3
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            Process process = RunningInstance();
            if (process != null)
            {
                DialogResult status = MessageBox.Show("Another Instance of Current Software is Already Running. Still Continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                if (status == DialogResult.No)
                {
                    this.Close();
                    return;
                }
            }

            //initialize GUI disaplay
            toolStripMenuItemEMode.CheckState = CheckState.Unchecked;
            toolStripMenuItemPMode.CheckState = CheckState.Checked;

            //tabControlMain.TabPages.Remove(tabPageDeviceSetting);

            //DeviceConfig.filePath = Application.StartupPath + "\\Production.ini";

            try
            {
                RegistryKey readKey = Registry.LocalMachine.OpenSubKey(@"software\Cypress\TrackpadTest");
                totalTestedNumber = Convert.ToInt32(readKey.GetValue("Total Tested"));
                totalFailedNumber = Convert.ToInt32(readKey.GetValue("Total Failed"));
                yieldRate = Convert.ToDouble(readKey.GetValue("Yield Rate"));
                SetManufacturingSummary();

            }
            catch
            {
                RegistryKey saveKey = Registry.LocalMachine.CreateSubKey(@"software\Cypress\TrackpadTest");

                saveKey.SetValue("Total Tested", "0");
                saveKey.SetValue("Total Failed", "0");
                saveKey.SetValue("Yield Rate", "0");
                totalTestedNumber = 0;
                totalFailedNumber = 0;
                yieldRate = 0;
                SetManufacturingSummary();
            }

            try
            {
                RegistryKey readKey = Registry.LocalMachine.OpenSubKey(@"software\Cypress\TrackpadTest");
                testID = readKey.GetValue("Test ID").ToString();
                testStation = readKey.GetValue("Test Station").ToString();
                testSite = readKey.GetValue("Test Site").ToString();
            }
            catch
            {
                FormOperaterID formWorkerID = new FormOperaterID();
                formWorkerID.ShowDialog();

                testID = formWorkerID.WorkerID;
                testStation = formWorkerID.WorkStation;
                testSite = formWorkerID.WorkSite;
            }

            toolStripStatusLabelTestSite.Text = "Test Site: " + testSite;
            toolStripStatusLabelTestStation.Text = "Test Station: " + testStation;
            toolStripStatusLabelTestID.Text = "Test ID: " + testID;

            textBoxSNA.Focus();
        }
Ejemplo n.º 4
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            Process process = RunningInstance();

            if (process != null)
            {
                DialogResult status = MessageBox.Show("Another Instance of Current Software is Already Running. Still Continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                if (status == DialogResult.No)
                {
                    this.Close();
                    return;
                }
            }

            //initialize GUI disaplay
            toolStripMenuItemEMode.CheckState = CheckState.Unchecked;
            toolStripMenuItemPMode.CheckState = CheckState.Checked;

            //tabControlMain.TabPages.Remove(tabPageDeviceSetting);

            //DeviceConfig.filePath = Application.StartupPath + "\\Production.ini";

            try
            {
                RegistryKey readKey = Registry.LocalMachine.OpenSubKey(@"software\Cypress\TrackpadTest");
                totalTestedNumber = Convert.ToInt32(readKey.GetValue("Total Tested"));
                totalFailedNumber = Convert.ToInt32(readKey.GetValue("Total Failed"));
                yieldRate         = Convert.ToDouble(readKey.GetValue("Yield Rate"));
                SetManufacturingSummary();
            }
            catch
            {
                RegistryKey saveKey = Registry.LocalMachine.CreateSubKey(@"software\Cypress\TrackpadTest");

                saveKey.SetValue("Total Tested", "0");
                saveKey.SetValue("Total Failed", "0");
                saveKey.SetValue("Yield Rate", "0");
                totalTestedNumber = 0;
                totalFailedNumber = 0;
                yieldRate         = 0;
                SetManufacturingSummary();
            }


            try
            {
                RegistryKey readKey = Registry.LocalMachine.OpenSubKey(@"software\Cypress\TrackpadTest");
                testID      = readKey.GetValue("Test ID").ToString();
                testStation = readKey.GetValue("Test Station").ToString();
                testSite    = readKey.GetValue("Test Site").ToString();
            }
            catch
            {
                FormOperaterID formWorkerID = new FormOperaterID();
                formWorkerID.ShowDialog();

                testID      = formWorkerID.WorkerID;
                testStation = formWorkerID.WorkStation;
                testSite    = formWorkerID.WorkSite;
            }

            toolStripStatusLabelTestSite.Text    = "Test Site: " + testSite;
            toolStripStatusLabelTestStation.Text = "Test Station: " + testStation;
            toolStripStatusLabelTestID.Text      = "Test ID: " + testID;

            textBoxSNA.Focus();
        }