示例#1
0
 internal bool Login(string url, string username, string password)
 {
     _cherwellService = new api
     {
         CookieContainer = new CookieContainer(),
         Url             = url
     };
     return(_cherwellService.Login(username, password));
 }
        internal bool Login(string username, string password)
        {
            _cherwellService = new api
            {
                CookieContainer = new CookieContainer(500, 100, 8192)
            };

            return(_cherwellService.Login(username, password));
        }
 public bool ConfirmLogin(string username, string password)
 {
     if (_cherwellService == null)
     {
         _cherwellService = new api
         {
             CookieContainer = new CookieContainer(500, 100, 8192)
         };
         LoginTimer = DateTime.Now;
         return(_cherwellService.Login(username, password));
     }
     if (DateTime.Now >= LoginTimer.AddMilliseconds(300000))
     {
         LoginTimer = DateTime.Now;
         return(_cherwellService.Login(username, password));
     }
     LoginTimer = DateTime.Now;
     return(true);
 }