public void RemoveDevice(MainStationDevice _Device)
 {
     if (devices.Contains(_Device)) devices.Remove(_Device);
 }
 public Event(MainStationDevice _Device, ProductDataBase.Device.Event _Event)
 {
     device = _Device;
     eventtype = _Event;
     Name = DefaultName;
 }
 public MainStationDevice RegisterDevice(string _Name, ProductDataBase.Device _Device, ushort _DeviceID)
 {
     MainStationDevice d = new MainStationDevice(this, _Name, _Device, _DeviceID);
     foreach (ProductDataBase.Device.Event e in _Device.events)
     {
         d.Events.Add(e.ID, new MainStationDevice.Event(d, e));
     }
     devices.Add(d);
     return d;
 }