misc. changes for the next snapshot

This commit is contained in:
Bitl 2024-01-31 10:35:57 -07:00
parent 5c3d8be673
commit cfb2375db6
27 changed files with 189 additions and 164 deletions

View File

@ -219,7 +219,7 @@ namespace Novetus.Core
bool WebProxySetupComplete = GlobalVars.UserConfiguration.ReadSettingBool("WebProxyInitialSetupRequired");
bool WebProxy = GlobalVars.UserConfiguration.ReadSettingBool("WebProxyEnabled");
GlobalVars.UserConfiguration = new FileFormat.Config();
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);
@ -235,7 +235,7 @@ namespace Novetus.Core
public static void ResetCustomizationValues()
{
GlobalVars.UserCustomization = new FileFormat.CustomizationConfig();
GlobalVars.UserCustomization = new FileFormat.CustomizationConfig(true);
ReloadLoadoutValue();
}

View File

@ -57,7 +57,7 @@ namespace Novetus.Core
public virtual Dictionary<string, string> ValueDefaults { get; set; }
public ConfigBase(string section, string path, string fileName)
public ConfigBase(string section, string path, string fileName, bool overwriteFileExistsCheck = false)
{
Section = section;
Path = path;
@ -66,7 +66,7 @@ namespace Novetus.Core
FilePreLoadEvent();
bool fileExists = File.Exists(FullPath);
bool fileExists = (File.Exists(FullPath) && overwriteFileExistsCheck) ? false : File.Exists(FullPath);
if (!fileExists)
{
@ -241,9 +241,9 @@ namespace Novetus.Core
#region Configuration
public class Config : ConfigBase
{
public Config() : base("Config", GlobalPaths.ConfigDir, GlobalPaths.ConfigName) { }
public Config(bool overwriteFileExistsCheck = false) : base("Config", GlobalPaths.ConfigDir, GlobalPaths.ConfigName, overwriteFileExistsCheck) { }
public Config(string filename) : base("Config", GlobalPaths.ConfigDir, filename) { }
public Config(string filename, bool overwriteFileExistsCheck = false) : base("Config", GlobalPaths.ConfigDir, filename, overwriteFileExistsCheck) { }
public override void FilePreLoadEvent()
{
@ -306,8 +306,8 @@ namespace Novetus.Core
{
public int[] DefaultColors = { 24, 23, 24, 24, 119, 119 };
public CustomizationConfig() : base("Customization", GlobalPaths.ConfigDir, GlobalPaths.ConfigNameCustomization) { }
public CustomizationConfig(string filename) : base("Customization", GlobalPaths.ConfigDir, filename) { }
public CustomizationConfig(bool overwriteFileExistsCheck = false) : base("Customization", GlobalPaths.ConfigDir, GlobalPaths.ConfigNameCustomization, overwriteFileExistsCheck) { }
public CustomizationConfig(string filename, bool overwriteFileExistsCheck = false) : base("Customization", GlobalPaths.ConfigDir, filename, overwriteFileExistsCheck) { }
public override void DefineDefaults()
{

View File

@ -106,7 +106,7 @@ namespace Novetus.Core
#if LAUNCHER
#region Novetus Launcher
public static NovetusLauncher.NovetusConsole consoleForm = null;
public static NovetusLauncher.NovetusConsole consoleForm = null;
#endregion
#endif

View File

@ -51,6 +51,25 @@ public static class TreeNodeHelper
return null;
}
public static TreeNode GetNodeByFullPath(string fullPath, TreeNodeCollection p_Nodes)
{
string[] pathStrings = Path.GetDirectoryName(fullPath).Split('\\');
TreeNode node = null;
foreach (string dir in pathStrings)
{
node = SearchTreeView(dir, p_Nodes);
}
if (node != null)
{
string fileName = new DirectoryInfo(fullPath).Name;
return SearchTreeView(fileName, node.Nodes);
}
return null;
}
public static void CopyNodes(TreeNodeCollection oldcollection, TreeNodeCollection newcollection)
{
foreach (TreeNode node in oldcollection)

View File

@ -117,7 +117,6 @@ namespace NovetusLauncher
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.button9 = new System.Windows.Forms.Button();
this.richTextBox3 = new System.Windows.Forms.RichTextBox();
this.button5 = new System.Windows.Forms.Button();
this.SettingsButton = new System.Windows.Forms.Button();
this.button25 = new System.Windows.Forms.Button();
this.button21 = new System.Windows.Forms.Button();
@ -841,7 +840,6 @@ namespace NovetusLauncher
this.tabPage5.Controls.Add(this.checkBox1);
this.tabPage5.Controls.Add(this.button9);
this.tabPage5.Controls.Add(this.richTextBox3);
this.tabPage5.Controls.Add(this.button5);
this.tabPage5.Controls.Add(this.SettingsButton);
this.tabPage5.Location = new System.Drawing.Point(4, 22);
this.tabPage5.Name = "tabPage5";
@ -972,7 +970,7 @@ namespace NovetusLauncher
this.button9.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button9.Location = new System.Drawing.Point(6, 21);
this.button9.Name = "button9";
this.button9.Size = new System.Drawing.Size(45, 34);
this.button9.Size = new System.Drawing.Size(88, 34);
this.button9.TabIndex = 37;
this.button9.Text = "Reset Config";
this.button9.UseVisualStyleBackColor = true;
@ -989,17 +987,6 @@ namespace NovetusLauncher
this.richTextBox3.TabIndex = 60;
this.richTextBox3.Text = "credits text";
//
// button5
//
this.button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button5.Location = new System.Drawing.Point(52, 21);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(42, 34);
this.button5.TabIndex = 10;
this.button5.Text = "Save Config";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.Button5Click);
//
// SettingsButton
//
this.SettingsButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@ -1476,7 +1463,6 @@ namespace NovetusLauncher
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.ListBox listBox2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label11;

View File

@ -87,11 +87,6 @@ namespace NovetusLauncher
launcherForm.GeneratePlayerID();
}
void Button5Click(object sender, EventArgs e)
{
launcherForm.WriteConfigValues(true);
}
void TextBox2TextChanged(object sender, EventArgs e)
{
launcherForm.ChangeName();

View File

@ -136,7 +136,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB0
CQAAAk1TRnQBSQFMAgEBAgEAAZgBAAGYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CQAAAk1TRnQBSQFMAgEBAgEAAaABAAGgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -138,7 +138,6 @@ namespace NovetusLauncher
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.button9 = new System.Windows.Forms.Button();
this.button26 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.richTextBox3 = new System.Windows.Forms.RichTextBox();
this.label18 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
@ -1094,7 +1093,6 @@ namespace NovetusLauncher
this.panel5.Controls.Add(this.checkBox1);
this.panel5.Controls.Add(this.button9);
this.panel5.Controls.Add(this.button26);
this.panel5.Controls.Add(this.button5);
this.panel5.Location = new System.Drawing.Point(0, 0);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(625, 61);
@ -1102,7 +1100,7 @@ namespace NovetusLauncher
//
// button36
//
this.button36.Location = new System.Drawing.Point(396, 27);
this.button36.Location = new System.Drawing.Point(358, 27);
this.button36.Name = "button36";
this.button36.Size = new System.Drawing.Size(100, 26);
this.button36.TabIndex = 77;
@ -1173,7 +1171,7 @@ namespace NovetusLauncher
// button9
//
this.button9.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button9.Location = new System.Drawing.Point(193, 27);
this.button9.Location = new System.Drawing.Point(155, 27);
this.button9.Name = "button9";
this.button9.Size = new System.Drawing.Size(83, 26);
this.button9.TabIndex = 37;
@ -1184,7 +1182,7 @@ namespace NovetusLauncher
// button26
//
this.button26.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button26.Location = new System.Drawing.Point(282, 27);
this.button26.Location = new System.Drawing.Point(244, 27);
this.button26.Name = "button26";
this.button26.Size = new System.Drawing.Size(108, 26);
this.button26.TabIndex = 57;
@ -1192,17 +1190,6 @@ namespace NovetusLauncher
this.button26.UseVisualStyleBackColor = true;
this.button26.Click += new System.EventHandler(this.button26_Click);
//
// button5
//
this.button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button5.Location = new System.Drawing.Point(104, 27);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(83, 26);
this.button5.TabIndex = 10;
this.button5.Text = "Save Config";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.Button5Click);
//
// richTextBox3
//
this.richTextBox3.BackColor = System.Drawing.SystemColors.ControlLightLight;
@ -1438,7 +1425,6 @@ namespace NovetusLauncher
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.ListBox listBox2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label11;

View File

@ -92,11 +92,6 @@ namespace NovetusLauncher
launcherForm.GeneratePlayerID();
}
void Button5Click(object sender, EventArgs e)
{
launcherForm.WriteConfigValues(true);
}
void TextBox2TextChanged(object sender, EventArgs e)
{
launcherForm.ChangeName();

View File

@ -136,7 +136,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB0
CQAAAk1TRnQBSQFMAgEBAgEAAegBAAHoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CQAAAk1TRnQBSQFMAgEBAgEAAfABAAHwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -277,10 +277,6 @@ namespace NovetusLauncher
public void CloseEventInternal()
{
if (!GlobalVars.LocalPlayMode)
{
WriteConfigValues();
}
if (GlobalVars.UserConfiguration.ReadSettingBool("DiscordRichPresence"))
{
IDiscordRPC.Shutdown();
@ -431,10 +427,6 @@ namespace NovetusLauncher
{
GeneratePlayerID();
}
else
{
WriteConfigValues();
}
switch (gameType)
{
@ -693,8 +685,6 @@ namespace NovetusLauncher
SelectedClientLabel.Text = GlobalVars.UserConfiguration.ReadSetting("SelectedClient");
ChangeClient();
SelectedMapLabel.Text = GlobalVars.UserConfiguration.ReadSetting("Map");
Tree.SelectedNode = TreeNodeHelper.SearchTreeView(GlobalVars.UserConfiguration.ReadSetting("Map"), Tree.Nodes);
Tree.Focus();
IPBox.Text = GlobalVars.CurrentServer.ToString();
HostPortBox.Value = ConvertSafe.ToDecimalSafe(GlobalVars.UserConfiguration.ReadSettingInt("RobloxPort"));
IPLabel.Text = GlobalVars.CurrentServer.ServerIP;
@ -723,22 +713,6 @@ namespace NovetusLauncher
ReadClientValues(initial);
}
public void WriteConfigValues(bool ShowBox = false)
{
/*
ClientManagement.ReadClientValues();
Util.ConsolePrint("Config Saved.", 3);
if (ShowBox)
{
MessageBox.Show("Config Saved!", "Novetus - Config Saved", MessageBoxButtons.OK, MessageBoxIcon.Information);
}*/
}
public void WriteCustomizationValues()
{
//Util.ConsolePrint("Config Saved.", 3);
}
public void ResetConfigValuesInternal()
{
//https://stackoverflow.com/questions/9029351/close-all-open-forms-except-the-main-menu-in-c-sharp
@ -762,7 +736,6 @@ namespace NovetusLauncher
public void ResetConfigValues(bool ShowBox = false)
{
ResetConfigValuesInternal();
WriteConfigValues();
ReadConfigValues();
if (ShowBox)
{
@ -910,7 +883,7 @@ namespace NovetusLauncher
string[] fileexts = new string[] { ".rbxl", ".rbxlx", ".bz2" };
TreeNodeHelper.ListDirectory(Tree, mapdir, fileexts);
TreeNodeHelper.CopyNodes(Tree.Nodes, _TreeCache.Nodes);
Tree.SelectedNode = TreeNodeHelper.SearchTreeView(GlobalVars.UserConfiguration.ReadSetting("Map"), Tree.Nodes);
Tree.SelectedNode = TreeNodeHelper.GetNodeByFullPath(GlobalVars.UserConfiguration.ReadSetting("MapPathSnip"), Tree.Nodes);
if (FormStyle == Settings.Style.Stylish)
{
Tree.SelectedNode.BackColor = SystemColors.Highlight;

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NovetusLauncher
{
public class ClientListItem
{
public string ClientName { get; set; }
public override string ToString() { return ClientName; }
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NovetusLauncher
{
public class StyleListItem
{
public string StyleName { get; set; }
public StyleListItem(string name)
{
StyleName = name;
}
public override string ToString() { return StyleName; }
}
}

View File

@ -111,8 +111,6 @@ namespace NovetusLauncher
launcherFormStylishInterface1.maxPlayersBox.Text = GlobalVars.UserConfiguration.ReadSetting("PlayerLimit");
launcherFormStylishInterface1.userNameBox.Text = GlobalVars.UserConfiguration.ReadSetting("PlayerName");
launcherFormStylishInterface1.ChangeClient();
launcherFormStylishInterface1.mapsBox.SelectedNode = TreeNodeHelper.SearchTreeView(GlobalVars.UserConfiguration.ReadSetting("Map"), launcherFormStylishInterface1.mapsBox.Nodes);
launcherFormStylishInterface1.mapsBox.Focus();
//stupid fucking HACK because we aren't selecting it properly.
if (launcherFormStylishInterface1.mapsBox.SelectedNode != null)
{

View File

@ -781,7 +781,7 @@
<WindowsFormsHost x:Name="formHost" Margin="82,64,154,48" Grid.Column="1" FontFamily="Comic Sans MS" FontSize="9" Background="#FFEDEDED" Grid.ColumnSpan="2">
<wf:TreeView x:Name="mapsBox" AfterSelect="mapsBox_AfterSelect" BeforeSelect="mapsBox_BeforeSelect"/>
</WindowsFormsHost>
<TextBox x:Name="searchBox" Grid.Column="1" HorizontalAlignment="Left" Height="20" Margin="82,43,0,0" Text="" VerticalAlignment="Top" Width="204" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" Grid.ColumnSpan="2"/>
<TextBox x:Name="searchBox" Grid.Column="1" HorizontalAlignment="Left" Height="20" Margin="82,43,0,0" Text="" VerticalAlignment="Top" Width="214" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" Grid.ColumnSpan="2"/>
<Button x:Name="searchButton" Style="{DynamicResource SearchButton}" Content="" Grid.Column="2" HorizontalAlignment="Left" Margin="166,46,0,0" VerticalAlignment="Top" Width="24" Height="17" Click="searchButton_Click"/>
<Button x:Name="refreshButton" Style="{DynamicResource RefreshButton}" Content="" Grid.Column="2" HorizontalAlignment="Left" Margin="190,46,0,0" VerticalAlignment="Top" Width="26" Height="17" Click="refreshButton_Click"/>
<Button x:Name="addMapButton" Content="Add Place" Grid.Column="2" HorizontalAlignment="Left" Margin="221,47,0,0" VerticalAlignment="Top" Width="72" Click="addMapButton_Click"/>
@ -859,8 +859,7 @@
<Label x:Name="codenameLabel" Content="PROJECT STARLIGHT" HorizontalAlignment="Left" Margin="343,235,0,0" VerticalAlignment="Top" Width="193" Height="24" Grid.ColumnSpan="2"/>
<CheckBox x:Name="discordRichPresenceBox" Content="Discord Rich Presence" HorizontalAlignment="Left" Margin="62,46,0,0" VerticalAlignment="Top" Checked="discordRichPresenceBox_Checked" Unchecked="discordRichPresenceBox_Unchecked" Click="discordRichPresenceBox_Click"/>
<CheckBox x:Name="minimizeOnLaunchBox" Content="Minimize on Launch" HorizontalAlignment="Left" Margin="62,67,0,0" VerticalAlignment="Top" Width="144" Checked="minimizeOnLaunchBox_Checked" Unchecked="minimizeOnLaunchBox_Unchecked"/>
<Button x:Name="resetConfigButton" Content="Reset Config" HorizontalAlignment="Left" Margin="233,46,0,0" VerticalAlignment="Top" Width="75" Click="resetConfigButton_Click"/>
<Button x:Name="saveConfigButton" Content="Save Config" HorizontalAlignment="Left" Margin="233,67,0,0" VerticalAlignment="Top" Width="75" Click="saveConfigButton_Click"/>
<Button x:Name="resetConfigButton" Content="Reset Config" HorizontalAlignment="Left" Margin="233,46,0,0" VerticalAlignment="Top" Width="75" Click="resetConfigButton_Click" Height="37"/>
<Button x:Name="resetAssetCacheButton" Content="Clear Cache" HorizontalAlignment="Left" Margin="313,46,0,0" VerticalAlignment="Top" Width="81" Height="16" Click="resetAssetCacheButton_Click"/>
<Button x:Name="novetusSDKButton" Content="Novetus SDK" HorizontalAlignment="Left" Margin="313,67,0,0" VerticalAlignment="Top" Width="81" Click="novetusSDKButton_Click"/>
<Button x:Name="settingsButtons" Style="{DynamicResource ImportantButtonSmall}" Content="Graphics Settings" HorizontalAlignment="Left" Margin="399,46,0,0" VerticalAlignment="Top" Width="119" Height="17" Click="settingsButtons_Click" Grid.ColumnSpan="2"/>

View File

@ -545,26 +545,4 @@ namespace NovetusLauncher
#endregion
}
#endregion
#region Storage Classes
//i hate these classes......
public class ClientListItem
{
public string ClientName { get; set; }
public override string ToString() { return ClientName; }
}
public class StyleListItem
{
public string StyleName { get; set; }
public StyleListItem(string name)
{
StyleName = name;
}
public override string ToString() { return StyleName; }
}
#endregion
}

View File

@ -308,26 +308,86 @@ namespace NovetusLauncher
{
string[] vals = config.Split(' ');
if (vals[1].Equals("save", StringComparison.InvariantCultureIgnoreCase))
if (config.Contains("save", StringComparison.InvariantCultureIgnoreCase) ||
config.Contains("savesetting", StringComparison.InvariantCultureIgnoreCase) ||
config.Contains("saveval", StringComparison.InvariantCultureIgnoreCase))
{
ConsoleForm.WriteConfigValues();
string name = vals[2];
string value = vals[3];
GlobalVars.UserConfiguration.SaveSetting(name, value);
Util.ConsolePrint("Value of '" + name + "': " + GlobalVars.UserConfiguration.ReadSetting(name), 4);
Util.ConsolePrint("Please restart any applications related to this value to reload it.", 4);
}
else if (vals[1].Equals("load", StringComparison.InvariantCultureIgnoreCase))
else if (config.Contains("read", StringComparison.InvariantCultureIgnoreCase) ||
config.Contains("readsetting", StringComparison.InvariantCultureIgnoreCase) ||
config.Contains("readval", StringComparison.InvariantCultureIgnoreCase))
{
ConsoleForm.ReadConfigValues();
}
else if (vals[1].Equals("reset", StringComparison.InvariantCultureIgnoreCase))
{
ConsoleForm.ResetConfigValues();
string name = vals[2];
Util.ConsolePrint("Value of '" + name + "': " + GlobalVars.UserConfiguration.ReadSetting(name), 4);
}
else
{
Util.ConsolePrint("Please specify 'save', 'load', or 'reset'.", 2);
if (vals[1].Equals("load", StringComparison.InvariantCultureIgnoreCase))
{
ConsoleForm.ReadConfigValues();
}
else if (vals[1].Equals("reset", StringComparison.InvariantCultureIgnoreCase))
{
ConsoleForm.ResetConfigValues();
}
else
{
Util.ConsolePrint("Please specify 'save', 'read', 'load', or 'reset'.", 2);
Util.ConsolePrint("If specifying 'save', please provide the name and value for the setting you wish to save.", 2);
}
}
}
catch (Exception)
{
Util.ConsolePrint("Please specify 'save', 'load', or 'reset'.", 2);
Util.ConsolePrint("Please specify 'save', 'read', 'load', or 'reset'.", 2);
Util.ConsolePrint("If specifying 'save', please provide the name and value for the setting you wish to save.", 2);
}
ScrollToEnd();
break;
case string outfit when outfit.Contains("outfit", StringComparison.InvariantCultureIgnoreCase) == true:
try
{
string[] vals = outfit.Split(' ');
if (outfit.Contains("save", StringComparison.InvariantCultureIgnoreCase) ||
outfit.Contains("savesetting", StringComparison.InvariantCultureIgnoreCase) ||
outfit.Contains("saveval", StringComparison.InvariantCultureIgnoreCase))
{
string name = vals[2];
string value = vals[3];
GlobalVars.UserCustomization.SaveSetting(name, value);
Util.ConsolePrint("Value of '" + name + "': " + GlobalVars.UserConfiguration.ReadSetting(name), 4);
Util.ConsolePrint("Please restart any applications related to this value to reload it.", 4);
}
else if (outfit.Contains("read", StringComparison.InvariantCultureIgnoreCase) ||
outfit.Contains("readsetting", StringComparison.InvariantCultureIgnoreCase) ||
outfit.Contains("readval", StringComparison.InvariantCultureIgnoreCase))
{
string name = vals[2];
Util.ConsolePrint("Value of '" + name + "': " + GlobalVars.UserCustomization.ReadSetting(name), 4);
}
else
{
if (vals[1].Equals("reset", StringComparison.InvariantCultureIgnoreCase))
{
FileManagement.ResetCustomizationValues();
}
else
{
Util.ConsolePrint("Please specify 'save', 'read', 'load', or 'reset'.", 2);
Util.ConsolePrint("If specifying 'save', please provide the name and value for the setting you wish to save.", 2);
}
}
}
catch (Exception)
{
Util.ConsolePrint("Please specify 'save', 'read', 'load', or 'reset'.", 2);
Util.ConsolePrint("If specifying 'save', please provide the name and value for the setting you wish to save.", 2);
}
ScrollToEnd();
break;

View File

@ -54,6 +54,7 @@ partial class ClientinfoEditor
this.saveAsTextFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.textToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.iNIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.jSONToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.signScriptManuallyModernClientsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tagsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -163,7 +164,6 @@ partial class ClientinfoEditor
this.checkBox8 = new System.Windows.Forms.CheckBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.jSONToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
@ -237,7 +237,6 @@ partial class ClientinfoEditor
this.checkBox4.TabIndex = 19;
this.checkBox4.Text = "Lock Client (prevent editing)";
this.checkBox4.UseVisualStyleBackColor = true;
this.checkBox4.Visible = false;
this.checkBox4.CheckedChanged += new System.EventHandler(this.CheckBox4CheckedChanged);
//
// checkBox6
@ -321,17 +320,24 @@ partial class ClientinfoEditor
// textToolStripMenuItem
//
this.textToolStripMenuItem.Name = "textToolStripMenuItem";
this.textToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.textToolStripMenuItem.Size = new System.Drawing.Size(102, 22);
this.textToolStripMenuItem.Text = "Text";
this.textToolStripMenuItem.Click += new System.EventHandler(this.saveAsTextFileToolStripMenuItem_Click);
//
// iNIToolStripMenuItem
//
this.iNIToolStripMenuItem.Name = "iNIToolStripMenuItem";
this.iNIToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.iNIToolStripMenuItem.Size = new System.Drawing.Size(102, 22);
this.iNIToolStripMenuItem.Text = "INI";
this.iNIToolStripMenuItem.Click += new System.EventHandler(this.saveAsINIFileToolStripMenuItem_Click);
//
// jSONToolStripMenuItem
//
this.jSONToolStripMenuItem.Name = "jSONToolStripMenuItem";
this.jSONToolStripMenuItem.Size = new System.Drawing.Size(102, 22);
this.jSONToolStripMenuItem.Text = "JSON";
this.jSONToolStripMenuItem.Click += new System.EventHandler(this.jSONToolStripMenuItem_Click);
//
// signScriptManuallyModernClientsToolStripMenuItem
//
this.signScriptManuallyModernClientsToolStripMenuItem.Name = "signScriptManuallyModernClientsToolStripMenuItem";
@ -1252,13 +1258,6 @@ partial class ClientinfoEditor
this.label3.TabIndex = 37;
this.label3.Text = "EXE Name:";
//
// jSONToolStripMenuItem
//
this.jSONToolStripMenuItem.Name = "jSONToolStripMenuItem";
this.jSONToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.jSONToolStripMenuItem.Text = "JSON";
this.jSONToolStripMenuItem.Click += new System.EventHandler(this.jSONToolStripMenuItem_Click);
//
// ClientinfoEditor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1293,7 +1292,7 @@ partial class ClientinfoEditor
this.MinimumSize = new System.Drawing.Size(648, 390);
this.Name = "ClientinfoEditor";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Novetus Client SDK";
this.Text = "Novetus Client SDK (Legacy)";
this.Load += new System.EventHandler(this.ClientinfoCreatorLoad);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();

View File

@ -43,7 +43,7 @@ public partial class ClientinfoEditor : Form
void ClientinfoCreatorLoad(object sender, EventArgs e)
{
checkBox4.Visible = GlobalVars.AdminMode;
//checkBox4.Visible = GlobalVars.AdminMode;
NewClientInfo();
}
@ -107,7 +107,7 @@ public partial class ClientinfoEditor : Form
try
{
IsVersion2 = true;
label9.Text = curversion + " (v" + GlobalVars.ProgramInformation.Version + ")";
label9.Text = "v2.3 (Last used in Snapshot v24.8790.39939.1)";
ConvertedLine = SecurityFuncs.Decode(file, false);
}
catch (Exception)
@ -177,28 +177,18 @@ public partial class ClientinfoEditor : Form
}
}
if (!GlobalVars.AdminMode)
{
bool lockcheck = ConvertSafe.ToBooleanSafe(locked);
if (lockcheck)
{
NewClientInfo();
MessageBox.Show("This client is locked and therefore it cannot be loaded.", "Novetus Launcher - Error when loading client", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
else
{
Locked = lockcheck;
checkBox4.Checked = Locked;
}
}
else
{
Locked = ConvertSafe.ToBooleanSafe(locked);
checkBox4.Checked = Locked;
}
bool lockcheck = ConvertSafe.ToBooleanSafe(locked);
if (lockcheck)
{
//NewClientInfo();
//MessageBox.Show("This client is locked and therefore it cannot be loaded.", "Novetus Launcher - Error when loading client", MessageBoxButtons.OK, MessageBoxIcon.Error);
//return;
MessageBox.Show("This client is locked, which means it cannot be loaded in the Client SDK of older versions of Novetus. You cannot turn off the 'lock' setting in the client as a result.", "Novetus Launcher - Error when loading client", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
SelectedClientInfo.UsesPlayerName = ConvertSafe.ToBooleanSafe(usesplayername);
Locked = lockcheck;
checkBox4.Checked = Locked;
SelectedClientInfo.UsesPlayerName = ConvertSafe.ToBooleanSafe(usesplayername);
SelectedClientInfo.UsesID = ConvertSafe.ToBooleanSafe(usesid);
SelectedClientInfo.Warning = warning;
SelectedClientInfo.LegacyMode = ConvertSafe.ToBooleanSafe(legacymode);

View File

@ -28,7 +28,7 @@
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] {
"Client SDK"}, "ClientSDK.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))));
"Client SDK"}, "ClientSDK.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem(new string[] {
"Asset Fixer"}, "AssetFixer.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem(new string[] {
@ -53,6 +53,8 @@
"ClientScript Tester"}, "ClientScriptTester.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
System.Windows.Forms.ListViewItem listViewItem13 = new System.Windows.Forms.ListViewItem(new string[] {
"JSON Content Editor"}, 9, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
System.Windows.Forms.ListViewItem listViewItem14 = new System.Windows.Forms.ListViewItem(new string[] {
"Client SDK ( Legacy)"}, "ClientSDK.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NovetusSDK));
this.label1 = new System.Windows.Forms.Label();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
@ -106,7 +108,8 @@
listViewItem10,
listViewItem11,
listViewItem12,
listViewItem13});
listViewItem13,
listViewItem14});
this.listView1.Location = new System.Drawing.Point(12, 102);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(414, 260);

View File

@ -24,7 +24,8 @@ enum SDKApps
LegacyPlaceConverter,
DiogenesEditor,
ClientScriptTester,
XMLContentEditor
XMLContentEditor,
ClientSDKLegacy
}
#endregion
@ -106,6 +107,10 @@ public partial class NovetusSDK : Form
switch (selectedApp)
{
case SDKApps.ClientSDK:
ClientinfoEditor csdk = new ClientinfoEditor();
csdk.Show();
break;
case SDKApps.AssetFixer:
AssetFixer assetF = new AssetFixer();
assetF.Show();
@ -161,10 +166,12 @@ public partial class NovetusSDK : Form
XMLContentEditor xml = new XMLContentEditor();
xml.Show();
break;
default:
case SDKApps.ClientSDKLegacy:
ClientinfoEditor cie = new ClientinfoEditor();
cie.Show();
break;
default:
break;
}
}
#endregion

View File

@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACw
FgAAAk1TRnQBSQFMAgEBDQEAAVgBAAFYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
FgAAAk1TRnQBSQFMAgEBDQEAAWgBAAFoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAAUADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -219,6 +219,8 @@
<Compile Include="Forms\LauncherFormSettings.Designer.cs">
<DependentUpon>LauncherFormSettings.cs</DependentUpon>
</Compile>
<Compile Include="Forms\LauncherForm\Stylish\Classes\ClientListItem.cs" />
<Compile Include="Forms\LauncherForm\Stylish\Classes\StyleListItem.cs" />
<Compile Include="Forms\LauncherForm\Stylish\LauncherFormStylish.cs">
<SubType>Form</SubType>
</Compile>
@ -258,10 +260,10 @@
<Compile Include="Forms\SDK\MeshConverter.Designer.cs">
<DependentUpon>MeshConverter.cs</DependentUpon>
</Compile>
<Compile Include="Forms\SDK\ClientinfoCreator.cs">
<Compile Include="Forms\SDK\Legacy\ClientinfoCreator.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\SDK\ClientinfoCreator.Designer.cs">
<Compile Include="Forms\SDK\Legacy\ClientinfoCreator.Designer.cs">
<DependentUpon>ClientinfoCreator.cs</DependentUpon>
</Compile>
<Compile Include="Forms\SDK\ClientScriptDocumentation.cs">
@ -270,10 +272,10 @@
<Compile Include="Forms\SDK\ClientScriptDocumentation.Designer.cs">
<DependentUpon>ClientScriptDocumentation.cs</DependentUpon>
</Compile>
<Compile Include="Forms\SDK\ClientinfoCreatorValidatePathForm.cs">
<Compile Include="Forms\SDK\Legacy\ClientinfoCreatorValidatePathForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\SDK\ClientinfoCreatorValidatePathForm.Designer.cs">
<Compile Include="Forms\SDK\Legacy\ClientinfoCreatorValidatePathForm.Designer.cs">
<DependentUpon>ClientinfoCreatorValidatePathForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\SDK\DiogenesEditor.cs">
@ -374,13 +376,13 @@
<EmbeddedResource Include="Forms\SDK\MeshConverter.resx">
<DependentUpon>MeshConverter.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SDK\ClientinfoCreator.resx">
<EmbeddedResource Include="Forms\SDK\Legacy\ClientinfoCreator.resx">
<DependentUpon>ClientinfoCreator.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SDK\ClientScriptDocumentation.resx">
<DependentUpon>ClientScriptDocumentation.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SDK\ClientinfoCreatorValidatePathForm.resx">
<EmbeddedResource Include="Forms\SDK\Legacy\ClientinfoCreatorValidatePathForm.resx">
<DependentUpon>ClientinfoCreatorValidatePathForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SDK\DiogenesEditor.resx">