File tree Expand file tree Collapse file tree 5 files changed +55
-1
lines changed Expand file tree Collapse file tree 5 files changed +55
-1
lines changed Original file line number Diff line number Diff line change 2222 <setting name =" restartTaskAlert" serializeAs =" String" >
2323 <value >False</value >
2424 </setting >
25+ <setting name =" minimizeAtStartup" serializeAs =" String" >
26+ <value >False</value >
27+ </setting >
2528 <setting name =" upgradeRequired" serializeAs =" String" >
2629 <value >True</value >
2730 </setting >
Original file line number Diff line number Diff line change 2323 </MudPaper >
2424 </MudItem >
2525
26+ <MudItem xs =" 12" >
27+ <MudPaper Class =" pa-2 ma-2 mx-4" Elevation =" 3" >
28+ <MudText Typo =" Typo.h6" Class =" d-flex align-center" ><MudIcon Icon =" @Icons.Material.Filled.PowerSettingsNew" Class =" mr-2" />Startup</MudText >
29+ <div >
30+ <MudSwitch @bind-Checked =" @MinimizeAtStartupSwitch" Label =" Start Tarkov Monitor Minimized" Color =" Color.Info" />
31+ </div >
32+ </MudPaper >
33+ </MudItem >
34+
2635 <MudItem xs =" 12" >
2736 <MudPaper Class =" pa-2 ma-2 mx-4" Elevation =" 3" >
2837 <MudText Typo =" Typo.h6" Class =" d-flex align-center" ><MudIcon Icon =" @Icons.Material.Filled.Handshake" Class =" mr-2" />Data Collection</MudText >
130139 Properties .Settings .Default .Save ();
131140 }
132141 }
142+
143+ public bool MinimizeAtStartupSwitch
144+ {
145+ get
146+ {
147+ return Properties .Settings .Default .minimizeAtStartup ;
148+ }
149+ set
150+ {
151+ Properties .Settings .Default .minimizeAtStartup = value ;
152+ Properties .Settings .Default .Save ();
153+ }
154+ }
133155
134156 public bool SubmitQueueTimeSwitch {
135157 get
Original file line number Diff line number Diff line change @@ -94,6 +94,17 @@ public MainBlazorUI()
9494 blazorWebView1 . WebView . CoreWebView2InitializationCompleted += WebView_CoreWebView2InitializationCompleted ;
9595 }
9696
97+ protected override void OnShown ( EventArgs e )
98+ {
99+ base . OnShown ( e ) ;
100+
101+ if ( Properties . Settings . Default . minimizeAtStartup )
102+ {
103+
104+ WindowState = FormWindowState . Minimized ;
105+ }
106+ }
107+
97108 private void Eft_MapLoaded ( object ? sender , MatchFoundEventArgs e )
98109 {
99110 if ( ! Properties . Settings . Default . autoNavigateMap )
Original file line number Diff line number Diff line change 1717 <Setting Name =" restartTaskAlert" Type =" System.Boolean" Scope =" User" >
1818 <Value Profile =" (Default)" >False</Value >
1919 </Setting >
20+ <Setting Name =" minimizeAtStartup" Type =" System.Boolean" Scope =" User" >
21+ <Value Profile =" (Default)" >False</Value >
22+ </Setting >
2023 <Setting Name =" upgradeRequired" Type =" System.Boolean" Scope =" User" >
2124 <Value Profile =" (Default)" >True</Value >
2225 </Setting >
You can’t perform that action at this time.
0 commit comments