Пример #1
0
        private void onStatus(StatusMessage m)
        {
            var status = m.Status;

            Invoke((MethodInvoker) delegate
            {
                AddStatusToTimeline(status);

                if (status.InReplyToStatusId != null || status.InReplyToUserId != null)
                {
                    if (TwitterTools.IsReplyToMe(status))
                    {
                        // すでに出ているMentionFrameが無いか検索
                        MentionFrame existFrame = null;
                        foreach (var mFrame in TwitterTools.mentionFrameList)
                        {
                            var replies = mFrame.GetStatus();
                            foreach (var reply in replies)
                            {
                                if (status.Equals(reply))
                                {
                                    existFrame = mFrame;
                                }
                                else if (status.InReplyToStatusId == reply.Id)
                                {
                                    existFrame = mFrame;
                                }
                            }
                        }

                        // 無かったら新規に表示
                        if (existFrame == null)
                        {
                            MentionFrame mFrame = new MentionFrame(status);
                            TwitterTools.mentionFrameList.Add(mFrame);
                            mFrame.Show();
                        }
                        else
                        {
                            existFrame.AddNewStatus(status);
                            existFrame.Activate();
                        }
                        existFrame = null;
                    }
                }
            });
        }
Пример #2
0
        private void ReplyIcon_MouseClick(object sender, MouseEventArgs e)
        {
            switch (parentFrame.Name)
            {
            case "MainFrame":
                mainFrame.SetReply(status.Id, user.ScreenName);
                break;

            case "ProfileFrame":
            case "MentionFrame":
                MentionFrame mentionFrame = new MentionFrame(status);
                mentionFrame.Show();
                break;

            default:
                break;
            }
        }
Пример #3
0
        private void DirectMailB_Click(object sender, EventArgs e)
        {
            MentionFrame mFrame = new MentionFrame(user.ScreenName);

            mFrame.Show();
        }
Пример #4
0
        private async void ActionMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            switch (e.ClickedItem.ToString())
            {
            case "通神帯接続":
                ActionMenu.Close();

                if (innerUrl != "")
                {
                    Process.Start(innerUrl);
                }
                else
                {
                    MessageBox.Show("リンクが無いよ");
                }
                break;

            case "会話を表示":
                ActionMenu.Close();

                if (status.InReplyToStatusId != null)
                {
                    // すでに出ているMentionFrameが無いか検索
                    MentionFrame existFrame = null;
                    foreach (var mentionFrame in TwitterTools.mentionFrameList)
                    {
                        var replies = mentionFrame.GetStatus();
                        foreach (var reply in replies)
                        {
                            if (status.Equals(reply))
                            {
                                existFrame = mentionFrame;
                            }
                        }
                    }

                    // 無かったら新規に表示
                    if (existFrame == null)
                    {
                        MentionFrame mFrame = new MentionFrame(status);
                        TwitterTools.mentionFrameList.Add(mFrame);
                        mFrame.Show();
                    }
                    else
                    {
                        existFrame.Activate();
                    }
                }
                else
                {
                    MessageBox.Show("会話が無いよ");
                }
                break;

            case "削除":
                MyActionMenu.Close();
                bool res = await TwitterTools.DestroyStatus(status);

                if (res)
                {
                    BackColor           = Color.FromArgb(150, 150, 150);
                    NameLabel.ForeColor = Color.FromArgb(1, 1, 1);
                }
                break;

            default:
                break;
            }
        }