public ProbeConnectionForm() { InitializeComponent(); _lightControlManager = new CCSLightControlManager(); //DeviceController.GetCCSLightControlManagerInstance(); _lightControlManager.On_ProbeConnectionWorked += _lightControlManager_On_Disconnected; _lightControlManager.On_SafetyClosed += _lightControlManager_On_SafetyClosed; }
private void CCSLightControlForm_Load(object sender, EventArgs e) { CCSLightControlForm_LocationChanged(sender, e); _lightControlManager = DeviceController.GetCCSLightControlManagerInstance(); _lightControlManager.On_SafetyClosed += _lightControlManager_On_SafetyClosed; _lightControlManager.StartProbeConnetion(_heartbeatInterval); _lightControlAssistant = new CCSLightControlAssistant(_lightControlManager); initializeLightControl(); }
public static CCSLightControlManager GetCCSLightControlManagerInstance() { if (_lightControlManager == null) { _lightControlManager = new CCSLightControlManager(); } else { _lightControlManager.RemoveAllRegisterEvent(); } _lightControlInstanceUsed = (_lightControlManager != null); return(_lightControlManager); }
public static void ReleaseCCSLightControlManagerInstance() { _lightControlInstanceUsed = false; _lightControlManager = null; }