public FindForm(MainForm callingForm) { mainForm = callingForm as MainForm; TB = mainForm.richTextBox; index = 0; InitializeComponent(); matchCaseCheckBox_CheckedChanged(this, EventArgs.Empty); }
public DocumentStatus(string fileName, MainForm callingForm) { mainForm = callingForm as MainForm; if (File.Exists(fileName)) { this.fileName = fileName; callingForm.richTextBox.LoadFile(fileName, RichTextBoxStreamType.PlainText); } }