public void Initialize(ushort _panel) { myPanel = ElkCore.AddOrGetCoreObject(_panel); myNotificationManager = myPanel.NotificationManager; myNotificationManager.OnNotificationManagerReady += myNotificationManager_OnNotificationManagerReady; if (myPanel == null) { return; } }
//Init ------------------------------------------------------- public void Initialize(ushort _panel, ushort _zoneNumber) { myPanel = ElkCore.AddOrGetCoreObject(_panel); if (myPanel == null) { return; } if (myPanel.Zones.ContainsKey((int)_zoneNumber)) { myZone = myPanel.Zones[(int)_zoneNumber]; myZone.ElkZoneEvent += new EventHandler <ElkZoneEventArgs>(myZone_ElkZoneEvent); } }
//Init ------------------------------------------------------- public void Initialize(ushort _panel, ushort _outputNumber) { myPanel = ElkCore.AddOrGetCoreObject(_panel); if (myPanel == null) { return; } if (myPanel.Outputs.ContainsKey((int)_outputNumber)) { myOutput = myPanel.Outputs[(int)_outputNumber]; myOutput.ElkOutputEvent += new EventHandler <ElkOutputEventArgs>(myOutput_ElkOutputEvent); } }
//Init ------------------------------------------------------- public void Initialize(ushort _panel, ushort _areaNum) { myPanel = ElkCore.AddOrGetCoreObject(_panel); if (myPanel == null) { return; } if (myPanel.Areas.ContainsKey((int)_areaNum)) { myArea = myPanel.Areas[(int)_areaNum]; myArea.ElkAreaEvent += new EventHandler <ElkAreaEventArgs>(myArea_ElkAreaEvent); myArea.myPw.ElkPasswordEvent += new EventHandler <ElkPasswordEventArgs>(myPw_ElkPasswordEvent); } }
public void Initialize(ushort _panelId, SimplSharpString _host, ushort _port) { myPanel = ElkCore.AddOrGetCoreObject(_panelId); if (myPanel.getPanelIp.Length == 0) { myPanel.SetDebug(debug); myPanel.InitialzeConnection(_host.ToString(), _port); myPanel.RegisterSimplClient(Convert.ToString(_panelId)); myPanel.SimplClients[Convert.ToString(_panelId)].OnNewEvent += new EventHandler <SimplEventArgs>(ElkPanel_SimplEvent); this.isRegistered = true; } else { ErrorLog.Error("Elk Panel with ID {0} already exists - please only use one panel instance per panel within project.", _panelId); } }