[#20] MemberAdminWindow: Add MemberBusinessSharesAdminWindow to manage member shares
This commit is contained in:
@@ -164,10 +164,10 @@ namespace Elwig.Windows {
|
||||
} else if (input is TextBox tb && tb.Text.Length == 0) {
|
||||
ControlUtils.SetInputInvalid(input);
|
||||
Valid[input] = false;
|
||||
} else if (input is ComboBox cb && cb.SelectedItem == null && cb.ItemsSource != null && cb.ItemsSource.Cast<object>().Any()) {
|
||||
} else if (input is ComboBox cb && cb.SelectedItem == null && cb.HasItems) {
|
||||
ControlUtils.SetInputInvalid(input);
|
||||
Valid[input] = false;
|
||||
} else if (input is ListBox lb && lb.SelectedItem == null && lb.ItemsSource != null && lb.ItemsSource.Cast<object>().Any()) {
|
||||
} else if (input is ListBox lb && lb.SelectedItem == null && lb.HasItems) {
|
||||
ControlUtils.SetInputInvalid(input);
|
||||
Valid[input] = false;
|
||||
} else if (input is CheckBox ckb && ((ckb.IsThreeState && ckb.IsChecked == null) || (!ckb.IsThreeState && ckb.IsChecked != true))) {
|
||||
@@ -285,8 +285,13 @@ namespace Elwig.Windows {
|
||||
var binding = cb.GetBindingExpression(ComboBox.SelectedItemProperty);
|
||||
binding?.UpdateSource();
|
||||
}
|
||||
foreach (var lb in ListBoxInputs)
|
||||
lb.SelectedItems.Clear();
|
||||
foreach (var lb in ListBoxInputs) {
|
||||
if (lb.SelectionMode == SelectionMode.Single) {
|
||||
lb.SelectedItem = null;
|
||||
} else {
|
||||
lb.SelectedItems.Clear();
|
||||
}
|
||||
}
|
||||
foreach (var cb in CheckBoxInputs) {
|
||||
cb.IsChecked = cb.IsThreeState ? null : false;
|
||||
var binding = cb.GetBindingExpression(CheckBox.IsCheckedProperty);
|
||||
|
||||
Reference in New Issue
Block a user