Пример #1
0
        //检测连接状态
        private void CkeckConnect()
        {
            try
            {
                hWebService.Discover();
                if (!mModel.Isform3Alive)
                {
                    form3 = new Form3(this);
                    form3.Show();
                    Application.Run();

                    //form3.Focus();
                }
            }
            catch (ArgumentException)
            {
                this.Invoke(new Action(() =>
                {
                    ConnectStatus();
                }));
            }
            catch
            { }

            //Openform3();
        }
Пример #2
0
 /// <summary>
 /// 检测网络连接
 /// </summary>
 private void CheckConnect()
 {
     try {
         mModel.Timer1Wait++;
         huaTongWebService.Discover();
         mModel.IsConnect = true;
         mModel.Timer1Wait--;
     }
     catch
     {
     }
 }