Esempio n. 1
0
        private async Task TestSignup(IMailHost host)
        {
            MEGA.Password = "******";
            var account = await MEGA.CreateNewAccount(host);

            if (!string.IsNullOrEmpty(account))
            {
                Trace.WriteLine(account);
            }
            Assert.IsTrue(!string.IsNullOrEmpty(account));
        }
        public async void CreateMegaAccount(object sender)
        {
            var mailHost = sender as IMailHost;

            if (mailHost == null)
            {
                return;
            }

            Message = "Create new mega account...";
            var account = await MEGA.CreateNewAccount(mailHost);

            if (string.IsNullOrEmpty(account))
            {
                Message = "Failed to create account!";
                return;
            }

            Message = MEGA.SetAccountInfo(account) ?
                      "Account created & set!" : "Account created but failed to set!";
        }