예제 #1
0
        void Evaluate(string telegramm)
        {
            if (telegramm.Contains(TelegrammTypes.WindowInformation))
            {
                if (telegramm.Contains(DeviceStatus.Unknown))
                {
                    WindowArgs.State = WindowState.eUnknown;
                    EInformer?.Invoke(this, WindowArgs);
                    return;
                }

                if (telegramm.Contains(DeviceStatus.Open))
                {
                    WindowArgs.State = WindowState.eAnyWindowIsOpen;
                    EInformer?.Invoke(this, WindowArgs);
                    return;
                }

                WindowArgs.State = WindowState.eAllWindowsAreClosed;
                EInformer?.Invoke(this, WindowArgs);
            }
        }
        void Evaluate(string telegramm)
        {
            if (telegramm.Contains(TelegrammTypes.DoorInformation))
            {
                if (telegramm.Contains(DeviceStatus.Unknown))
                {
                    DoorArgs.State = DoorState.eUnknown;
                    EInformer?.Invoke(this, DoorArgs);
                    return;
                }

                if (telegramm.Contains(DeviceStatus.Open))
                {
                    DoorArgs.State = DoorState.eDoorIsOpen;
                    EInformer?.Invoke(this, DoorArgs);
                    return;
                }

                DoorArgs.State = DoorState.eDoorIsClosed;
                EInformer?.Invoke(this, DoorArgs);
            }
        }