예제 #1
0
 /// <summary>
 /// Schreibt die WT-Daten zurück in die Collection.
 /// Daten werden in Datei gespeichert und sind persistent.
 /// </summary>
 /// <param name="index"></param>
 /// <param name="WTFile"></param>
 public static void SetWTFile(int index, WTFileBase WTFile)
 {
     if (WTFile != null)
     {
         m_WTFile = WTFile;
     }
 }
 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);
         }
         ;
     }
 }
예제 #3
0
 protected void UpdateResultDisplay(WTFileBase m_WTFile)
 {
     if (m_Interface.GetResultDisplay() != null && m_Interface.GetResultDisplay().IsHandleCreated)
     {
         if (m_Interface.GetResultDisplay().InvokeRequired)
         {
             m_Interface.GetResultDisplay().Invoke(
                 new ResultTable.DelegateSetStatus(m_Interface.GetResultDisplay().SetStatus),
                 new System.Object[] { m_WTFile.GetResultDef() });
         }
         else
         {
             m_Interface.GetResultDisplay().SetStatus(m_WTFile.GetResultDef());
         }
     }
     if (m_Interface.GetPartHistoryDisplay() != null && m_Interface.GetPartHistoryDisplay().IsHandleCreated)
     {
         if (m_Interface.GetPartHistoryDisplay().InvokeRequired)
         {
             m_Interface.GetPartHistoryDisplay().Invoke(
                 new PartHistoryTable.DelegateAddPart(m_Interface.GetPartHistoryDisplay().AddPart),
                 new System.Object[] { m_WTFile });
         }
         else
         {
             m_Interface.GetPartHistoryDisplay().AddPart(m_WTFile);
         }
     }
 }
예제 #4
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()));
 }
예제 #5
0
 public static void ResetStation(int Station)
 {
     m_WTFile = new WTFileBase(Station);
 }
 private void UpdateResultTable(WTFileBase Info)
 {
     resultTable1.SetStatus(Info.GetResultDef());
 }