Esempio n. 1
0
        private void btn_newThr_Click(object sender, EventArgs e)
        {
            if (frm_NewThr != null)
            {
                if (frm_NewThr.Visible)
                {
                    if (frm_NewThr.WindowState != FormWindowState.Normal)
                    {
                        frm_NewThr.WindowState = FormWindowState.Normal;

                    }
                    frm_NewThr.tb_thread_title.ReadOnly = false;
                    frm_NewThr.Focus();
                    frm_NewThr.tb_thread_tid.Clear();
                    if (!string.IsNullOrEmpty(frm_NewThr.rtb_thread_main.Text.Trim()))
                    {
                        if (MessageBox.Show("タイトルと本文をクリアしますか?", "操作確認", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK)
                        {
                            if (MessageBox.Show("クリアする前に本文をファイルに保存しますか?", "操作確認", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK)
                            {
                                frm_NewThr.SaveToFile();
                            }

                            frm_NewThr.tb_thread_title.Clear();
                            frm_NewThr.rtb_thread_main.Clear();

                        }
                    }
                }
                else
                {
                    if (frm_NewThr.IsDisposed)
                    {
                        frm_NewThr = new frm_NewThread();
                        frm_NewThr.ReplyList = this;
                        frm_NewThr.tb_thread_title.ReadOnly = false;
                    }
                    frm_NewThr.Show();
                }
            }
            else
            {
                frm_NewThr = new frm_NewThread();
                frm_NewThr.tb_thread_title.ReadOnly = false;
                frm_NewThr.ReplyList = this;
                frm_NewThr.Show();
                frm_NewThr.tb_thread_title.Focus();
            }
        }
Esempio n. 2
0
 void btn_ByReply_Click(object sender, EventArgs e)
 {
     if (frm_NewThr != null)
     {
         if (frm_NewThr.Visible)
         {
             if (frm_NewThr.WindowState != FormWindowState.Normal)
             {
                 frm_NewThr.WindowState = FormWindowState.Normal;
             }
             frm_NewThr.tb_thread_tid.Text = tb_thread_tid.Text.Clone().ToString();
             frm_NewThr.tb_thread_title.Text = tb_thread_title.Text.Clone().ToString();
             frm_NewThr.tb_thread_title.ReadOnly = false;
             frm_NewThr.Focus();
         }
         else
         {
             if (frm_NewThr.IsDisposed)
             {
                 frm_NewThr = new frm_NewThread();
                 frm_NewThr.ReplyList = this;
             }
             frm_NewThr.tb_thread_tid.Text = tb_thread_tid.Text.Clone().ToString();
             frm_NewThr.tb_thread_title.Text = tb_thread_title.Text.Clone().ToString();
             frm_NewThr.tb_thread_title.Enabled = false;
             frm_NewThr.Show();
             frm_NewThr.Focus();
         }
     }
     else
     {
         frm_NewThr = new frm_NewThread();
         frm_NewThr.ReplyList = this;
         frm_NewThr.LoadFontSetAtFormLoad = true;
         frm_NewThr.setFontDontSave = false;
         frm_NewThr.tb_thread_tid.Text = tb_thread_tid.Text.Clone().ToString();
         frm_NewThr.tb_thread_title.Text = tb_thread_title.Text.Clone().ToString();
         frm_NewThr.tb_thread_title.Enabled = false;
         frm_NewThr.Show();
         this.WindowState = FormWindowState.Minimized;
         frm_NewThr.tb_thread_name.Focus();
     }
 }