mirror of
https://github.com/wmjordan/PDFPatcher.git
synced 2026-10-18 13:42:28 +08:00
7d279bc324
!重构代码
41 lines
842 B
C#
41 lines
842 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
using PDFPatcher.Model;
|
|
|
|
namespace PDFPatcher.Functions
|
|
{
|
|
sealed partial class PageRangeConditionEditor : UserControl, IFilterConditionEditor
|
|
{
|
|
AutoBookmarkCondition.PageRangeCondition _condition;
|
|
bool _lock;
|
|
|
|
public PageRangeConditionEditor() {
|
|
InitializeComponent();
|
|
}
|
|
|
|
#region ITextInfoFilterEditor 成员
|
|
|
|
public AutoBookmarkCondition Filter {
|
|
get => _condition;
|
|
set {
|
|
_condition = (AutoBookmarkCondition.PageRangeCondition)value;
|
|
_lock = true;
|
|
_PageRangeBox.Text = _condition.PageRange;
|
|
_lock = false;
|
|
}
|
|
}
|
|
|
|
public UserControl EditorControl => this;
|
|
|
|
#endregion
|
|
|
|
void ControlChanged(object sender, EventArgs e) {
|
|
if (_lock) {
|
|
return;
|
|
}
|
|
_condition.PageRange = _PageRangeBox.Text;
|
|
EditAdjustmentForm.UpdateFilter(this);
|
|
}
|
|
}
|
|
}
|