예제 #1
0
 /// <summary>
 /// 结束服务
 /// </summary>
 private void StopServer()
 {
     if (MessageBox.Show("确定要退出系统吗?", "提示", MessageBoxButton.OKCancel) == MessageBoxResult.Cancel)
     {
         return;
     }
     using (var client = new QueueClientSoapClient())
     {
         string msg = client.endService(GlobalData.UserID, GlobalData.WindowNo);
         if (msg == "0")
         {
             Application.Current.Shutdown();
         }
         else
         {
             ShowErrorMsg(msg);
         }
     }
 }
예제 #2
0
 private void Window_Closed(object sender, EventArgs e)
 {
     using (var client = new QueueClientSoapClient())
     {
         string msg = client.endService(GlobalData.UserID, GlobalData.WindowNo);
         if (msg == "0")
         {
             Application.Current.Shutdown();
         }
         //else
         //{
         //    ShowErrorMsg(msg);
         //}
     }
 }