void _messengerWorker_ReadSystemStateFlagsCompleted(IMessenger arg1, SystemStateFlagsResponseMessage obj)
 {
     IsSystemEnabled = obj.IsSystemEnabled;
     IsSoundEnabled  = obj.IsSoundEnabled;
 }
Ejemplo n.º 2
0
        void _rs_FrameReceived(FrameReceiverState obj)
        {
            switch (_messageType)
            {
            case MessageType.GetMarker:
                if (ReadMarkerCompleted != null)
                {
                    _colorMarkerResponseMessage             = new ColorMarkerResponseMessage();
                    _colorMarkerResponseMessage.TimePoint   = obj.PayloadBuff[0];
                    _colorMarkerResponseMessage.R           = obj.PayloadBuff[1];
                    _colorMarkerResponseMessage.G           = obj.PayloadBuff[2];
                    _colorMarkerResponseMessage.B           = obj.PayloadBuff[3];
                    _colorMarkerResponseMessage.MarkerIndex = _markerIndex;
                    ReadMarkerCompleted(this, _colorMarkerResponseMessage);
                }
                break;

            case MessageType.GetMarkerCount:
                if (ReadMarkerCountCompleted != null)
                {
                    _colorMarkerCountResponseMessage = new ColorMarkerCountResponseMessage()
                    {
                        MarkerCount = obj.PayloadBuff[0]
                    };
                    ReadMarkerCountCompleted(this, _colorMarkerCountResponseMessage);
                }
                break;

            case MessageType.GetTimeSpan:
                if (ReadTimeSpanCompleted != null)
                {
                    _timeSpanResponseMessage           = new TimeSpanResponseMessage();
                    _timeSpanResponseMessage.TimeSpan  = obj.PayloadBuff[0];
                    _timeSpanResponseMessage.TimeSpan |= (UInt16)((UInt16)obj.PayloadBuff[1] << 8);
                    ReadTimeSpanCompleted(this, _timeSpanResponseMessage);
                }
                break;

            case MessageType.GetTimeProgress:
                if (ReadTimeProgressCompleted != null)
                {
                    _timeProgressResponseMessage = new TimeProgressResponseMessage();
                    _timeProgressResponseMessage.TimeProgress  = obj.PayloadBuff[0];
                    _timeProgressResponseMessage.TimeProgress |= (UInt16)((UInt16)obj.PayloadBuff[1] << 8);
                    ReadTimeProgressCompleted(this, _timeProgressResponseMessage);
                }
                break;

            case MessageType.GetSystemStateFlags:
                if (ReadSystemStateFlagsCompleted != null)
                {
                    _systemStateFlagsResponseMessage      = new SystemStateFlagsResponseMessage();
                    _systemStateFlagsResponseMessage.Data = obj.PayloadBuff;
                    ReadSystemStateFlagsCompleted(this, _systemStateFlagsResponseMessage);
                }
                break;
            }

            _messageType     = MessageType.Undefined;
            _pendingResponse = false;
        }
Ejemplo n.º 3
0
 void _messenger_ReadSystemStateFlagsCompleted(IMessenger arg1, SystemStateFlagsResponseMessage obj)
 {
     RaiseEventAction(ReadSystemStateFlagsCompleted, obj);
 }