added a button to clear cache.

This commit is contained in:
Bitl 2019-11-13 10:53:38 -07:00
parent 22c9309709
commit a4d10036bc
4 changed files with 53 additions and 38 deletions

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -71,29 +72,29 @@ namespace NovetusLauncher
{
comboBox1.SelectedItem = "RBXL";
if (!System.IO.Directory.Exists(GlobalVars.AssetCacheDirFonts))
if (!Directory.Exists(GlobalVars.AssetCacheDirFonts))
{
System.IO.Directory.CreateDirectory(GlobalVars.AssetCacheDirFonts);
Directory.CreateDirectory(GlobalVars.AssetCacheDirFonts);
}
if (!System.IO.Directory.Exists(GlobalVars.AssetCacheDirSky))
if (!Directory.Exists(GlobalVars.AssetCacheDirSky))
{
System.IO.Directory.CreateDirectory(GlobalVars.AssetCacheDirSky);
Directory.CreateDirectory(GlobalVars.AssetCacheDirSky);
}
if (!System.IO.Directory.Exists(GlobalVars.AssetCacheDirSounds))
if (!Directory.Exists(GlobalVars.AssetCacheDirSounds))
{
System.IO.Directory.CreateDirectory(GlobalVars.AssetCacheDirSounds);
Directory.CreateDirectory(GlobalVars.AssetCacheDirSounds);
}
if (!System.IO.Directory.Exists(GlobalVars.AssetCacheDirTexturesGUI))
if (!Directory.Exists(GlobalVars.AssetCacheDirTexturesGUI))
{
System.IO.Directory.CreateDirectory(GlobalVars.AssetCacheDirTexturesGUI);
Directory.CreateDirectory(GlobalVars.AssetCacheDirTexturesGUI);
}
if (!System.IO.Directory.Exists(GlobalVars.AssetCacheDirScripts))
if (!Directory.Exists(GlobalVars.AssetCacheDirScripts))
{
System.IO.Directory.CreateDirectory(GlobalVars.AssetCacheDirScripts);
Directory.CreateDirectory(GlobalVars.AssetCacheDirScripts);
}
}
}

View File

@ -92,7 +92,6 @@ namespace NovetusLauncher
this.richTextBox2 = new System.Windows.Forms.RichTextBox();
this.tabPage5 = new System.Windows.Forms.TabPage();
this.button25 = new System.Windows.Forms.Button();
this.label18 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
@ -119,6 +118,7 @@ namespace NovetusLauncher
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.button26 = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
@ -757,8 +757,8 @@ namespace NovetusLauncher
//
// tabPage5
//
this.tabPage5.Controls.Add(this.button26);
this.tabPage5.Controls.Add(this.button25);
this.tabPage5.Controls.Add(this.label18);
this.tabPage5.Controls.Add(this.label7);
this.tabPage5.Controls.Add(this.label10);
this.tabPage5.Controls.Add(this.label9);
@ -787,15 +787,6 @@ namespace NovetusLauncher
this.button25.UseVisualStyleBackColor = true;
this.button25.Click += new System.EventHandler(this.button25_Click);
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(334, 3);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(37, 13);
this.label18.TabIndex = 55;
this.label18.Text = "Config";
//
// label7
//
this.label7.Location = new System.Drawing.Point(274, 237);
@ -861,19 +852,19 @@ 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(355, 19);
this.button9.Location = new System.Drawing.Point(174, 24);
this.button9.Name = "button9";
this.button9.Size = new System.Drawing.Size(43, 29);
this.button9.Size = new System.Drawing.Size(82, 19);
this.button9.TabIndex = 37;
this.button9.Text = "Reset";
this.button9.Text = "Reset Config";
this.button9.UseVisualStyleBackColor = true;
this.button9.Click += new System.EventHandler(this.Button9Click);
//
// checkBox3
//
this.checkBox3.Location = new System.Drawing.Point(119, 25);
this.checkBox3.Location = new System.Drawing.Point(286, 4);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(114, 19);
this.checkBox3.Size = new System.Drawing.Size(109, 19);
this.checkBox3.TabIndex = 22;
this.checkBox3.Text = "Local Play Mode";
this.checkBox3.UseVisualStyleBackColor = true;
@ -883,11 +874,11 @@ namespace NovetusLauncher
//
this.checkBox1.Checked = true;
this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox1.Location = new System.Drawing.Point(119, 3);
this.checkBox1.Location = new System.Drawing.Point(95, 5);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(182, 17);
this.checkBox1.Size = new System.Drawing.Size(185, 17);
this.checkBox1.TabIndex = 5;
this.checkBox1.Text = "Minimize Launcher on Launch";
this.checkBox1.Text = "Minimize Launcher on Launch";
this.checkBox1.UseCompatibleTextRendering = true;
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.CheckBox1CheckedChanged);
@ -895,11 +886,11 @@ namespace NovetusLauncher
// 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(307, 19);
this.button5.Location = new System.Drawing.Point(95, 24);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(42, 29);
this.button5.Size = new System.Drawing.Size(73, 19);
this.button5.TabIndex = 10;
this.button5.Text = "Save";
this.button5.Text = "Save Config";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.Button5Click);
//
@ -1042,6 +1033,16 @@ namespace NovetusLauncher
this.label16.Size = new System.Drawing.Size(2, 65);
this.label16.TabIndex = 51;
//
// button26
//
this.button26.Location = new System.Drawing.Point(262, 24);
this.button26.Name = "button26";
this.button26.Size = new System.Drawing.Size(133, 19);
this.button26.TabIndex = 57;
this.button26.Text = "Clear Local Asset Cache";
this.button26.UseVisualStyleBackColor = true;
this.button26.Click += new System.EventHandler(this.button26_Click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1087,7 +1088,6 @@ namespace NovetusLauncher
this.tabPage7.ResumeLayout(false);
this.tabPage8.ResumeLayout(false);
this.tabPage5.ResumeLayout(false);
this.tabPage5.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -1175,6 +1175,6 @@ namespace NovetusLauncher
private System.Windows.Forms.TreeView _fieldsTreeCache;
private System.Windows.Forms.Button button24;
private System.Windows.Forms.Button button25;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Button button26;
}
}

View File

@ -1524,5 +1524,19 @@ namespace NovetusLauncher
MessageBox.Show(addon.getInstallOutcome());
}
}
private void button26_Click(object sender, EventArgs e)
{
if (Directory.Exists(GlobalVars.AssetCacheDir))
{
Directory.Delete(GlobalVars.AssetCacheDir, true);
ConsolePrint("Asset cache cleared!", 3);
MessageBox.Show("Asset cache cleared!");
}
else
{
MessageBox.Show("There is no asset cache to clear.");
}
}
}
}

View File

@ -117,16 +117,16 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="label9.Text" xml:space="preserve">
<value>ROBLOX and the ROBLOX Clients were made by the ROBLOX Corporation. The ROBLOX Corporation does not support or endorse the creation of Novetus. Bitl is not affiliated with the ROBLOX Corporation or its subsidiaries. Bitl does not own any of the content included with Novetus. LUA scripts were used to build a client that can connect to LAN and the Internet. The LUA scripts used were borrowed from the RBXPri client and modified for this project. All credit for the LUA code included with the RBXPri client goes to the RBXPri team. All credit for the LUA code used with "non-modern" clients goes to Scripter John and EnergyCell. All credit for the LUA code used for character customization goes to RBXBanLand.
</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>NOTE:
- If you have a problem where you can't see your character, REGENERATE YOUR PLAYER ID THEN REJOIN THE SERVER.
- If you tried to connect to the server and you get an error, REJOIN THE SERVER.
- To reset your character, type !!!reset into chat.
</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>ROBLOX and the ROBLOX Clients were made by the ROBLOX Corporation. The ROBLOX Corporation does not support or endorse the creation of Novetus. Bitl is not affiliated with the ROBLOX Corporation or its subsidiaries. Bitl does not own any of the content included with Novetus. LUA scripts were used to build a client that can connect to LAN and the Internet. The LUA scripts used were borrowed from the RBXPri client and modified for this project. All credit for the LUA code included with the RBXPri client goes to the RBXPri team. All credit for the LUA code used with "non-modern" clients goes to Scripter John and EnergyCell. All credit for the LUA code used for character customization goes to RBXBanLand.
</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />