mirror of
https://github.com/wmjordan/PDFPatcher.git
synced 2026-10-19 06:21:06 +08:00
7d279bc324
!重构代码
33 lines
693 B
C#
33 lines
693 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace PDFPatcher.Functions
|
|
{
|
|
sealed partial class TextViewerForm : Form
|
|
{
|
|
///<summary>获取或指定文本内容是否只读。</summary>
|
|
public bool IsTextReadOnly {
|
|
get => _TextBox.ReadOnly;
|
|
set {
|
|
_TextBox.ReadOnly = value;
|
|
_OkButton.Visible = !value;
|
|
}
|
|
}
|
|
|
|
///<summary>获取或指定文本内容。</summary>
|
|
public string TextContent {
|
|
get => _TextBox.Text;
|
|
set => _TextBox.Text = value;
|
|
}
|
|
|
|
public TextViewerForm() {
|
|
InitializeComponent();
|
|
}
|
|
|
|
public TextViewerForm(string textContent, bool isTextReadonly) : this() {
|
|
TextContent = textContent;
|
|
IsTextReadOnly = isTextReadonly;
|
|
}
|
|
}
|
|
}
|