add setting

This commit is contained in:
Matt Parker
2025-08-02 16:30:13 +10:00
parent 67e781d431
commit 79a0b9edfb
2 changed files with 3 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
<MudStack Class="ml-2 mr-4 mb-2"> <MudStack Class="ml-2 mr-4 mb-2">
<MudSwitch @bind-Value="@AppState.IdeSettings.AutoOpenLastSolution" Label="Automatically open last solution" Color="Color.Primary" /> <MudSwitch @bind-Value="@AppState.IdeSettings.AutoOpenLastSolution" Label="Automatically open last solution" Color="Color.Primary" />
<MudSwitch @bind-Value="@AppState.IdeSettings.AutoOpenTerminalOnLaunch" Label="Automatically open terminal when SharpIDE starts" Color="Color.Primary" />
</MudStack> </MudStack>
@code { @code {

View File

@@ -2,11 +2,12 @@ namespace SharpIDE.Photino.Models;
public class AppState public class AppState
{ {
public required string SolutionFilePath { get; set; } public required string? SolutionFilePath { get; set; }
public required IdeSettings IdeSettings { get; set; } = new IdeSettings(); public required IdeSettings IdeSettings { get; set; } = new IdeSettings();
} }
public class IdeSettings public class IdeSettings
{ {
public bool AutoOpenLastSolution { get; set; } public bool AutoOpenLastSolution { get; set; }
public bool AutoOpenTerminalOnLaunch { get; set; }
} }