1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace test
{
class InterfaceRecherche : Form
{
private TextBox textBox2;
private Label label1;
private Label label2;
private Button button1;
private Button button2;
private Button button3;
private Button button4;
private TextBox textBox1;
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(16, 37);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(251, 20);
this.textBox1.TabIndex = 0;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(16, 99);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(251, 20);
this.textBox2.TabIndex = 1;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(17, 21);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Find";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(17, 73);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(69, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Replace with";
//
// button1
//
this.button1.Location = new System.Drawing.Point(16, 169);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(95, 29);
this.button1.TabIndex = 4;
this.button1.Text = "Find";
this.button1.UseVisualStyleBackColor = true;
//
// button2
//
this.button2.Location = new System.Drawing.Point(166, 170);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(101, 28);
this.button2.TabIndex = 5;
this.button2.Text = "Find All";
this.button2.UseVisualStyleBackColor = true;
//
// button3
//
this.button3.Location = new System.Drawing.Point(16, 219);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(95, 29);
this.button3.TabIndex = 6;
this.button3.Text = "Replace";
this.button3.UseVisualStyleBackColor = true;
//
// button4
//
this.button4.Location = new System.Drawing.Point(166, 219);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(100, 28);
this.button4.TabIndex = 7;
this.button4.Text = "Replace All";
this.button4.UseVisualStyleBackColor = true;
//
// InterfaceRecherche
//
this.ClientSize = new System.Drawing.Size(284, 268);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Name = "InterfaceRecherche";
this.Text = "Find & Replace";
this.ResumeLayout(false);
this.PerformLayout();
}
}
}
et voici le code de l'appel :
123456 |
private void findToolStripMenuItem_Click(object sender, EventArgs e)
{
InterfaceRecherche ir = new InterfaceRecherche();
ir.ShowDialog();
} |
|
Partager