static async Task Main2() { var vk = new RawApi(); #if !DEBUG var str = VKToken.GetOAuthURL(3174839, VKPermission.Offline | VKPermission.Nohttps); str.Dump(); var redirecturl = ConTools.ReadLine("Enter redirect url or Ctrl-C"); vk.AddToken(VKToken.FromRedirectUrl(redirecturl)); #else try{ foreach (var v in File.ReadAllLines("debug.token")) { vk.AddToken(VKToken.FromRedirectUrl(v)); } } catch (Exception ex) { ex.Message.Dump(); } #endif CheckVkParser(@"C:\Temp\217053001_217054001.xml", vk.Executor); }
private void button1_Click(object sender, EventArgs e) { Process.Start(VKToken.GetOAuthURL(Core.AppID)); }