Advertisement
Guest User

Search form

a guest
Sep 30th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.19 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace Блокнот
  12. {
  13.     public partial class fSearch : Form
  14.     {
  15.         private readonly fMain fMa;
  16.  
  17.         public fSearch(fMain pfMain)
  18.         {
  19.             this.fMa = pfMain;
  20.             InitializeComponent();
  21.         }
  22.         private void btCancel_Click(object sender, EventArgs e)
  23.         {
  24.             this.Close();
  25.         }
  26.         private void tbString_TextChanged(object sender, EventArgs e)
  27.         {
  28.             Textt.findText = tbString.Text;
  29.             this.fMa.Search();
  30.             Textt.count = 0;
  31.             lblCount.Text = Textt.count.ToString() + "/" + Textt.allCount.ToString();
  32.         }
  33.         private void btSearchNext_Click_1(object sender, EventArgs e)
  34.         {
  35.             Textt.count++;
  36.             if (Textt.count > Textt.allCount)
  37.             {
  38.                 Textt.count = 1;
  39.             }
  40.             lblCount.Text = Textt.count.ToString() + "/" + Textt.allCount.ToString();
  41.             this.fMa.Selection();
  42.         }
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement