Beispiel #1
0
        private void Initialize(uint controlJoinId)
        {
            ControlJoinId = controlJoinId;

            _devices = new List <BasicTriListWithSmartObject>();

            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes0, onScenes0);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes1, onScenes1);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes2, onScenes2);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes3, onScenes3);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes4, onScenes4);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes5, onScenes5);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes6, onScenes6);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes7, onScenes7);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes8, onScenes8);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes9, onScenes9);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes10, onScenes10);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes11, onScenes11);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes12, onScenes12);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes13, onScenes13);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes14, onScenes14);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Scenes15, onScenes15);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Raise, onRaise);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.Lower, onLower);
        }
Beispiel #2
0
        public void Dispose()
        {
            if (IsDisposed)
            {
                return;
            }

            IsDisposed = true;

            InternalArea.Dispose();
            InternalScenes.Dispose();
            InternalZones.Dispose();
            InternalSch.Dispose();
            InternalZonerename.Dispose();
            ComponentMediator.Dispose();
        }
Beispiel #3
0
        private void Initialize(uint controlJoinId)
        {
            ControlJoinId = controlJoinId;

            _devices = new List <BasicTriListWithSmartObject>();

            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.ET0, onET0);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.ET1, onET1);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.ET2, onET2);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.ET3, onET3);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.ET4, onET4);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.ET5, onET5);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.ET6, onET6);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.ET7, onET7);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.ET8, onET8);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.ET9, onET9);
            ComponentMediator.ConfigureBooleanEvent(controlJoinId, Joins.Booleans.ET10, onET10);
        }
Beispiel #4
0
        public Contract(BasicTriListWithSmartObject[] devices)
        {
            if (devices == null)
            {
                throw new ArgumentNullException("Devices is null");
            }

            ComponentMediator = new ComponentMediator();

            InternalArea       = new CBlink.Area(ComponentMediator, 1);
            InternalScenes     = new CBlink.Scenes(ComponentMediator, 2);
            InternalZones      = new CBlink.Zones(ComponentMediator, 3);
            InternalSch        = new CBlink.Sch(ComponentMediator, 4);
            InternalZonerename = new CBlink.Zonerename(ComponentMediator, 5);

            for (int index = 0; index < devices.Length; index++)
            {
                AddDevice(devices[index]);
            }
        }
Beispiel #5
0
 public void RemoveDevice(BasicTriListWithSmartObject device)
 {
     Devices.Remove(device);
     ComponentMediator.UnHookSmartObjectEvents(device.SmartObjects[ControlJoinId]);
 }
Beispiel #6
0
 public void AddDevice(BasicTriListWithSmartObject device)
 {
     Devices.Add(device);
     ComponentMediator.HookSmartObjectEvents(device.SmartObjects[ControlJoinId]);
 }
Beispiel #7
0
 internal Zones(ComponentMediator componentMediator, uint controlJoinId)
 {
     ComponentMediator = componentMediator;
     Initialize(controlJoinId);
 }