static async Task Main() { Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var tokenTester = new TinkoffTokenTester(); if (await tokenTester.IsTokenValidAsync(TokenStorage.Token) == false) { if (new TokenForm().ShowDialog() != DialogResult.OK) { return; } } Application.Run(new Mainform()); }
private async Task <bool> IsTokenSuccessAsync(string token) { var tokenTester = new TinkoffTokenTester(); return(await tokenTester.IsTokenValidAsync(token)); }