This commit is contained in:
Hakoyu 2023-11-19 00:04:27 +08:00
parent 49ee9a67f5
commit 5709e36e8e

View File

@ -35,10 +35,19 @@ public class SaveTranslationModWindowVM
CheckCultures.Add(model);
CheckAll.AddNotifySender(model.IsChecked);
}
CheckAll.ValueChanged += CheckAll_ValueChanged;
CheckAll.SenderPropertyChanged += CheckAll_SenderPropertyChanged;
SaveCommand.ExecuteEvent += Save;
}
private void CheckAll_ValueChanged(bool? oldValue, bool? newValue)
{
if (newValue is null)
return;
foreach (var model in CheckCultures)
model.IsChecked.Value = newValue.Value;
}
private void CheckAll_SenderPropertyChanged(ObservableValue<bool?> source, INotifyPropertyChanged sender)
{
var count = 0;