Ejemplo n.º 1
0
        private void findToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FindForm frm = new FindForm();

            if (frm.ShowDialog(this) == DialogResult.Cancel)
            {
                return;
            }
            blank form = (blank)this.ActiveMdiChild;

            form.MdiParent = this;
            int start = form.richTextBox1.SelectionStart;

            form.richTextBox1.Find(frm.FindText, start, frm.FindCondition);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Показ формы для поиска/замены
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void menuActionFindReplace_Click(object sender, EventArgs e)
        {
            var          tsmi     = (ToolStripMenuItem)sender;
            TypeFindForm typeForm = tsmi.Name == menuActionFind.Name ? TypeFindForm.Find : TypeFindForm.Replace;

            if (m_FindForm == null || m_FindForm.IsDisposed)
            {
                m_FindForm = new FindForm(typeForm, this);
                m_FindForm.Show();
            }
            else
            {
                m_FindForm.SetType(typeForm);
                m_FindForm.Focus();
            }
        }
Ejemplo n.º 3
0
        private void findToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FindForm f1 = new FindForm();

            f1.ShowDialog();
            if (f1.getFindWord() != "")
            {
                int index = 0;
                while (index != -1 && index < textBox1.Text.Length)
                {
                    index = textBox1.Text.IndexOf(f1.getFindWord(), index);
                    if (index != -1)
                    {
                        textBox1.Select(index, f1.getFindWord().Length);

                        index++;
                        f1.ShowDialog();
                    }
                }
            }
        }