Поправил UI, добавил команду автотренировки аккумулятора
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user