Пример #1
0
        void CheckDetectorChanges( Detection detection )
        {
            if ( Tags[ detection.TagId ].Detector != null )
            {
                if ( detection.HostName != Tags[ detection.TagId ].Detector.HostName )
                {
                    Tags[ detection.TagId ].Detector.DetachTag( Tags[ detection.TagId ] );
                    TagLeave( Tags[ detection.TagId ].Detector, new TagEventArgs( Tags[ detection.TagId ] ) );

                    Detectors[ detection.HostName ].AttachTag( Tags[ detection.TagId ] );
                    Tags[ detection.TagId ].Detector = Detectors[ detection.HostName ];
                    TagEnter( Detectors[ detection.HostName ], new TagEventArgs( Tags[ detection.TagId ] ) );
                }
            }
            else
            {
                Detectors[ detection.HostName ].AttachTag( Tags[ detection.TagId ] );
                Tags[ detection.TagId ].Detector = Detectors[ detection.HostName ];
                TagEnter( Detectors[ detection.HostName ], new TagEventArgs( Tags[ detection.TagId ] ) );
            }
        }
Пример #2
0
        void CheckTagButtonData( Detection detection )
        {
            if ( Tags[ detection.TagId ].ButtonA != detection.ButtonAState ||
                 Tags[ detection.TagId ].ButtonB != detection.ButtonBState ||
                 Tags[ detection.TagId ].ButtonC != detection.ButtonCState ||
                 Tags[ detection.TagId ].ButtonD != detection.ButtonDState )
            {
                Tags[ detection.TagId ].ButtonA = detection.ButtonAState;
                Tags[ detection.TagId ].ButtonB = detection.ButtonBState;
                Tags[ detection.TagId ].ButtonC = detection.ButtonCState;
                Tags[ detection.TagId ].ButtonD = detection.ButtonDState;

                TagButtonDataReceived( Tags[ detection.TagId ], new TagEventArgs( Tags[ detection.TagId ] ) );
            }
        }
Пример #3
0
 void CheckBatteryData( Detection detection )
 {
     if ( Tags[ detection.TagId ].BatteryStatus != detection.BatteryStatus )
     {
         Tags[ detection.TagId ].BatteryStatus = detection.BatteryStatus;
         TagBatteryDataReceived( Tags[ detection.TagId ], new TagEventArgs( Tags[ detection.TagId ] ) );
     }
 }
Пример #4
0
 void CheckTagMove( Detection detection )
 {
     if ( Tags[ detection.TagId ].MovingStatus != detection.MovingStatus )
     {
         Tags[ detection.TagId ].MovingStatus = detection.MovingStatus;
         TagMoved( Detectors[ detection.HostName ], new TagEventArgs( Tags[ detection.TagId ] ) );
     }
 }