Exemple #1
0
 private void cutToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (m_tbLastClicked != null)
     {
         if (m_tbLastClicked.SelectionLength == 0)
         {
             m_tbLastClicked.SelectAll();
         }
         m_tbLastClicked.Cut();
     }
 }
        public DialogResult ShowDialog(string strBadWord, string strReplacement, string strOriginalWord, bool bShowDelete)
        {
            textBoxBadWord.Text     = strBadWord;
            textBoxReplacement.Text = strReplacement;

            textBoxReplacement.Focus();
            textBoxReplacement.SelectAll();

            this.buttonDelete.Visible = bShowDelete;

            if (strBadWord != strReplacement)
            {
                this.Text = "Existing Replacement Rule";
                if (!String.IsNullOrEmpty(strOriginalWord))
                {
                    this.labelOrigReasonLabel.Visible = true;
                    this.labelOriginalReason.Visible  = true;
                    this.labelOriginalReason.Text     = strOriginalWord;
                }
            }

            return(base.ShowDialog());
        }