亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? searchandreplace.cs

?? 文本編輯器 編輯文本格式文件
?? CS
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace Editor
{
	/// <summary>
	/// SearchAndReplace 的摘要說明。
	/// </summary>
	public class SearchAndReplace : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.TextBox txtSearch;
		private System.Windows.Forms.RadioButton radioUp;
		private System.Windows.Forms.RadioButton radioDown;
		private System.Windows.Forms.CheckBox checkCase;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Button btnSearch;
		private System.Windows.Forms.Button btnReplace;
		private System.Windows.Forms.Button btnReplaceAll;
		private System.Windows.Forms.TextBox txtReplace;
		/// <summary>
		/// 必需的設計器變量。
		/// </summary>
		private System.ComponentModel.Container components = null;
		private MainForm parentForm;

		public SearchAndReplace(MainForm parent)
		{
			//
			// Windows 窗體設計器支持所必需的
			//
			InitializeComponent();

			this.parentForm = parent;

			//
			// TODO: 在 InitializeComponent 調用后添加任何構造函數代碼
			//
		}

		/// <summary>
		/// 清理所有正在使用的資源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗體設計器生成的代碼
		/// <summary>
		/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
		/// 此方法的內容。
		/// </summary>
		private void InitializeComponent()
		{
			this.label1 = new System.Windows.Forms.Label();
			this.txtSearch = new System.Windows.Forms.TextBox();
			this.radioUp = new System.Windows.Forms.RadioButton();
			this.radioDown = new System.Windows.Forms.RadioButton();
			this.checkCase = new System.Windows.Forms.CheckBox();
			this.label2 = new System.Windows.Forms.Label();
			this.txtReplace = new System.Windows.Forms.TextBox();
			this.btnSearch = new System.Windows.Forms.Button();
			this.btnReplace = new System.Windows.Forms.Button();
			this.btnReplaceAll = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(16, 16);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(56, 16);
			this.label1.TabIndex = 0;
			this.label1.Text = "查找內容";
			// 
			// txtSearch
			// 
			this.txtSearch.Location = new System.Drawing.Point(80, 8);
			this.txtSearch.Name = "txtSearch";
			this.txtSearch.Size = new System.Drawing.Size(160, 21);
			this.txtSearch.TabIndex = 1;
			this.txtSearch.Text = "";
			// 
			// radioUp
			// 
			this.radioUp.Location = new System.Drawing.Point(120, 72);
			this.radioUp.Name = "radioUp";
			this.radioUp.Size = new System.Drawing.Size(48, 24);
			this.radioUp.TabIndex = 2;
			this.radioUp.Text = "向上";
			// 
			// radioDown
			// 
			this.radioDown.Checked = true;
			this.radioDown.Location = new System.Drawing.Point(192, 72);
			this.radioDown.Name = "radioDown";
			this.radioDown.Size = new System.Drawing.Size(48, 24);
			this.radioDown.TabIndex = 3;
			this.radioDown.TabStop = true;
			this.radioDown.Text = "向下";
			// 
			// checkCase
			// 
			this.checkCase.Location = new System.Drawing.Point(16, 72);
			this.checkCase.Name = "checkCase";
			this.checkCase.Size = new System.Drawing.Size(88, 24);
			this.checkCase.TabIndex = 4;
			this.checkCase.Text = "區分大小寫";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(16, 48);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(56, 16);
			this.label2.TabIndex = 0;
			this.label2.Text = "替換為";
			// 
			// txtReplace
			// 
			this.txtReplace.Location = new System.Drawing.Point(80, 40);
			this.txtReplace.Name = "txtReplace";
			this.txtReplace.Size = new System.Drawing.Size(160, 21);
			this.txtReplace.TabIndex = 1;
			this.txtReplace.Text = "";
			// 
			// btnSearch
			// 
			this.btnSearch.Location = new System.Drawing.Point(272, 8);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.TabIndex = 5;
			this.btnSearch.Text = "查找";
			this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
			// 
			// btnReplace
			// 
			this.btnReplace.Location = new System.Drawing.Point(272, 40);
			this.btnReplace.Name = "btnReplace";
			this.btnReplace.TabIndex = 6;
			this.btnReplace.Text = "替換";
			this.btnReplace.Click += new System.EventHandler(this.btnReplace_Click);
			// 
			// btnReplaceAll
			// 
			this.btnReplaceAll.Location = new System.Drawing.Point(360, 40);
			this.btnReplaceAll.Name = "btnReplaceAll";
			this.btnReplaceAll.TabIndex = 7;
			this.btnReplaceAll.Text = "全部替換";
			this.btnReplaceAll.Click += new System.EventHandler(this.btnReplaceAll_Click);
			// 
			// SearchAndReplace
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(456, 101);
			this.Controls.Add(this.btnReplaceAll);
			this.Controls.Add(this.btnReplace);
			this.Controls.Add(this.btnSearch);
			this.Controls.Add(this.checkCase);
			this.Controls.Add(this.radioDown);
			this.Controls.Add(this.txtSearch);
			this.Controls.Add(this.txtReplace);
			this.Controls.Add(this.radioUp);
			this.Controls.Add(this.label1);
			this.Controls.Add(this.label2);
			this.Name = "SearchAndReplace";
			this.Text = "查找替換";
			this.Load += new System.EventHandler(this.SearchAndReplace_Load);
			this.ResumeLayout(false);

		}
		#endregion

		private string strSearch = ""; // 表示要查找的字符串
		private string strReplace = "";// 表示要替換成的字符串
		private int searchPos = 0,lastSearchPos = 0;// 前者表示當前的查找位置,后者表示上次的查找位置
		private void btnSearch_Click(object sender, System.EventArgs e)
		{
			this.strSearch = this.txtSearch.Text;
			SearchText(true);
		}

		private void btnReplace_Click(object sender, System.EventArgs e)
		{
			this.strSearch = this.txtSearch.Text;
			this.strReplace = this.txtReplace.Text;
			SearchText(true);
			if(this.parentForm.txtMain.SelectedText.Length > 0)
			{
				this.parentForm.txtMain.SelectedText = this.strReplace;
			}
		}

		private void btnReplaceAll_Click(object sender, System.EventArgs e)
		{
			this.strSearch = this.txtSearch.Text;
			this.strReplace = this.txtReplace.Text;
			while(SearchText(false))
			{
				if(this.parentForm.txtMain.SelectedText.Length > 0)
				{
					this.parentForm.txtMain.SelectedText = this.strReplace;
				}
			}
		}
		private bool SearchText(bool ShowNotFind)
			// 函數完成文本的查找功能,參數表示是否在未找到指定文本時顯示消息,
			// 返回值為是否找到指定文本
		{
			bool find = true;
			if(this.checkCase.Checked)// 表示大小寫匹配查找
			{
				if(this.radioDown.Checked) // 表示向下查找
				{
					this.searchPos = this.parentForm.txtMain.Find(this.strSearch,searchPos,
						this.parentForm.txtMain.Text.Length,RichTextBoxFinds.MatchCase);
				}
				else
				{
					this.searchPos = this.parentForm.txtMain.Find(this.strSearch,0,
						searchPos,RichTextBoxFinds.MatchCase | RichTextBoxFinds.Reverse);
				}
			}
			else
			{
				if(this.radioDown.Checked)
				{
					this.searchPos = this.parentForm.txtMain.Find(this.strSearch,searchPos,
						this.parentForm.txtMain.Text.Length,RichTextBoxFinds.None);
				}
				else
				{
					this.searchPos = this.parentForm.txtMain.Find(this.strSearch,0,
						searchPos,RichTextBoxFinds.Reverse);
				}
			}
			if(this.searchPos < 0)//如果未找到,則顯示信息,將上次查找位置復原,置標志位為未找到
			{
				if(ShowNotFind)
				{
					MessageBox.Show("指定的文本未找到","文本編輯器",MessageBoxButtons.OK,
						MessageBoxIcon.Information);
				}
				this.searchPos = this.lastSearchPos;
				find = false;
			}
			else
			{
				if(this.radioDown.Checked)
				{
					this.searchPos += this.strSearch.Length;
				}
				else
				{
					this.searchPos -= this.strSearch.Length;
				}
				this.parentForm.Focus();// 使主窗體獲得焦點
			}
			this.lastSearchPos = this.searchPos;
			return find;
		}

		private void SearchAndReplace_Load(object sender, System.EventArgs e)
		{
		
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品毛片久久久久久久| 亚洲成人免费在线| 欧美视频一区在线| 国产一区二区三区精品欧美日韩一区二区三区 | 免费一级欧美片在线观看| 久久久久国产精品麻豆| 欧美妇女性影城| 成人免费精品视频| 激情丁香综合五月| 天天色天天爱天天射综合| 亚洲欧美一区二区三区极速播放| 日韩欧美高清一区| 欧美日韩亚州综合| 91香蕉视频黄| 成人app在线观看| 极品尤物av久久免费看| 日韩精品成人一区二区在线| 亚洲欧美日本韩国| 国产精品美女久久久久久2018| 日韩欧美中文字幕公布| 欧美日韩一区二区三区在线看| 99国产精品久久久| 国产成人av一区| 国产在线精品一区在线观看麻豆| 日本午夜精品视频在线观看| 伊人婷婷欧美激情| 亚洲日本青草视频在线怡红院| 欧美激情一区二区三区| 久久综合九色综合97婷婷女人| 91精品国产色综合久久不卡蜜臀| 欧美丝袜丝交足nylons| 在线日韩国产精品| 欧美在线一二三四区| 色激情天天射综合网| 色婷婷亚洲综合| 91久久精品日日躁夜夜躁欧美| 91免费看`日韩一区二区| 成人激情午夜影院| www.色综合.com| 一本色道久久综合亚洲91| 99久久国产综合精品麻豆| 成人黄动漫网站免费app| 福利电影一区二区三区| av在线播放一区二区三区| 99精品桃花视频在线观看| eeuss鲁一区二区三区| 99国产精品视频免费观看| 色视频欧美一区二区三区| 日本久久精品电影| 欧美日本一区二区| 91精品国产91热久久久做人人| 欧美一区二区播放| 日韩精品一区国产麻豆| 亚洲va欧美va人人爽| 亚洲国产精品久久艾草纯爱| 亚洲高清免费视频| 奇米精品一区二区三区在线观看一| 麻豆成人在线观看| 国产成人免费在线视频| 91蝌蚪国产九色| 欧美日韩精品系列| 精品欧美黑人一区二区三区| 久久精品一区蜜桃臀影院| 国产精品乱码久久久久久| 亚洲精品一二三| 日韩电影免费一区| 高清beeg欧美| 欧美日韩一区二区在线观看视频| 日韩欧美久久久| 中文字幕一区二区三| 亚洲一二三级电影| 国产老妇另类xxxxx| 一本色道综合亚洲| 精品国产一区二区精华| 亚洲人成亚洲人成在线观看图片| 午夜精品福利在线| 国产成人福利片| 欧美人狂配大交3d怪物一区| 久久先锋影音av| 一区二区三区精密机械公司| 久久国产精品色| 99久久综合狠狠综合久久| 91精品综合久久久久久| 国产精品少妇自拍| 蜜臀av性久久久久蜜臀aⅴ四虎 | jlzzjlzz亚洲女人18| 欧美性大战久久| 国产亚洲欧美中文| 视频在线观看一区二区三区| 成人的网站免费观看| 91精品国产综合久久精品麻豆| 国产欧美日产一区| 日韩黄色小视频| 91香蕉国产在线观看软件| 久久一区二区三区四区| 污片在线观看一区二区| 国产传媒一区在线| 欧美一级二级三级乱码| 一区二区三区美女| 成人伦理片在线| 亚洲精品在线三区| 午夜精品久久久久| 色天使色偷偷av一区二区| 国产午夜三级一区二区三| 日本中文字幕一区| 欧美日韩视频第一区| 亚洲视频免费在线观看| 国产另类ts人妖一区二区| 日韩欧美中文字幕制服| 亚洲r级在线视频| 色综合色狠狠综合色| 国产精品久久久久一区二区三区共| 日本三级亚洲精品| 欧美三日本三级三级在线播放| 亚洲日本欧美天堂| 99精品国产一区二区三区不卡| 精品国产污网站| 日韩电影在线观看网站| 欧美高清精品3d| 午夜精品一区二区三区电影天堂 | 99精品欧美一区| 久久久久高清精品| 国产一区二区三区免费播放| 日韩亚洲欧美中文三级| 日日夜夜精品免费视频| 欧美日韩在线电影| 亚洲午夜成aⅴ人片| 欧美性做爰猛烈叫床潮| 亚洲视频1区2区| 99久久综合狠狠综合久久| 亚洲欧洲另类国产综合| fc2成人免费人成在线观看播放| 国产精品另类一区| av在线不卡免费看| 亚洲色图都市小说| 色94色欧美sute亚洲线路一ni | 国产一区二区精品久久91| 精品少妇一区二区三区日产乱码| 全国精品久久少妇| 欧美xfplay| 国产99久久久国产精品潘金| 国产精品入口麻豆原神| 色综合天天综合在线视频| 亚洲综合在线免费观看| 欧美三级午夜理伦三级中视频| 亚洲一级二级三级| 欧美一级一区二区| 国产精品影视在线观看| 国产精品美女一区二区三区 | 国内成+人亚洲+欧美+综合在线 | 一区视频在线播放| 日本丶国产丶欧美色综合| 亚洲国产wwwccc36天堂| 欧美一区二区成人| 国产99久久久国产精品| 日韩久久一区二区| 欧美日韩在线精品一区二区三区激情 | 欧美日韩国产一级| 美女视频黄a大片欧美| 久久伊人中文字幕| 不卡av免费在线观看| 亚洲色图色小说| 欧美一区二区三区公司| 国产精品系列在线观看| 怡红院av一区二区三区| 日韩欧美电影一区| 成人app软件下载大全免费| 一区二区三区精品视频| 精品国产乱码91久久久久久网站| 粉嫩av一区二区三区粉嫩 | 亚洲一区二区在线免费观看视频| 91精品午夜视频| 成人蜜臀av电影| 日本午夜一本久久久综合| 中文字幕欧美区| 欧美色图一区二区三区| 久久97超碰国产精品超碰| 亚洲三级小视频| 日韩精品一区二区三区蜜臀| 99国产精品久久久久| 日本美女一区二区三区| 国产精品成人一区二区三区夜夜夜| 欧美三级午夜理伦三级中视频| 国产风韵犹存在线视精品| 亚洲国产欧美在线人成| 久久精品亚洲一区二区三区浴池| 色视频一区二区| 国产精品18久久久久久vr| 亚洲bt欧美bt精品| 国产精品国产三级国产专播品爱网| 欧美日韩久久不卡| av电影在线观看完整版一区二区 | 91久久精品日日躁夜夜躁欧美| 精品一区二区在线视频| 亚洲激情在线激情| 中文av字幕一区| 精品日韩在线一区| 欧美男人的天堂一二区| 91麻豆国产福利精品| 成人综合在线观看|