Пример #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);
        }
Пример #2
0
        public bool disConnect()
        {
            string s = Rasdial.Execute(this.disconnCmd);

            if (s.Contains("命令已完成"))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #3
0
        public bool connect()
        {
            Rasdial.Execute(this.connCmd);
            string ip = Rasdial.getIPAddress();

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