public void AddPart(WTFileBase Info)
 {
     if (Info == null)
     {
     }
     else
     {
         History.Add(new WTFileBase(Info));
         DataGridViewRow ResultRow = new DataGridViewRow();
         ResultRow.CreateCells(dataGridView1,
                               new string[] { string.Format("{0:G}", DateTime.Now),
                                              Info.GetTypeName(),
                                              Info.GetSN(),
                                              Info.GetResultDef().GetTotalResult().ToString() });
         dataGridView1.Rows.Insert(0, ResultRow);
         dataGridView1.ClearSelection();
         ResultRow.Selected = true;
         if (dataGridView1.Rows.Count > HistoryLength)
         {
             dataGridView1.Rows.RemoveAt(dataGridView1.Rows.Count - 1);
             History.RemoveAt(0);
         }
         ;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Copy-constructor
 /// </summary>
 /// <param name="CopyThis"></param>
 public WTFileBase(WTFileBase CopyThis)
 {
     SetCustSN(CopyThis.GetCustSN());
     SetProgram(CopyThis.GetProgram());
     SetSN(CopyThis.GetSN());
     SetTypeName(CopyThis.GetTypeName());
     SetResultDef(new ResultDef(CopyThis.GetResultDef()));
 }