internal void AddSubNode(frm_ReplyList frm, List<ReplyInfo> info)
        {
            if (frm.InvokeRequired)
            {
                while (!(frm.IsDisposed || frm.IsHandleCreated))
                {
                    return;
                }
                frm.Invoke(new AddSubNodeCallBack(AddSubNode), new object[] { frm, info });
            }
            else
            {
                List<TreeNode> childrenNodes = new List<TreeNode>();
                foreach (ReplyInfo thrInf in info)
                {
                    if (!((BlockList.IsContainsBlockTitle(thrInf.ReplyName)) || (BlockList.IsContainsBlockTitle(thrInf.ReplyLink))))
                    {
                        childrenNodes.Add(new TreeNode(thrInf.ReplyName) { Tag = thrInf.ReplyLink });
                    }

                }
                frm.tv_ReplyList.Nodes.Clear();
                //frm.tv_ReplyList.Nodes.Add(new TreeNode("タイトル一覧", childrenNodes.ToArray()));
                frm.tv_ReplyList.Nodes.AddRange(childrenNodes.ToArray());
                frm.tv_ReplyList.ExpandAll();
                frm.Text = "タイトル一覧のロード完了しました。";
                frm.btn_Reload.Enabled = true;
            }
        }
        private void LoadSubReply(frm_ReplyList frm, ReplyInfo info)
        {
            if (frm.InvokeRequired)
            {
                while (!(frm.IsDisposed || frm.IsHandleCreated))
                {
                    return;
                }
                frm.Invoke(new LoadSubReplyCallBack(LoadSubReply), new object[] { frm, info });
            }
            else
            {
                frm.tb_thread_title.Text = info.ReplyTitle;
                frm.tb_thread_name.Text = info.ReplySubmitter;
                frm.tb_thread_email.Text = info.ReplyEmail;
                frm.tb_thread_tid.Text = info.ReplyId;
                frm.rtb_thread_main.Text = info.ReplyMain;
                frm.tb_ReplyDate.Text = ReplyInfo.ToJPDate(info.ReplyTime);
                if (info.FcSet != null)
                {
                    frm.rtb_thread_main.Font = info.FcSet.TextFont;
                    frm.rtb_thread_main.ForeColor = info.FcSet.TextColor;
                    frm.rtb_thread_main.BackColor = info.FcSet.BackColor;
                }
                else
                {
                    frm.rtb_thread_main.Font = FontSet.defaultSet.TextFont;
                    frm.rtb_thread_main.ForeColor = FontSet.defaultSet.TextColor;
                    frm.rtb_thread_main.BackColor = FontSet.defaultSet.BackColor;
                }
                if (info.HttpLinks != null)
                {
                    if (info.HttpLinks.Length > 0)
                    {
                        btn_ReadImage.Tag = info.HttpLinks;
                        btn_ReadImage.Enabled = true;
                    }
                    else
                    {
                        btn_ReadImage.Tag = null;
                        btn_ReadImage.Enabled = false;
                    }
                }
                else
                {
                    btn_ReadImage.Tag = null;
                    btn_ReadImage.Enabled = false;
                }

                frm.Text = "リプライをロード完了しました。";
                frm.SetControlEnabled(frm.tv_ReplyList, true);
                frm.SetControlEnabled(frm.btn_ByReply, true);
                frm.SetControlEnabled(frm.btn_Reload, true);
                frm.SetControlEnabled(frm.dtp_Before, true);
                frm.SetControlEnabled(frm.dtp_After, true);

            }
        }
 private static void ReplyClear(frm_ReplyList frm)
 {
     if (frm == null)
     {
         return;
     }
     if (frm.InvokeRequired)
     {
         while (!(frm.IsDisposed || frm.IsHandleCreated))
         {
             return;
         }
         frm.Invoke(new ReplyClearCallBack(ReplyClear), new object[] { frm });
     }
     else
     {
         frm.tb_thread_title.Clear();
         frm.tb_thread_tid.Clear();
         frm.tb_thread_title.Clear();
         frm.tb_thread_name.Clear();
         frm.tb_thread_email.Clear();
         frm.tb_thread_tid.Clear();
         frm.rtb_thread_main.Clear();
         frm.tb_ReplyDate.Clear();
     }
 }
        internal void LoadSubReply(frm_ReplyList frm, SortedDictionary<int, ReplyInfo> selectedThread)
        {
            if (frm.InvokeRequired)
            {
                while (!(frm.IsDisposed || frm.IsHandleCreated))
                {
                    return;
                }
                frm.Invoke(new LoadSubReplyALLCallBack(LoadSubReply), new object[] { frm, selectedThread });
            }
            else
            {
                if (frm.NowThread != null)
                {
                    frm.NowThread = selectedThread;
                    BlindToComboBox();
                }

            }
        }
 internal void CannotReadTitles(frm_ReplyList frm)
 {
     if (frm.InvokeRequired)
     {
         while (!(frm.IsDisposed || frm.IsHandleCreated))
         {
             return;
         }
         frm.Invoke(new CannotReadTitlesCallBack(CannotReadTitles), new object[] { frm });
     }
     else
     {
         frm.Text = "タイトル一覧のロードできませんでした。";
         frm.btn_Reload.Enabled = true;
     }
 }
Beispiel #6
0
        private static void AddNodes(frm_ReplyList ReplyLst, List<ReplyInfo> ReplyInfos)
        {
            if (ReplyInfos == null)
            {
                ReplyLst.CannotReadTitles(ReplyLst);
                return;
            }
            else
            {

                if (ReplyLst.InvokeRequired)
                {
                    while (!(ReplyLst.IsDisposed || ReplyLst.IsHandleCreated))
                    {
                        return;
                    }
                    ReplyLst.Invoke(new AddNodesCallBack(AddNodes), new object[] { ReplyLst, ReplyInfos });
                }
                else
                {
                    ReplyLst.AddSubNode(ReplyLst, ReplyInfos);

                }
            }
        }