Beispiel #1
0
 public void Initialize(ushort _panel)
 {
     myPanel = ElkCore.AddOrGetCoreObject(_panel);
     myNotificationManager = myPanel.NotificationManager;
     myNotificationManager.OnNotificationManagerReady += myNotificationManager_OnNotificationManagerReady;
     if (myPanel == null)
     {
         return;
     }
 }
Beispiel #2
0
        //Initialize
        public void Initialize(int _panelId)
        {
            if (this.initRun)
            {
                return;
            }

            panelId = _panelId;

            this.SendDebug(string.Format("Added and initialized Panel ", _panelId));

            for (int i = 1; i <= 8; i++)
            {
                if (!Areas.ContainsKey(i))
                {
                    ElkArea a = new ElkArea();
                    a.Initialize(this, i);
                    Areas.Add(i, a);
                }
            }
            for (int i = 1; i <= 208; i++)
            {
                if (!Zones.ContainsKey(i))
                {
                    ElkZone z = new ElkZone();
                    z.Initialize(this, i);
                    Zones.Add(i, z);
                }
            }
            for (int i = 1; i <= 208; i++)
            {
                if (!Outputs.ContainsKey(i))
                {
                    ElkOutput o = new ElkOutput();
                    o.Initialize(this, i);
                    Outputs.Add(i, o);
                }
            }

            commandQueue  = new CrestronQueue <string>();
            responseQueue = new CrestronQueue <string>();

            this.panelId        = _panelId;
            NotificationManager = new ElkNotificationManager(this);
            this.initRun        = true;
        }
 public ElkNotificationMessageHandler(ElkPanel _panel, ElkNotificationManager _manager)
 {
     myElkNotificationManager = _manager;
     myPanel = _panel;
     Initialize();
 }