示例#1
0
文件: Info.cs 项目: gizmo8985/togi
 private void GetUserInfo()
 {
     using (Twitter t = new Twitter())
     {
         User_ = t.ShowUser(ScreenName);
         ShowTextValues();
     }
 }
示例#2
0
        private void TwitterLogin()
        {
            try
            {
                string SinceId = Regedit.GetKey_("since_recent");

                Twitter login = new Twitter(ScreenName, Password);

                // TimeLine geliyor
                SetTextBoxText(dil_.GetString("LOGIN_LOADING_1", cInfo_), lLoading);

                //1. Okunmamislar Aliniyor. Since_id
                LoadTweetItem(login.FriendsTimeLine(SinceId), false);

                //2. SinceId Yenileniyor
                if(FriendsTimeLine.Count > 0)
                    login.SetSinceId(FriendsTimeLine[0].ItemTweet);

                //3. Okunmuslar Aliniyor. Max_id
                if(!String.IsNullOrEmpty(SinceId))
                    LoadTweetItem(login.FriendsTimeLine(SinceId, true),
                        true);

                //4. User Bilgileri Aliniyor.
                SetTextBoxText(dil_.GetString("LOGIN_LOADING_2", cInfo_), lLoading);

                LoginUser = login.ShowUser(ScreenName);
                LoginUser.UserName = ScreenName;
                LoginUser.UserPass = Password;

                // Hesap Regedit'e yazılyor.
                if (cRemember.Checked)
                    RememberThisAccount(ScreenName, Password);

                DialogResult = DialogResult.OK;
            }
            catch (Exception ex)
            {
                SetTextBoxText(ex.Message, lLoading);
                Thread.Sleep(4000);

                SetPanelVisibility(P1, true);
                SetPanelVisibility(P2, false);
            }
        }