public void DisconnectUser() { client.Disconnect(ID); client = null; Button = "Connect"; IsEneble = true; isConnect = false; }
void ConnectUser() { if (!isConnect) { client = new Chat_servisClient(new System.ServiceModel.InstanceContext(this)); ID = client.Connect(name); Button = "Disconnect"; IsEneble = false; isConnect = true; } }