コード例 #1
0
ファイル: Imgur.cs プロジェクト: sportsof/ScreenshotGrab
 internal static void ConnectAccount(SettingsForm sform)
 {
     if (Properties.Settings.Default.account != "")
     {
         Properties.Settings.Default.account       = "";
         Properties.Settings.Default.access_token  = "";
         Properties.Settings.Default.refresh_token = "";
         Properties.Settings.Default.Save();
         sform.RegImgur();
     }
     else
     {
         sform.imgurb.Enabled = false;
         System.Diagnostics.Process.Start("https://api.imgur.com/oauth2/authorize?client_id=" + clientid + "&response_type=pin&state=APPLICATION_STATE");
         Thread.Sleep(1000);
         var form = new PinForm(sform);
         form.ShowDialog();
         sform.imgurb.Enabled = true;
     }
 }
コード例 #2
0
 private void button2_Click_1(object sender, EventArgs e)
 {
     if (Properties.Settings.Default.account != "")
     {
         Properties.Settings.Default.account       = "";
         Properties.Settings.Default.access_token  = "";
         Properties.Settings.Default.refresh_token = "";
         Properties.Settings.Default.Save();
         RegImgur();
     }
     else
     {
         imgurb.Enabled = false;
         System.Diagnostics.Process.Start("https://api.imgur.com/oauth2/authorize?client_id=" + form1.clientid + "&response_type=pin&state=APPLICATION_STATE");
         Thread.Sleep(1000);
         var form = new PinForm(this);
         form.ShowDialog();
         imgurb.Enabled = true;
     }
 }