private void Button_Click(object sender, RoutedEventArgs e) { back = new CallBack(this); InstanceContext context = new InstanceContext(back); client = new ServicesClient(context); client.Endpoint.Address = new EndpointAddress("net.tcp://" + IP.Text.ToString() + "/5000/host"); }
private void Window_Loaded(object sender, RoutedEventArgs e) { try { if (client == null) { back = new CallBack(this); InstanceContext context = new InstanceContext(back); client = new ServicesClient(context); string a = client.State.ToString(); } } catch (Exception ex) { throw ex; } IP.Text = ConfigurationManager.AppSettings["localhost"].ToString(); }