示例#1
0
 /// <summary>
 /// This is called when a new stream is created because a new stream means a new table
 /// </summary>
 /// <param name="itable"></param>
 public void AddTableToList(IPropertiesTable itable)
 {
     foreach (ChemicalStreamData data in (itable as ChemicalStreamPropertiesTable).ItemSource)
     {
         if (!(tableEntries.ContainsKey(data.Label)))
         {
             tableEntries.Add(data.Label, data);
         }
     }
     TableDataChanged(itable, new EventArgs());
 }
 public ChemicalStreamPropertiesTableValidationChecker(ChemicalStreamPropertiesTable table)
 {
     this.table = table;
 }
示例#3
0
 /// <summary>
 /// This is called whenever ChemicalStreamData in an exisiting table is changed
 /// </summary>
 /// <param name="itable">This is the table who's data was changed</param>
 public void DataChanged(DataUpdatedEventArgs changedData, ChemicalStreamData data, IPropertiesTable itable)
 {
     if (changedData.OldData as string != null && (changedData.OldData as string) != "")
     {
         tableEntries.Remove(changedData.OldData as string);
         tableEntries.Add(data.Label, data);
     }
     else
     {
         tableEntries.Remove(data.Label);
         tableEntries.Add(data.Label, data);
     }
     TableDataChanged(itable, new EventArgs());
 }