Ejemplo n.º 1
0
        private void CreateProxy()
        {
            HostConfiguration selected = this.comboBox1.SelectedItem as HostConfiguration;

            selected = Configuration.Instance[selected.ID];

            if (selected == null)
            {
                throw new Exception("No camera selected");
            }

            string searchAddress = string.Format("net.tcp://{0}:8000/TcpService", GetSelectedIP());
            string playerAddress = string.Format("net.tcp://{0}:4567/TcpService", GetSelectedIP());

            this.SearchProxy = ServiceProxy.ProxyFactory.CreateProxy <IServiceFacade>(searchAddress);
            this.StreamProxy = ServiceProxy.ProxyFactory.CreateProxy <IStreamPlayer>(playerAddress);
        }
Ejemplo n.º 2
0
        private void CreateProxy()
        {
            Camera selected = this.comboBox1.SelectedItem as Camera;

            selected = Configuration.Instance[selected.ID];

            if (selected == null)
            {
                throw new Exception("No camera selected");
            }

            string searchAddress = string.Format("net.tcp://{0}:8000/TcpService", GetSelectedIP());
            string playerAddress = string.Format("net.tcp://{0}:8001/TcpService", GetSelectedIP());

            this.SearchProxy = ServiceProxy.ProxyFactory.CreateProxy<IServiceFacade>(searchAddress);
            this.StreamProxy = ServiceProxy.ProxyFactory.CreateProxy<IStreamPlayer>(playerAddress);
        }