Поправил UI, добавил команду автотренировки аккумулятора

This commit is contained in:
ftc
2024-03-10 16:09:35 +03:00
parent f586f4174c
commit ac7045e063
10 changed files with 189 additions and 64 deletions
+15
View File
@@ -79,5 +79,20 @@ namespace charger_gui
model.CurrentOperation = new ChargeOperation(log, model);
model.CurrentOperation.Start();
}
private void TrainButton_Click(object sender, RoutedEventArgs e)
{
if (model.CurrentOperation != null)
{
model.CurrentOperation.Cancel();
}
model.CurrentOperation = new TrainOperation(log, model, model.TrainDuration);
model.CurrentOperation.Start();
}
protected override void OnClosed(EventArgs e)
{
base.OnClosed(e);
Application.Current.Shutdown();
}
}
}