Пример #1
0
        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());
        }
Пример #2
0
        private async Task <bool> IsTokenSuccessAsync(string token)
        {
            var tokenTester = new TinkoffTokenTester();

            return(await tokenTester.IsTokenValidAsync(token));
        }