using System;
using System.Windows.Forms;
namespace PDFPatcher.Functions
{
sealed partial class TextViewerForm : Form
{
///获取或指定文本内容是否只读。
public bool IsTextReadOnly {
get => _TextBox.ReadOnly;
set {
_TextBox.ReadOnly = value;
_OkButton.Visible = !value;
}
}
///获取或指定文本内容。
public string TextContent {
get => _TextBox.Text;
set => _TextBox.Text = value;
}
public TextViewerForm() {
InitializeComponent();
}
public TextViewerForm(string textContent, bool isTextReadonly) : this() {
TextContent = textContent;
IsTextReadOnly = isTextReadonly;
}
}
}