public UIDisplayProxyClient GetUIDisplayProxy() { string url = ""; if (_protocol == PROTOCAL.NET_TCP) { url = string.Format(ServiceAddress.UIDISPLAY_NETTCP, _address); } else if (_protocol == PROTOCAL.WSHTTP) { url = string.Format(ServiceAddress.UIDISPLAY_WSHTTP, _address); } if (MyUIDisplayProxy != null) { if (MyUIDisplayProxy.Endpoint.Address.ToString() == url) { return(MyUIDisplayProxy); } } MyUIDisplayProxy = new UIDisplayProxyClient(GetBinding(), new EndpointAddress(url)); MyUIDisplayProxy.Endpoint.EndpointBehaviors.Add(new MyEndpointBehavior()); return(MyUIDisplayProxy); }
public UIOperate(LocalClientProxy.PROTOCAL protocol, string address) { MyLcp = new LocalClientProxy(protocol, address); MyUIDisplayProxy = MyLcp.GetUIDisplayProxy(); }