WinHtmlEditor/Form/FindReplaceForm.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
#region Using directives
using System.Windows.Forms;
#endregion
namespace WinHtmlEditor
{
/// <summary>
/// Form designed to control Find and Replace operations
/// Find and Replace operations performed by the user control class
/// Delegates need to be defined to reference the class instances
/// </summary>
internal partial class FindReplaceForm : Form
{
// constants defining the form sizes
private const int FORM_HEIGHT_WITH_OPTION = 264;
private const int TAB_HEIGHT_WITH_OPTION = 216;
private const int FORM_HEIGHT_WITHOUT_OPTION = 200;
private const int TAB_HEIGHT_WITHOUT_OPTION = 152;
// private variables defining the state of the form
private bool options = false;
private bool findNotReplace = true;
private string findText;
private string replaceText;
// internal delegate reference
private FindReplaceResetDelegate FindReplaceReset;
private FindReplaceOneDelegate FindReplaceOne;
private FindReplaceAllDelegate FindReplaceAll;
private FindFirstDelegate FindFirst;
private FindNextDelegate FindNext;
/// <summary>
/// Public constructor that defines the required delegates
/// Delegates must be defined for the find and replace to operate
/// </summary>
public FindReplaceForm(string initText, FindReplaceResetDelegate resetDelegate, FindFirstDelegate findFirstDelegate, FindNextDelegate findNextDelegate, FindReplaceOneDelegate replaceOneDelegate, FindReplaceAllDelegate replaceAllDelegate, bool findOrReplace)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
// Define the initial state of the form assuming a Find command to be displayed first
DefineFindWindow(findOrReplace);
DefineOptionsWindow(options);
// ensure buttons not initially enabled
this.bFindNext.Enabled = false;
this.bReplace.Enabled = false;
this.bReplaceAll.Enabled = false;
// save the delegates used to perform find and replcae operations
this.FindReplaceReset = resetDelegate;
this.FindFirst = findFirstDelegate;
this.FindNext = findNextDelegate;
后面还有 186 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。