ContextWindow: Change renew context event handling

This commit is contained in:
2023-09-18 21:46:14 +02:00
parent a6fef7fd9b
commit 3a73265a75
7 changed files with 44 additions and 32 deletions

View File

@ -16,20 +16,20 @@ namespace Elwig.Windows {
protected Control[] ExemptInputs { private get; set; }
protected Control[] RequiredInputs { private get; set; }
private bool _IsEditing;
private bool _IsCreating;
private bool _isEditing;
private bool _isCreating;
protected bool IsEditing {
get { return _IsEditing; }
get { return _isEditing; }
set {
_IsEditing = value;
LockContext = IsEditing;
_isEditing = value;
LockContext = IsEditing || IsCreating;
}
}
protected bool IsCreating {
get { return _IsCreating; }
get { return _isCreating; }
set {
_IsCreating = value;
LockContext = IsEditing;
_isCreating = value;
LockContext = IsEditing || IsCreating;
}
}
protected bool DoShowWarningWindows = true;
@ -99,7 +99,7 @@ namespace Elwig.Windows {
abstract protected void UpdateButtons();
protected override async Task RenewContext() {
protected override async Task OnRenewContext() {
for (int i = 0; i < PlzInputs.Length; i++)
UpdatePlz(PlzInputs[i], PlzOrtInputs[i]);
}