//detailed alarm info private void button12_Click(object sender, EventArgs e) { //four paramters: //1: database name //2: where comes this requirement, from alarm or quality //3: alarmID means alarm index in alarm table //4: this is a quaity data or craft data triggered alarm SPCAnalyze SPCAnalyzeClass = new SPCAnalyze(alarmDatabaseName, gVariable.FROM_ALARM_DISPLAY_FUNC, alarmID, type); SPCAnalyzeClass.Show(); }
//display original data and curve private void button4_Click(object sender, EventArgs e) { int index; try { if (this.listView1.SelectedItems.Count > 0) { index = this.listView1.SelectedItems[0].Index; //four paramters: //1: database name //2: where comes this requirement, from alarm or quality //3: alarmIDArray[index] means alarm index in alarm table //4: this is a quaity data or craft data triggered alarm SPCAnalyze SPCAnalyzeClass = new SPCAnalyze(dName, gVariable.FROM_ALARM_DISPLAY_FUNC, alarmIDArray[index], type); SPCAnalyzeClass.Show(); } } catch (Exception ex) { Console.Write("show detailed alarm info failed. " + ex); } }
private void room_Selected(int i) { if (gVariable.mainFunctionIndex == gVariable.PRODUCT_CURRENT_STATUS) { if (gVariable.CompanyIndex == gVariable.ZIHUA_ENTERPRIZE) { if (i > gVariable.allMachineIDForZihua.Length) { return; } gVariable.currentCurveDatabaseName = gVariable.DBHeadString + gVariable.allMachineIDForZihua[i - 1].ToString().PadLeft(3, '0');; } //this button is not defined if (gVariable.currentCurveDatabaseName.Remove(0, 1) != "000") { gVariable.boardIndexSelected = Convert.ToInt32(gVariable.currentCurveDatabaseName.Remove(0, 1)) - 1; //if this dispatch already started, we don't neeed to get dummy data if (gVariable.machineCurrentStatus[gVariable.boardIndexSelected] <= gVariable.MACHINE_STATUS_DISPATCH_DUMMY) { toolClass.getDummyData(gVariable.boardIndexSelected); } preparationForCurvedisplay(gVariable.currentCurveDatabaseName); } } else if (gVariable.mainFunctionIndex == gVariable.MACHINE_MANAGEMENT_MAINTENANCE) { machineManagement.machineManagementClass = new machineManagement(i - 1, gVariable.MACHINE_MANAGEMENT_MAINTENANCE); machineManagement.machineManagementClass.Show(); this.Hide(); } else if (gVariable.mainFunctionIndex == gVariable.MACHINE_MANAGEMENT_REPAIRING) { machineManagement.machineManagementClass = new machineManagement(i - 1, gVariable.MACHINE_MANAGEMENT_REPAIRING); machineManagement.machineManagementClass.Show(); this.Hide(); } else if (gVariable.mainFunctionIndex == gVariable.MACHINE_MANAGEMENT_ITEM_CHECKING) { machineManagement.machineManagementClass = new machineManagement(i - 1, gVariable.MACHINE_MANAGEMENT_ITEM_CHECKING); machineManagement.machineManagementClass.Show(); this.Hide(); } else if (gVariable.mainFunctionIndex == gVariable.QUALITY_MANAGEMENT_SPC_CONTROL) { if (gVariable.CompanyIndex == gVariable.ZIHUA_ENTERPRIZE) { if (i > gVariable.allMachineIDForZihua.Length) { return; } gVariable.currentCurveDatabaseName = gVariable.DBHeadString + gVariable.allMachineIDForZihua[i - 1].ToString().PadLeft(3, '0');; } //four paramters: //1: database name //2: where comes this requirement, from alarm or quality //3: if this function is triggered by alarm, id means index in alarm table //4: this is a quaity data or craft data triggered alarm SPCAnalyze SPCAnalyzeClass = new SPCAnalyze(gVariable.internalMachineName[i - 1], gVariable.FROM_QUALITY_MANAGEMENT_FUNC, 0, gVariable.ALARM_TYPE_QUALITY_DATA); //we only know we are working on the first board/machine, no other info if (SPCAnalyzeClass != null && SPCAnalyzeClass.getSPCFuncClassStatus() == 0) //when data number too small, SPC analyze will fail { SPCAnalyzeClass.Show(); if (SPCAnalyzeClass.checkResult() >= 0) //SPC analyze function performed correctly { this.Hide(); } } } }