Improve the code for Desktop Exit
This commit is contained in:
@@ -52,8 +52,6 @@ namespace ServiceLib.ViewModels
|
||||
|
||||
public ReactiveCommand<Unit, Unit> ReloadCmd { get; }
|
||||
|
||||
public ReactiveCommand<Unit, Unit> ExitCmd { get; }
|
||||
|
||||
[Reactive]
|
||||
public bool BlReloadEnabled { get; set; }
|
||||
|
||||
@@ -189,11 +187,6 @@ namespace ServiceLib.ViewModels
|
||||
await Reload();
|
||||
});
|
||||
|
||||
ExitCmd = ReactiveCommand.CreateFromTask(async () =>
|
||||
{
|
||||
await Exit();
|
||||
});
|
||||
|
||||
RegionalPresetDefaultCmd = ReactiveCommand.CreateFromTask(async () =>
|
||||
{
|
||||
await ApplyRegionalPreset(EPresetType.Default);
|
||||
@@ -595,16 +588,6 @@ namespace ServiceLib.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private async Task Exit()
|
||||
{
|
||||
if (await _updateView?.Invoke(EViewAction.ShowYesNo, null) == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
await MyAppExitAsync(false);
|
||||
}
|
||||
|
||||
#endregion core job
|
||||
|
||||
#region Presets
|
||||
|
||||
Reference in New Issue
Block a user