mirror of
https://github.com/Novetus/Novetus_src.git
synced 2025-01-31 17:53:01 +02:00
fixed saving issues
This commit is contained in:
parent
12ec5b33c5
commit
e62e237d45
@ -160,6 +160,13 @@ class CharacterCustomizationShared
|
||||
GlobalFuncs.ReloadLoadoutValue();
|
||||
}
|
||||
|
||||
public void CloseEvent()
|
||||
{
|
||||
GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.InLauncher, "");
|
||||
GlobalFuncs.ReloadLoadoutValue();
|
||||
SaveOutfit(false);
|
||||
}
|
||||
|
||||
public void ChangeTabs()
|
||||
{
|
||||
ColorView.SelectedIndices.Clear();
|
||||
@ -610,11 +617,14 @@ class CharacterCustomizationShared
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveOutfit()
|
||||
public void SaveOutfit(bool box = true)
|
||||
{
|
||||
GlobalFuncs.Customization(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization, true);
|
||||
if (box)
|
||||
{
|
||||
MessageBox.Show("Outfit Saved!", "Novetus - Outfit Saved", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadOutfit()
|
||||
{
|
||||
@ -721,6 +731,7 @@ class CharacterCustomizationShared
|
||||
public void Launch3DView()
|
||||
{
|
||||
GlobalFuncs.ReloadLoadoutValue();
|
||||
SaveOutfit(false);
|
||||
//HACK!
|
||||
try
|
||||
{
|
||||
|
@ -34,8 +34,7 @@ public partial class CharacterCustomizationCompact : Form
|
||||
|
||||
void CharacterCustomizationClose(object sender, CancelEventArgs e)
|
||||
{
|
||||
GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.InLauncher, "");
|
||||
GlobalFuncs.ReloadLoadoutValue();
|
||||
characterCustomizationForm.CloseEvent();
|
||||
}
|
||||
|
||||
#region Hats
|
||||
|
@ -36,8 +36,7 @@ public partial class CharacterCustomizationExtended : Form
|
||||
|
||||
void CharacterCustomizationClose(object sender, CancelEventArgs e)
|
||||
{
|
||||
GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.InLauncher, "");
|
||||
GlobalFuncs.ReloadLoadoutValue();
|
||||
characterCustomizationForm.CloseEvent();
|
||||
}
|
||||
|
||||
#region Hats
|
||||
|
@ -291,19 +291,7 @@ namespace NovetusLauncher
|
||||
|
||||
public void CloseEvent(CancelEventArgs e)
|
||||
{
|
||||
if (GlobalVars.AdminMode)
|
||||
{
|
||||
DialogResult closeNovetus = MessageBox.Show("You are in Admin Mode.\nAre you sure you want to quit Novetus?", "Novetus - Admin Mode Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
if (closeNovetus == DialogResult.No)
|
||||
{
|
||||
e.Cancel = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CloseEventInternal();
|
||||
}
|
||||
}
|
||||
else if (GlobalVars.GameOpened != GlobalVars.OpenedGame.None)
|
||||
if (GlobalVars.GameOpened != GlobalVars.OpenedGame.None)
|
||||
{
|
||||
switch (GlobalVars.GameOpened)
|
||||
{
|
||||
@ -317,9 +305,28 @@ namespace NovetusLauncher
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GlobalVars.AdminMode)
|
||||
{
|
||||
DialogResult closeNovetus = MessageBox.Show("You are in Admin Mode.\nAre you sure you want to quit Novetus?", "Novetus - Admin Mode Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
if (closeNovetus == DialogResult.No)
|
||||
{
|
||||
e.Cancel = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CloseEventInternal();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CloseEventInternal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowCloseError(string text, string title, CancelEventArgs e)
|
||||
public void ShowCloseError(string text, string title, CancelEventArgs e)
|
||||
{
|
||||
DialogResult closeNovetus = MessageBox.Show(text + "\nYou must close the game before closing Novetus.", "Novetus - " + title + " is Open Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
if (closeNovetus == DialogResult.OK)
|
||||
|
@ -89,38 +89,11 @@ namespace NovetusLauncher
|
||||
|
||||
void LauncherFormStylish_Close(object sender, CancelEventArgs e)
|
||||
{
|
||||
CloseEvent(e);
|
||||
launcherFormStylishInterface1.launcherForm.CloseEvent(e);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Functions
|
||||
public void CloseEvent(CancelEventArgs e)
|
||||
{
|
||||
if (GlobalVars.AdminMode)
|
||||
{
|
||||
DialogResult closeNovetus = MessageBox.Show("You are in Admin Mode.\nAre you sure you want to quit Novetus?", "Novetus - Admin Mode Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
if (closeNovetus == DialogResult.No)
|
||||
{
|
||||
e.Cancel = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
CloseEventInternal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void CloseEventInternal()
|
||||
{
|
||||
WriteConfigValues();
|
||||
|
||||
if (GlobalVars.UserConfiguration.DiscordPresence)
|
||||
{
|
||||
DiscordRPC.Shutdown();
|
||||
}
|
||||
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
void splashLabel_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
|
@ -467,13 +467,13 @@ namespace NovetusLauncher
|
||||
{
|
||||
case 0:
|
||||
GlobalVars.UserConfiguration.LauncherStyle = Settings.Style.Extended;
|
||||
FormParent.CloseEventInternal();
|
||||
launcherForm.CloseEventInternal();
|
||||
System.Diagnostics.Process.Start(System.Windows.Forms.Application.ExecutablePath);
|
||||
System.Windows.Forms.Application.Exit();
|
||||
break;
|
||||
case 1:
|
||||
GlobalVars.UserConfiguration.LauncherStyle = Settings.Style.Compact;
|
||||
FormParent.CloseEventInternal();
|
||||
launcherForm.CloseEventInternal();
|
||||
System.Diagnostics.Process.Start(System.Windows.Forms.Application.ExecutablePath);
|
||||
System.Windows.Forms.Application.Exit();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user