예제 #1
0
 //ツイート画面開く
 private void tweetopen_Click(object sender, EventArgs e)
 {
     if (t == null || t.IsDisposed)
     {
         t        = new tweeting();
         t.Tokens = maintoken;
         t.Show();
     }
     else if (!t.IsDisposed)
     {
         t.Close();
     }
 }
예제 #2
0
        //ここまで

        //リプライボタン
        private void replybutton_Click(object sender, EventArgs e)
        {
            if (t == null || t.IsDisposed)
            {
                t        = new tweeting();
                t.Tokens = maintoken;
                t.Show();
            }

            t.TweetTextBox.Focus();
            t.replyidstr.Text   = "";
            t.replyidstr.Text   = tweetidstr;
            t.TweetTextBox.Text = "";
            t.TweetTextBox.Text = tweetuserscreenname;
        }
예제 #3
0
파일: DraftForm.cs 프로젝트: t29wuQ/LIFE
 public DraftForm(tweeting t)
 {
     t1 = t;
     InitializeComponent();
 }
예제 #4
0
        //ここまで

        //ショートカットキーの処理
        private void Home_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.N)
            {
                if (t == null || t.IsDisposed)
                {
                    t        = new tweeting();
                    t.Tokens = maintoken;
                    t.Show();
                }
            }
            //ふぁぼの処理
            if (e.KeyCode == Keys.F)
            {
                string id_str     = TL.Rows[TLRowIndex].Cells[3].Value.ToString();
                string rtfavcheck = TL.Rows[TLRowIndex].Cells[4].Value.ToString();
                Bitmap rtfav      = new Bitmap("./data/img/Transparency.png");
                int    rfc        = 0;
                if (rtfavcheck == "0")
                {
                    rtfav = new Bitmap("./data/img/favicon.png");
                    rfc   = 1;
                    TL.Rows[TLRowIndex].Cells[2].Value = rtfav;
                    TL.Rows[TLRowIndex].Cells[4].Value = rfc;
                }
                else if (rtfavcheck == "1")
                {
                    TL.Rows[TLRowIndex].Cells[2].Value = rtfav;
                    TL.Rows[TLRowIndex].Cells[4].Value = rfc;
                    maintoken.Favorites.Destroy(id => id_str);
                    return;
                }
                else if (rtfavcheck == "2")
                {
                    rtfav = new Bitmap("./data/img/rtfav.png");
                    rfc   = 3;
                    TL.Rows[TLRowIndex].Cells[2].Value = rtfav;
                    TL.Rows[TLRowIndex].Cells[4].Value = rfc;
                }
                else if (rtfavcheck == "3")
                {
                    rtfav = new Bitmap("./data/img/rticon.gif");
                    rfc   = 2;
                    TL.Rows[TLRowIndex].Cells[2].Value = rtfav;
                    TL.Rows[TLRowIndex].Cells[4].Value = rfc;
                    maintoken.Favorites.Destroy(id => id_str);
                    return;
                }
                maintoken.Favorites.Create(id => id_str);
            }

            //RTの処理
            if (e.KeyCode == Keys.R)
            {
                string id_str     = TL.Rows[TLRowIndex].Cells[3].Value.ToString();
                string rtfavcheck = TL.Rows[TLRowIndex].Cells[4].Value.ToString();
                Bitmap rtfav      = new Bitmap("./data/img/Transparency.png");
                int    rfc        = 0;
                if (rtfavcheck == "0")
                {
                    rtfav = new Bitmap("./data/img/rticon.gif");
                    rfc   = 2;
                    TL.Rows[TLRowIndex].Cells[2].Value = rtfav;
                    TL.Rows[TLRowIndex].Cells[4].Value = rfc;
                }
                else if (rtfavcheck == "1")
                {
                    rtfav = new Bitmap("./data/img/rtfav.png");
                    rfc   = 3;
                    TL.Rows[TLRowIndex].Cells[2].Value = rtfav;
                    TL.Rows[TLRowIndex].Cells[4].Value = rfc;
                }
                else if (rtfavcheck == "2")
                {
                    TL.Rows[TLRowIndex].Cells[2].Value = rtfav;
                    TL.Rows[TLRowIndex].Cells[4].Value = rfc;
                    maintoken.Statuses.Destroy(id => id_str);
                    return;
                }
                else if (rtfavcheck == "3")
                {
                    rtfav = new Bitmap("./data/img/favicon.png");
                    rfc   = 1;
                    TL.Rows[TLRowIndex].Cells[2].Value = rtfav;
                    TL.Rows[TLRowIndex].Cells[4].Value = rfc;
                    maintoken.Statuses.Destroy(id => id_str);
                    return;
                }
                maintoken.Statuses.Retweet(id => id_str);
            }

            //パクツイの処理
            if (e.KeyCode == Keys.P)
            {
                string text = TL.Rows[TLRowIndex].Cells[5].Value.ToString();
                maintoken.Statuses.Update(status => text);
            }

            //改変パクツイの処理
            if (e.KeyCode == Keys.C)

            {
                string text             = TL.Rows[TLRowIndex].Cells[5].Value.ToString();
                string chengescreenname = TL.Rows[TLRowIndex].Cells[6].Value.ToString();
                text = text.Replace(loginscreenname.Text, chengescreenname);
                maintoken.Statuses.Update(status => text);
            }
        }