public override async Task Setup()
        {
            _Config = await CredentialsJsonFile.LoadAsync();

            this.me     = new Misq.Me(_Config.Host, _Config.Token, appKey);
            Enabled     = _Config.Enabled;
            AccountName = _Config.AccountName;
        }
        private async void button1_Click(object sender, EventArgs e)
        {
            var config = await CredentialsJsonFile.LoadAsync();

            config.PostToLtl = this.checkBox1.Checked;
            await config.SaveAsync();

            this.Close();
        }
Exemple #3
0
        static public async Task <Service> Use()
        {
            var config = await CredentialsJsonFile.LoadAsync();

            if (config.Token != null)
            {
                return(new Service(new Misq.Me(config.Host, config.Token, appKey)));
            }
            else
            {
                return(null);
            }
        }
Exemple #4
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();
        }
        private async void SettingForm_Load(object sender, EventArgs e)
        {
            var config = await CredentialsJsonFile.LoadAsync();

            this.checkBox1.Checked = config.PostToLtl;
        }