|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace TextRuler.Dialogs
{
public partial class dlgFind : Form
{
AdvancedTextEditorControl.AdvancedTextEditor caller;
int lastStop = 0;
internal AdvancedTextEditorControl.AdvancedTextEditor Caller
{
set { caller = value; }
}
public dlgFind()
{
InitializeComponent();
}
private RichTextBoxFinds GetOptions()
{
RichTextBoxFinds rtbf = new RichTextBoxFinds();
rtbf = RichTextBoxFinds.None;
if (this.chkMatchCase.Checked == true)
{
rtbf = rtbf | RichTextBoxFinds.MatchCase;
}
if (this.chkWholeWord.Checked == true)
{
rtbf = rtbf | RichTextBoxFinds.WholeWord;
}
return rtbf;
}
private void btnFindNext_Click(object sender, EventArgs e)
{
if (lastStop == -1) { lastStop = 0; }
lastStop = caller.TextEditor.Find(this.txtFindThis.Text, lastStop, GetOptions());
if (lastStop == -1)
{
MessageBox.Show("Search is completed.");
}
else
{
lastStop = lastStop + this.txtFindThis.Text.Length;
}
}
private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Currently I am studying at East Kazakhstan State Technical University. My future occupation is engineer-programmer.
I use Visual Basic, C#, Delphi and a little C++. Also I am interested in using SQL and Perl.