Beispiel #1
0
 void timingInterface_PulseReceived(object sender, MicroEventArgs e)
 {
     if (!e.TimedOut)
     {
         foreach (MicrocontrollerListViewItem item in Items)
         {
             if (object.Equals(e.Address, item.address))
             {
                 item.OnPulseReceived(e.BoolResult);
             }
         }
     }
 }
 private void RaiseTimestampEvent(IPAddress address, MicroTimestamp ts, bool success)
 {
     if (TimestampReceived != null)
     {
         MicroEventArgs e;
         if (success)
         {
             e = new MicroEventArgs(ts, address);
         }
         else
         {
             e = new MicroEventArgs(address);
         }
         if (syncInvoke != null)
         {
             syncInvoke.Invoke(TimestampReceived, new object[] { this, e });
         }
         else
         {
             TimestampReceived(this, e);
         }
     }
 }
        private void RaiseBoolEvent(IPAddress address, bool result, bool success, EventHandler <MicroEventArgs> ev)
        {
            if (ev != null)
            {
                MicroEventArgs e;
                if (success)
                {
                    e = new MicroEventArgs(result, address);
                }
                else
                {
                    e = new MicroEventArgs(address);
                }

                if (syncInvoke != null)
                {
                    syncInvoke.Invoke(ev, new object[] { this, e });
                }
                else
                {
                    ev(this, e);
                }
            }
        }
 private void RaiseTimestampEvent(IPAddress address, MicroTimestamp ts, bool success)
 {
     if (TimestampReceived != null) {
         MicroEventArgs e;
         if (success){
             e = new MicroEventArgs(ts, address);
         }
         else {
             e = new MicroEventArgs(address);
         }
         if (syncInvoke != null) {
             syncInvoke.Invoke(TimestampReceived, new object[] { this, e });
         }
         else {
             TimestampReceived(this, e);
         }
     }
 }
        private void RaiseBoolEvent(IPAddress address, bool result, bool success, EventHandler<MicroEventArgs> ev)
        {
            if (ev != null) {
                MicroEventArgs e;
                if (success) {
                    e = new MicroEventArgs(result, address);
                }
                else {
                    e = new MicroEventArgs(address);
                }

                if (syncInvoke != null) {
                    syncInvoke.Invoke(ev, new object[] { this, e });
                }
                else {
                    ev(this, e);
                }
            }
        }
 void timingInterface_SyncReceived(object sender, MicroEventArgs e)
 {
     if (!e.TimedOut) {
         foreach (MicrocontrollerListViewItem item in Items) {
             if (object.Equals(e.Address, item.address)) {
                 item.OnSyncReceived(e.BoolResult);
             }
         }
     }
 }