public async Task <bool> Login(string username, string password)
        {
            model.username = username;
            model.password = password;

            bool success = await IPGWAPI.Login(username, password);

            if (success)
            {
                await UpdateInfo();
            }
            return(success);
        }
        public async Task <bool> UpdateInfo()
        {
            var result = (await IPGWAPI.AccountInfo())?.Split(',');

            if (result == null || result.Length == 0)
            {
                return(false);
            }

            Used     = result[0];
            UsedTime = result[1];
            Balance  = result[2];
            IP       = result[5];
            return(true);
        }
 public async Task <bool> Logout()
 {
     return((await IPGWAPI.Logout(model.username, model.password))
            ?.Contains("网络已断开") ?? false);
 }