Beispiel #1
0
 private void CloseAll() {
   IDictionaryEnumerator enu = SFTable.GetEnumerator();
   while (enu.MoveNext()) {
     SerialForwarder sf = (SerialForwarder)enu.Value;
     sf.CloseAll();
   }
 }
Beispiel #2
0
 private void StopSF(string id) {
   uint _id;
   try {
     _id = Convert.ToUInt32(id);
   } catch (Exception e) {
     Debug.WriteLine(e.Message);
     prompt.WriteLine("stop: wrong arguments");
     return;
   }
   SerialForwarder sf = findSF(_id);
   if (sf == null) {
     prompt.WriteLine("SF not found");
     return;
   }
   sf.CloseAll();
   SFTable.Remove(sf.id);
 }