added sort and replace

This commit is contained in:
max
2026-01-19 18:42:20 +01:00
parent a6cebe27e6
commit 89dc4f73d2
2 changed files with 147 additions and 48 deletions

View File

@@ -33,16 +33,18 @@
btn_clear = new Button();
lbl_found = new Label();
txtbx_text = new RichTextBox();
txbx_replace = new TextBox();
txtbx_replace = new TextBox();
btn_replace = new Button();
btn_sort = new Button();
SuspendLayout();
//
// btn_find
//
btn_find.Anchor = AnchorStyles.Top | AnchorStyles.Right;
btn_find.Location = new Point(676, 6);
btn_find.Location = new Point(647, 4);
btn_find.Margin = new Padding(2);
btn_find.Name = "btn_find";
btn_find.Size = new Size(112, 34);
btn_find.Size = new Size(78, 24);
btn_find.TabIndex = 1;
btn_find.Text = "Find";
btn_find.UseVisualStyleBackColor = true;
@@ -51,17 +53,19 @@
// txtbx_find
//
txtbx_find.Anchor = AnchorStyles.Top | AnchorStyles.Right;
txtbx_find.Location = new Point(520, 6);
txtbx_find.Location = new Point(538, 4);
txtbx_find.Margin = new Padding(2);
txtbx_find.Name = "txtbx_find";
txtbx_find.PlaceholderText = "Search text";
txtbx_find.Size = new Size(150, 31);
txtbx_find.Size = new Size(106, 23);
txtbx_find.TabIndex = 2;
//
// btn_clear
//
btn_clear.Location = new Point(12, 9);
btn_clear.Location = new Point(8, 5);
btn_clear.Margin = new Padding(2);
btn_clear.Name = "btn_clear";
btn_clear.Size = new Size(112, 34);
btn_clear.Size = new Size(78, 23);
btn_clear.TabIndex = 3;
btn_clear.Text = "Clear";
btn_clear.UseVisualStyleBackColor = true;
@@ -71,9 +75,10 @@
//
lbl_found.Anchor = AnchorStyles.Top | AnchorStyles.Right;
lbl_found.AutoSize = true;
lbl_found.Location = new Point(676, 44);
lbl_found.Location = new Point(647, 30);
lbl_found.Margin = new Padding(2, 0, 2, 0);
lbl_found.Name = "lbl_found";
lbl_found.Size = new Size(108, 25);
lbl_found.Size = new Size(71, 15);
lbl_found.TabIndex = 4;
lbl_found.Text = "items found";
lbl_found.Visible = false;
@@ -81,44 +86,61 @@
// txtbx_text
//
txtbx_text.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
txtbx_text.Location = new Point(12, 72);
txtbx_text.Location = new Point(8, 47);
txtbx_text.Margin = new Padding(2);
txtbx_text.Name = "txtbx_text";
txtbx_text.Size = new Size(776, 352);
txtbx_text.Size = new Size(718, 355);
txtbx_text.TabIndex = 5;
txtbx_text.Text = "";
//
// txbx_replace
// txtbx_replace
//
txbx_replace.Location = new Point(171, 8);
txbx_replace.Name = "txbx_replace";
txbx_replace.PlaceholderText = "Replace found text with";
txbx_replace.Size = new Size(197, 31);
txbx_replace.TabIndex = 6;
txtbx_replace.Anchor = AnchorStyles.Top | AnchorStyles.Right;
txtbx_replace.Location = new Point(312, 5);
txtbx_replace.Margin = new Padding(2);
txtbx_replace.Name = "txtbx_replace";
txtbx_replace.PlaceholderText = "Replace found text with";
txtbx_replace.Size = new Size(139, 23);
txtbx_replace.TabIndex = 6;
//
// btn_replace
//
btn_replace.Location = new Point(374, 6);
btn_replace.Anchor = AnchorStyles.Top | AnchorStyles.Right;
btn_replace.Location = new Point(454, 4);
btn_replace.Margin = new Padding(2);
btn_replace.Name = "btn_replace";
btn_replace.Size = new Size(112, 34);
btn_replace.Size = new Size(78, 24);
btn_replace.TabIndex = 7;
btn_replace.Text = "Replace found";
btn_replace.UseVisualStyleBackColor = true;
btn_replace.Click += btn_replace_Click;
//
// btn_sort
//
btn_sort.Location = new Point(91, 5);
btn_sort.Name = "btn_sort";
btn_sort.Size = new Size(96, 23);
btn_sort.TabIndex = 8;
btn_sort.Text = "Sort Words";
btn_sort.UseVisualStyleBackColor = true;
btn_sort.Click += btn_sort_Click;
//
// Form1
//
AutoScaleDimensions = new SizeF(10F, 25F);
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
ClientSize = new Size(734, 416);
Controls.Add(btn_sort);
Controls.Add(btn_replace);
Controls.Add(txbx_replace);
Controls.Add(txtbx_replace);
Controls.Add(txtbx_text);
Controls.Add(lbl_found);
Controls.Add(btn_clear);
Controls.Add(txtbx_find);
Controls.Add(btn_find);
Margin = new Padding(2);
Name = "Form1";
Text = "TextChecker";
Text = "Text Tool";
ResumeLayout(false);
PerformLayout();
}
@@ -129,7 +151,8 @@
private Button btn_clear;
private Label lbl_found;
private RichTextBox txtbx_text;
private TextBox txbx_replace;
private TextBox txtbx_replace;
private Button btn_replace;
private Button btn_sort;
}
}