-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
51 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/TableCloth/Commands/MainWindow/MainWindowClosedCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using TableCloth.Components; | ||
|
||
namespace TableCloth.Commands.MainWindow; | ||
|
||
public sealed class MainWindowClosedCommand : CommandBase | ||
{ | ||
public MainWindowClosedCommand( | ||
SandboxCleanupManager sandboxCleanupManager, | ||
AppRestartManager appRestartManager) | ||
{ | ||
_sandboxCleanupManager = sandboxCleanupManager; | ||
} | ||
|
||
private readonly SandboxCleanupManager _sandboxCleanupManager; | ||
|
||
public override void Execute(object? parameter) | ||
{ | ||
_sandboxCleanupManager.TryCleanup(); | ||
} | ||
} |
50 changes: 25 additions & 25 deletions
50
...Cloth/Commands/MainWindowClosedCommand.cs → ...MainWindowV2/MainWindowV2ClosedCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
using TableCloth.Components; | ||
|
||
namespace TableCloth.Commands; | ||
|
||
public sealed class MainWindowClosedCommand : CommandBase | ||
{ | ||
public MainWindowClosedCommand( | ||
SandboxCleanupManager sandboxCleanupManager, | ||
AppRestartManager appRestartManager) | ||
{ | ||
_sandboxCleanupManager = sandboxCleanupManager; | ||
_appRestartManager = appRestartManager; | ||
} | ||
|
||
private readonly SandboxCleanupManager _sandboxCleanupManager; | ||
private readonly AppRestartManager _appRestartManager; | ||
|
||
public override void Execute(object? parameter) | ||
{ | ||
_sandboxCleanupManager.TryCleanup(); | ||
|
||
if (_appRestartManager.ReserveRestart) | ||
_appRestartManager.RestartNow(); | ||
} | ||
} | ||
using TableCloth.Components; | ||
|
||
namespace TableCloth.Commands.MainWindowV2; | ||
|
||
public sealed class MainWindowV2ClosedCommand : CommandBase | ||
{ | ||
public MainWindowV2ClosedCommand( | ||
SandboxCleanupManager sandboxCleanupManager, | ||
AppRestartManager appRestartManager) | ||
{ | ||
_sandboxCleanupManager = sandboxCleanupManager; | ||
_appRestartManager = appRestartManager; | ||
} | ||
|
||
private readonly SandboxCleanupManager _sandboxCleanupManager; | ||
private readonly AppRestartManager _appRestartManager; | ||
|
||
public override void Execute(object? parameter) | ||
{ | ||
_sandboxCleanupManager.TryCleanup(); | ||
|
||
if (_appRestartManager.ReserveRestart) | ||
_appRestartManager.RestartNow(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters