public override void ConnectItem(int cell, object item)
 {
     if (item is ILogicEventReceiver)
     {
         ILogicEventReceiver logicEventReceiver = (ILogicEventReceiver)item;
         logicEventReceiver.OnLogicNetworkConnectionChanged(true);
     }
     else if (item is ILogicEventSender)
     {
         ILogicEventSender logicEventSender = (ILogicEventSender)item;
         logicEventSender.OnLogicNetworkConnectionChanged(true);
     }
 }
 public override void DisconnectItem(int cell, object item)
 {
     if (item is ILogicEventReceiver)
     {
         ILogicEventReceiver logicEventReceiver = item as ILogicEventReceiver;
         logicEventReceiver.ReceiveLogicEvent(0);
         logicEventReceiver.OnLogicNetworkConnectionChanged(false);
     }
     else if (item is ILogicEventSender)
     {
         ILogicEventSender logicEventSender = item as ILogicEventSender;
         logicEventSender.OnLogicNetworkConnectionChanged(false);
     }
 }
 public override void RemoveItem(int cell, object item)
 {
     if (item is LogicWire)
     {
         wires.Remove((LogicWire)item);
     }
     else if (item is ILogicEventReceiver)
     {
         ILogicEventReceiver item2 = item as ILogicEventReceiver;
         receivers.Remove(item2);
     }
     else if (item is ILogicEventSender)
     {
         ILogicEventSender item3 = (ILogicEventSender)item;
         senders.Remove(item3);
     }
 }
 public override void AddItem(int cell, object item)
 {
     if (item is LogicWire)
     {
         wires.Add((LogicWire)item);
     }
     else if (item is ILogicEventReceiver)
     {
         ILogicEventReceiver item2 = (ILogicEventReceiver)item;
         receivers.Add(item2);
     }
     else if (item is ILogicEventSender)
     {
         ILogicEventSender item3 = (ILogicEventSender)item;
         senders.Add(item3);
     }
 }