Example #1
0
 /// <summary>
 /// Initials the state of the network.
 /// </summary>
 private void InitialNetworkState()
 {
     if (CommunicateProxy.Ping())
     {
         online = true;
         tbtnNetworkStatus.Glyph = Resources.link;
         tbtnNetworkStatus.Hint  = "当前状态 - 在线(双击鼠标强制系统离线)";
     }
     else
     {
         online = false;
         tbtnNetworkStatus.Glyph = Resources.link_delete;
         tbtnNetworkStatus.Hint  = "当前状态 - 离线(双击鼠标强制系统在线)";
     }
 }
 /// <summary>
 /// 判断当前网络的连通状态
 /// </summary>
 /// <returns>如果连通则返回true,否则返回false</returns>
 public bool IsConnected()
 {
     return(CommunicateProxy.Ping());
 }