-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve stability and codebase, and add bypass MinSize setting
- Loading branch information
Showing
27 changed files
with
190 additions
and
257 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
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,28 @@ | ||
using System.Threading.Tasks; | ||
using UnitedSets.Classes; | ||
using UnitedSets.Services; | ||
|
||
namespace UnitedSets; | ||
|
||
class UnitedSetsAppConfiguration | ||
{ | ||
public UnitedSetsAppConfiguration() | ||
{ | ||
PersistantService = new(); | ||
if (!PersistantService.LoadPreviousSessionData(out var cfg)) | ||
PersistantService.LoadInitialSettingsAndTheme(out cfg); | ||
MainConfiguration = cfg; | ||
} | ||
public PreservedTabDataService PersistantService { get; } | ||
public USConfig MainConfiguration { get; private set; } = null!; | ||
public void SaveCurSettingsAsDefault() => PersistantService.ExportSettings(USConfig.DefaultConfigFile, true, true);//don't give user any choice as to what for now so will exclude current tabs | ||
public async Task ResetSettingsToDefault() | ||
{ | ||
await PersistantService.ResetSettings(); | ||
SaveCurSettingsAsDefault(); | ||
} | ||
public void SaveCurrentSession() | ||
{ | ||
PersistantService.ExportSettings(USConfig.SessionSaveConfigFile, true, ExcludeTabs: false); | ||
} | ||
} |
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
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
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
Oops, something went wrong.