private void TwitterLoginButton_Click(object sender, RoutedEventArgs e) { //Twitterログイン twitterLogin.showTwitterParge(); var PinDialog = new PINDialog(); if (PinDialog.ShowDialog() == true) { //アクセストークン取得 twitterLogin.GetAccessToken(PinDialog.ResponseText); } }
private void TwitterLoginConsumerKeyButton_Click(object sender, RoutedEventArgs e) { //Twitterの開発者登録が済んでる人向け設定 var ConsumerKeyDialog = new TwitterConsumerKeyDialog(); //Twitterログイン if (ConsumerKeyDialog.ShowDialog() == true) { //認証画面出す twitterLogin.consumer_key = ConsumerKeyDialog.ConsumerKey; twitterLogin.consumer_secret = ConsumerKeyDialog.ConsumerSecret; twitterLogin.showTwitterParge(); var PinDialog = new PINDialog(); if (PinDialog.ShowDialog() == true) { //アクセストークン取得 twitterLogin.GetAccessToken(PinDialog.ResponseText); } } }
public static bool CheckAdminPIN() { TimeSpan ts = new TimeSpan(DateTime.Now.Ticks - AdminPINLastAccess.Ticks); if (ts.TotalSeconds < AdminPINTimeout) { SetAdminLastAccess(); return(true); } if (Program.AdminPIN.Length > 0) { PINDialog pd = new PINDialog(); var results = pd.ShowDialog(); if (results == DialogResult.OK) { if (pd.sPIN == Program.AdminPIN) { SetAdminLastAccess(); return(true); } else { return(false); } } else { return(false); } } else { return(true); } }