mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
Minimize to tray at startup
This commit is contained in:
12
MainForm.cs
12
MainForm.cs
@@ -103,7 +103,15 @@ namespace VRCX
|
||||
{
|
||||
state = FormWindowState.Minimized;
|
||||
}
|
||||
WindowState = state;
|
||||
if ("true".Equals(VRCXStorage.Instance.Get("VRCX_StartAsMinimizedState")) &&
|
||||
"true".Equals(VRCXStorage.Instance.Get("VRCX_CloseToTray")))
|
||||
{
|
||||
BeginInvoke(new MethodInvoker(Hide));
|
||||
}
|
||||
else
|
||||
{
|
||||
WindowState = state;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -136,7 +144,7 @@ namespace VRCX
|
||||
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (e.CloseReason == CloseReason.UserClosing &&
|
||||
"true".Equals(SharedVariable.Instance.Get("config:vrcx_closetotray")))
|
||||
"true".Equals(VRCXStorage.Instance.Get("VRCX_CloseToTray")))
|
||||
{
|
||||
e.Cancel = true;
|
||||
Hide();
|
||||
|
||||
Reference in New Issue
Block a user