public void Parse_Mir_From_String_Test_1() { string recordLine = @"1;“МИР 1“;10"; // 2;“МИР 2“;5 // 3;“Чужбина“;0"; Mir expected = new Mir(1, @"“МИР 1“", 10); // TODO: Initialize to an appropriate value Mir actual; actual = InputParsers.ParseMirFromString(recordLine); Assert.AreEqual(expected, actual); }
private void WriteMir(LotInfo lotinfo) { Mir mir = new Mir(); mir.SETUP_T = lotinfo.SETUP_T; mir.RecordHeader.REC_LEN += 4; mir.START_T = lotinfo.START_T; mir.RecordHeader.REC_LEN += 4; mir.STAT_NUM = 1; mir.RecordHeader.REC_LEN += 1; mir.MODE_COD = lotinfo.MODE_COD; mir.RTST_COD = lotinfo.RTST_COD; mir.LOT_ID = lotinfo.CustomerLotNo.ToString(); mir.RecordHeader.REC_LEN += (ushort)(mir.LOT_ID.Length + 1); mir.PART_TYP = lotinfo.DeviceName.ToString(); mir.RecordHeader.REC_LEN += (ushort)(mir.PART_TYP.Length + 1); mir.NODE_NAM = lotinfo.TesterID.ToString(); mir.RecordHeader.REC_LEN += (ushort)(mir.NODE_NAM.Length + 1); mir.TSTR_TYP = lotinfo.TSTR_TYP; mir.RecordHeader.REC_LEN += (ushort)(mir.TSTR_TYP.Length + 1); mir.JOB_NAM = lotinfo.ProgramName.ToString(); mir.RecordHeader.REC_LEN += (ushort)(mir.JOB_NAM.Length + 1); mir.JOB_REV = lotinfo.JOB_REV; mir.RecordHeader.REC_LEN += (ushort)(mir.JOB_REV.Length); mir.EXEC_TYP = lotinfo.EXEC_TYP; mir.RecordHeader.REC_LEN += (ushort)(mir.EXEC_TYP.Length); mir.EXEC_VER = lotinfo.EXEC_VER; mir.RecordHeader.REC_LEN += (ushort)(mir.EXEC_VER.Length); mir.OPER_NAM = lotinfo.OperatorID.ToString(); mir.RecordHeader.REC_LEN += (ushort)(mir.OPER_NAM.Length); mir.FAMLY_ID = lotinfo.CustomerID.ToString(); mir.RecordHeader.REC_LEN += (ushort)(mir.FAMLY_ID.Length); mir.SBLOT_ID = lotinfo.SubLotNo.ToString(); mir.RecordHeader.REC_LEN += (ushort)(mir.SBLOT_ID.Length); mir.TEST_COD = lotinfo.ModeCode.ToString(); mir.RecordHeader.REC_LEN += (ushort)(mir.TEST_COD.Length); mir.USER_TXT = lotinfo.TestBinNo.ToString(); mir.RecordHeader.REC_LEN += (ushort)(mir.USER_TXT.Length); mir.FLOW_ID = lotinfo.TestCode.ToString(); mir.RecordHeader.REC_LEN += (ushort)(mir.FLOW_ID.Length); mir.TST_TEMP = lotinfo.TST_TEMP; mir.RecordHeader.REC_LEN += (ushort)(mir.TST_TEMP.Length); mir.FACIL_ID = lotinfo.FACIL_ID; mir.RecordHeader.REC_LEN += (ushort)(mir.FACIL_ID.Length); mir.SETUP_ID = lotinfo.SETUP_ID; mir.RecordHeader.REC_LEN += (ushort)(mir.SETUP_ID.Length); mir.DSGN_REV = lotinfo.DeviceName.ToString(); mir.RecordHeader.REC_LEN += (ushort)(mir.DSGN_REV.Length); sfw.WriteRecord(mir); }
/// <summary> /// Parse Mir from Mirs.txt /// ex: /// 1;“МИР 1“;10 /// 2;“МИР 2“;5 /// 3;“Чужбина“;0 /// </summary> /// <param name="recordLine"></param> /// <returns></returns> public static Mir ParseMirFromString(string recordLine) { if (string.IsNullOrEmpty(recordLine)) { throw new ArgumentNullException(); } var propValues = recordLine.Split(SEPARATOR); var item = new Mir( id: int.Parse(propValues[0]), name: propValues[1], //.Substring(1,propValues[1].Length-2), mandatesLimit: int.Parse(propValues[2]) ); return(item); }
public FileBasicInfo(Mir mir) { SetupTime = mir.SetupTime; StartTime = mir.StartTime; LotId = mir.LotId; PartType = mir.PartType; NodeName = mir.NodeName; TesterType = mir.TesterType; JobName = mir.JobName; JobRevision = mir.JobRevision; SublotId = mir.SublotId; ExecType = mir.ExecType; ExecVersion = mir.ExecVersion; TestCode = mir.TestCode; TestTemperature = mir.TestTemperature; UserText = mir.UserText; FamilyId = mir.FamilyId; DateCode = mir.DateCode; FacilityId = mir.FacilityId; }
private static int runExample(String example, Dictionary <String, String> switches, String[] args) { switch (example.ToLower()) { case "mir": return(Mir.fix()); case "bhcdischarge": return(BhcDischarge.main()); case "bhcprocedure": return(BhcProcedures.main()); case "altitude": return(Altitude.main()); case "ga": return(GaCleanup.main()); case "column": return(ColumnDefinitionExample.main()); case "documentation": return(runDocumentationExample(switches, args)); case "discovery": return(DiscoveryExample.main()); default: return(printUsage("Unknown example: " + example, 69)); } }
private void updatebutton_Click(object sender, EventArgs e) { if (this.IPtextbox.Text != null && this.usertextBox.Text != null && this.passwordtextBox.Text != null) { GetRegister.Enabled = true; DeleteMission.Enabled = true; GetMisisonQueueList.Enabled = true; DeleteMissionFromQueue.Enabled = true; GetRegister.Enabled = true; UpdateRegister.Enabled = true; GetRegisterList.Enabled = true; AddMissionToQueue.Enabled = true; GetMissionAction.Enabled = true; GetMissionAllActions.Enabled = true; CreateActionForMission.Enabled = true; DeleteMission.Enabled = true; CreateMission.Enabled = true; UpdateMission.Enabled = true; GetMissionDetail.Enabled = true; GetMissionLst.Enabled = true; CreateParam.Enabled = true; DeleteAction.Enabled = true; UpdateAction.Enabled = true; button4.Enabled = true; button3.Enabled = true; button2.Enabled = true; button1.Enabled = true; mir = null; mir = new Mir("mir100", this.IPtextbox.Text, this.usertextBox.Text, this.passwordtextBox.Text); } else { MessageBox.Show("输入缺失"); } }
/// <summary> /// This is the method that is used to index a stream of records /// </summary> public override void IndexRecords(IEnumerable <StdfRecord> records) { _AllRecords = new List <StdfRecord>(); //extents for the current wafer and part Extents currentWaferExtents = null; Extents currentPartExtents = null; //tells us we're looking for something to confirm the extents are complete (helps us deal with multi-site testing) bool waferEnding = false; bool partsEnding = false; //ends the current wafer extents at the specified index void EndWafer(int endIndex) { currentWaferExtents.EndIndex = endIndex; currentWaferExtents.EndOffset = _AllRecords[endIndex].Offset; _WafersMap.AddExtents(currentWaferExtents); currentWaferExtents = null; waferEnding = false; } //ends the current part extents at the specified index void EndParts(int endIndex) { currentPartExtents.EndIndex = endIndex; currentPartExtents.EndOffset = _AllRecords[endIndex].Offset; _PartsMap.AddExtents(currentPartExtents); currentPartExtents = null; partsEnding = false; } //loop through the records, building the structure foreach (var r in records) { var index = _AllRecords.Count; //look for marker records //TODO: does all this checking/casting slow us down too much? if (r.GetType() == typeof(Mir)) { _Mir = (Mir)r; } else if (r.GetType() == typeof(Mrr)) { _Mrr = (Mrr)r; } else if (r.GetType() == typeof(Pcr)) { _Pcrs.Add((Pcr)r); } //if we think we're looking for the end of the wafers, and we hit something other than Wrr, we passed the end if (waferEnding && r.GetType() != typeof(Wrr)) { EndWafer(index - 1); } //if we think we're looking for the end of the parts, and we hit something other than Prr, we passed the end if (partsEnding && r.GetType() != typeof(Prr)) { EndParts(index - 1); } //when we hit Wrr or Prr, start looking for something else if (r.GetType() == typeof(Wrr)) { waferEnding = true; } else if (r.GetType() == typeof(Prr)) { partsEnding = true; } //if it's a new Pir/Wir, start new extents if (r.GetType() == typeof(Pir) && currentPartExtents == null) { currentPartExtents = new Extents { StartIndex = index, StartOffset = r.Offset }; } if (r.GetType() == typeof(Wir) && currentWaferExtents == null) { currentWaferExtents = new Extents { StartIndex = index, StartOffset = r.Offset }; } _AllRecords.Add(r); } var lastIndex = _AllRecords.Count - 1; //end any open wafers/parts at the last index if (waferEnding) { EndWafer(lastIndex); } if (partsEnding) { EndParts(lastIndex); } }