Ejemplo n.º 1
0
 private void RegistToServer()
 {
     try
     {
         ctx = new InstanceContext(this);
         svc = new ControlService.MainControlClient(ctx);
         svc.ClientCredentials.Windows.ClientCredential.UserName = config.GetValue("user", typeof(string)).ToString();
         svc.ClientCredentials.Windows.ClientCredential.Password = config.GetValue("pwd", typeof(string)).ToString();
         svc.RegisterClient(ShowRoomSys.CommonLib.Common.MAC);
     }
     catch { System.Windows.MessageBox.Show("Service does not running!"); }
 }