Exemplo n.º 1
0
        public bool testdis()
        {
            string s = Rasdial.Execute("ipconfig /all");

            if (s.Contains(string.Format("PPP adapter {0}", this.name)))
            {
                return(false);
            }
            return(true);
        }
Exemplo n.º 2
0
        public bool disConnect()
        {
            string s = Rasdial.Execute(this.disconnCmd);

            if (s.Contains("命令已完成"))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 3
0
        public bool connect()
        {
            Rasdial.Execute(this.connCmd);
            string ip = Rasdial.getIPAddress();

            if (ip != current)
            {
                current = ip;
                return(true);
            }
            else
            {
                return(false);
            }
        }