Example #1
0
        static public void Install(Accounts accounts)
        {
            var form = new Services.Misskey.AuthForm(async(Misq.Me me) => {
                var config   = await CredentialsJsonFile.LoadAsync();
                config.Token = me.UserToken;
                config.Host  = me.Host;
                await config.SaveAsync();

                accounts.Misskey = await Use();
            });

            form.Show();
        }
Example #2
0
        public override Task <bool> Install()
        {
            var s = new TaskCompletionSource <bool>();

            var form = new Services.Misskey.AuthForm(async(Misq.Me me) => {
                _Config.Token       = me.UserToken;
                _Config.Host        = me.Host;
                _Config.AccountName = "@" + me.Username;
                await _Config.SaveAsync();
                await Setup();

                s.SetResult(true);
            });

            form.Show();

            return(s.Task);
        }