DeliveryAdminWindow: Small quality of life fixes
This commit is contained in:
@ -32,6 +32,7 @@ namespace Elwig.Windows {
|
||||
LockContext = IsEditing;
|
||||
}
|
||||
}
|
||||
protected bool DoShowWarningWindows = true;
|
||||
protected bool IsClosing { get; private set; }
|
||||
|
||||
private TextBox[] TextBoxInputs;
|
||||
@ -363,7 +364,7 @@ namespace Elwig.Windows {
|
||||
}
|
||||
|
||||
protected bool InputLostFocus(TextBox input, ValidationResult res, string? msg = null) {
|
||||
if (!res.IsValid && !IsClosing && (IsEditing || IsCreating))
|
||||
if (DoShowWarningWindows && !res.IsValid && !IsClosing && (IsEditing || IsCreating))
|
||||
System.Windows.MessageBox.Show(res.ErrorContent.ToString(), msg ?? res.ErrorContent.ToString(), MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
return res.IsValid;
|
||||
}
|
||||
|
Reference in New Issue
Block a user