using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Блокнот { public partial class fSearch : Form { private readonly fMain fMa; public fSearch(fMain pfMain) { this.fMa = pfMain; InitializeComponent(); } private void btCancel_Click(object sender, EventArgs e) { this.Close(); } private void tbString_TextChanged(object sender, EventArgs e) { Textt.findText = tbString.Text; this.fMa.Search(); Textt.count = 0; lblCount.Text = Textt.count.ToString() + "/" + Textt.allCount.ToString(); } private void btSearchNext_Click_1(object sender, EventArgs e) { Textt.count++; if (Textt.count > Textt.allCount) { Textt.count = 1; } lblCount.Text = Textt.count.ToString() + "/" + Textt.allCount.ToString(); this.fMa.Selection(); } } }