public void InitializeManager(ProductType type, string baseAddress, string port) { _type = type; WCFClientEventCallback.Instance().CommunicationEvent += WCFClientManager_CommunicationEvent; WCFClientEventCallback.Instance().ExceptionEvent += WCFClientManager_ExceptionEvent; WCFClientEventCallback.Instance().OnEventReceivedEvent += TCPClientManager_OnEventReceivedEvent; WCFClientEventCallback.Instance().RegisterServices(type, baseAddress, port); _proxy = WCFClientEventCallback.Instance().KRService; _heartProxy = WCFClientEventCallback.Instance().KRHeartService; }
public void DisconnectServer() { WCFClientEventCallback.Instance().UnRegistServices(); WCFClientEventCallback.Instance().CommunicationEvent -= WCFClientManager_CommunicationEvent; WCFClientEventCallback.Instance().ExceptionEvent -= WCFClientManager_ExceptionEvent; }