mirror of
https://github.com/Novetus/Novetus_src.git
synced 2025-01-31 09:41:33 +02:00
code optimizations
This commit is contained in:
parent
08f799a50a
commit
9ad39c045a
@ -226,9 +226,7 @@ namespace Novetus.Core
|
||||
|
||||
GlobalVars.UserConfiguration = new FileFormat.Config(true);
|
||||
GlobalVars.UserConfiguration.SaveSetting("SelectedClient", GlobalVars.ProgramInformation.DefaultClient);
|
||||
GlobalVars.UserConfiguration.SaveSetting("Map", GlobalVars.ProgramInformation.DefaultMap);
|
||||
GlobalVars.UserConfiguration.SaveSetting("MapPath", GlobalPaths.MapsDir + @"\\" + GlobalVars.ProgramInformation.DefaultMap);
|
||||
GlobalVars.UserConfiguration.SaveSetting("MapPathSnip", GlobalPaths.MapsDirBase + @"\\" + GlobalVars.ProgramInformation.DefaultMap);
|
||||
ResetMap();
|
||||
#if LAUNCHER
|
||||
GlobalVars.UserConfiguration.SaveSettingInt("LauncherStyle", (int)style);
|
||||
#endif
|
||||
|
@ -68,6 +68,16 @@ namespace NovetusLauncher
|
||||
#endregion
|
||||
|
||||
#region Form Event Functions
|
||||
public void RefreshStylishTitle()
|
||||
{
|
||||
if (FormStyle == Settings.Style.Stylish)
|
||||
{
|
||||
Parent.Text = "Novetus " + GlobalVars.ProgramInformation.Version + " [CLIENT: " +
|
||||
GlobalVars.UserConfiguration.ReadSetting("SelectedClient") + " | MAP: " +
|
||||
GlobalVars.UserConfiguration.ReadSetting("Map") + "]";
|
||||
}
|
||||
}
|
||||
|
||||
public void InitForm()
|
||||
{
|
||||
HideMasterAddressWarning = false;
|
||||
@ -98,12 +108,8 @@ namespace NovetusLauncher
|
||||
}
|
||||
}
|
||||
|
||||
if (FormStyle == Settings.Style.Stylish)
|
||||
{
|
||||
Parent.Text = "Novetus " + GlobalVars.ProgramInformation.Version + " [CLIENT: " +
|
||||
GlobalVars.UserConfiguration.ReadSetting("SelectedClient") + " | MAP: " +
|
||||
GlobalVars.UserConfiguration.ReadSetting("Map") + "]";
|
||||
}
|
||||
FileManagement.ResetMapIfNecessary();
|
||||
RefreshStylishTitle();
|
||||
|
||||
if (GlobalVars.UserConfiguration.ReadSettingBool("WebProxyEnabled"))
|
||||
{
|
||||
|
@ -139,9 +139,7 @@ namespace NovetusLauncher
|
||||
launcherForm.SelectMap();
|
||||
LoadMapDesc();
|
||||
|
||||
FormParent.Text = "Novetus " + GlobalVars.ProgramInformation.Version + " [CLIENT: " +
|
||||
GlobalVars.UserConfiguration.ReadSetting("SelectedClient") + " | MAP: " +
|
||||
GlobalVars.UserConfiguration.ReadSetting("Map") + "]";
|
||||
launcherForm.RefreshStylishTitle();
|
||||
}
|
||||
|
||||
private void clientListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
@ -193,9 +191,7 @@ namespace NovetusLauncher
|
||||
return;
|
||||
}
|
||||
|
||||
FormParent.Text = "Novetus " + GlobalVars.ProgramInformation.Version + " [CLIENT: " +
|
||||
GlobalVars.UserConfiguration.ReadSetting("SelectedClient") + " | MAP: " +
|
||||
GlobalVars.UserConfiguration.ReadSetting("Map") + "]";
|
||||
launcherForm.RefreshStylishTitle();
|
||||
|
||||
Client.UpdateRichPresence(Client.GetStateForType(GlobalVars.GameOpened));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user