diff --git a/.gitignore b/.gitignore index bac55ec..8e025c8 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,10 @@ obj/Debug/AppInstaller.Form1.resources obj/Debug/AppInstaller.pdb obj/Debug/AppInstaller.Properties.Resources.resources .vs/AppInstaller/v17/.suo +.vs/AppInstaller/FileContentIndex/63c7c7d3-9dd6-4487-9843-dab562765dff.vsidx +.vs/AppInstaller/FileContentIndex/6e723bca-7cd5-40bd-a118-6a41668b1efc.vsidx +.vs/AppInstaller/FileContentIndex/9fcdb676-d162-41e8-a770-371e4fb7c475.vsidx +.vs/AppInstaller/FileContentIndex/eec4a045-0621-45ee-8297-9765eb921943.vsidx +.vs/AppInstaller/FileContentIndex/f03eaa4d-6751-4db5-a401-a996a46472d9.vsidx +.vs/AppInstaller/v17/.suo +.vs/AppInstaller/FileContentIndex/b3b00a07-39fa-484b-b669-7d976afd085b.vsidx diff --git a/Form1.Designer.cs b/Form1.Designer.cs index 2ff8870..2290365 100644 --- a/Form1.Designer.cs +++ b/Form1.Designer.cs @@ -532,10 +532,10 @@ private void InitializeComponent() // label9 // this.label9.AutoSize = true; - this.label9.Font = new System.Drawing.Font("Segoe UI Variable Text", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label9.Location = new System.Drawing.Point(333, 0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(311, 20); + this.label9.Size = new System.Drawing.Size(339, 18); this.label9.TabIndex = 4; this.label9.Text = "NOTE: Settings are WIP and mostly broken."; // @@ -557,9 +557,9 @@ private void InitializeComponent() this.checkBox1.AutoSize = true; this.checkBox1.Location = new System.Drawing.Point(32, 36); this.checkBox1.Name = "checkBox1"; - this.checkBox1.Size = new System.Drawing.Size(123, 17); + this.checkBox1.Size = new System.Drawing.Size(177, 17); this.checkBox1.TabIndex = 0; - this.checkBox1.Text = "Enable Acrylic Mode"; + this.checkBox1.Text = "Enable Acrylic Mode (BROKEN)"; this.checkBox1.UseVisualStyleBackColor = true; this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // @@ -573,6 +573,7 @@ private void InitializeComponent() this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Name = "Form1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "AppInstaller"; this.Load += new System.EventHandler(this.Form1_Load); this.TabControl.ResumeLayout(false); diff --git a/Form1.cs b/Form1.cs index b991db4..a61d9f0 100644 --- a/Form1.cs +++ b/Form1.cs @@ -222,15 +222,31 @@ private async void button12_Click(object sender, EventArgs e) button11.Visible = true; } - private async void button10_Click(object sender, EventArgs e) + private void button10_Click(object sender, EventArgs e) { - // "%LocalAppData%\Discord\Update.exe" --uninstall -s - //Discord uninstall + string uninst = GetEnvironmentVariable("localappdata") + "\\Discord\\Update.exe"; + button10.Text = "Uninstalling..."; + var process = Process.Start(uninst, "--uninstall -s"); + process.WaitForExit(); + button10.Text = "Uninstalled"; + wait(5000); + button10.Visible = false; + button6.Text = "Install"; } private void button5_Click(object sender, EventArgs e) { - //Edge uninstall + string uninst = GetEnvironmentVariable("PROGRAMFILES(X86)") + "\\Microsoft\\Edge\\Application\\"; + string[] dirs = Directory.GetDirectories(uninst, "*", SearchOption.AllDirectories); + string uninstdir = dirs[0]; + string uninstaller = uninstdir + "setup.exe"; + button5.Text = "Uninstalling..."; + var process = Process.Start(uninstaller, "-uninstall -system-level –verbose-logging –force-uninstall"); + process.WaitForExit(); + button5.Text = "Uninstalled"; + wait(5000); + button5.Visible = false; + button1.Text = "Install"; } private async void button16_Click(object sender, EventArgs e) @@ -254,8 +270,14 @@ private async void button16_Click(object sender, EventArgs e) private void button11_Click(object sender, EventArgs e) { - // "%AppData%\Telegram Desktop\unins000.exe" /VERYSILENT /NORESTART - //Telegram uninstall + string uninst = GetEnvironmentVariable("appdata") + "\\Telegram Desktop\\unins000.exe"; + button11.Text = "Uninstalling..."; + var process = Process.Start(uninst, "/VERYSILENT /NORESTART"); + process.WaitForExit(); + button11.Text = "Uninstalled"; + wait(5000); + button11.Visible = false; + button12.Text = "Install"; } private void button13_Click(object sender, EventArgs e) @@ -285,13 +307,31 @@ private void button15_Click(object sender, EventArgs e) private void checkBox1_CheckedChanged(object sender, EventArgs e) { - this.BackColor = System.Drawing.ColorTranslator.FromHtml("#010000"); - Settings.BackColor = System.Drawing.ColorTranslator.FromHtml("#010000"); - Utilities.BackColor = System.Drawing.ColorTranslator.FromHtml("#010000"); - tabPage1.BackColor = System.Drawing.ColorTranslator.FromHtml("#010000"); - tabPage2.BackColor = System.Drawing.ColorTranslator.FromHtml("#010000"); - TabControl.BackColor = System.Drawing.ColorTranslator.FromHtml("#010000"); - EnableBlur(); + if (checkBox1.Checked) + { + this.BackColor = System.Drawing.ColorTranslator.FromHtml("#010000"); + Settings.BackColor = System.Drawing.ColorTranslator.FromHtml("#010000"); + Utilities.BackColor = System.Drawing.ColorTranslator.FromHtml("#010000"); + tabPage1.BackColor = System.Drawing.ColorTranslator.FromHtml("#010000"); + tabPage2.BackColor = System.Drawing.ColorTranslator.FromHtml("#010000"); + TabControl.BackColor = System.Drawing.ColorTranslator.FromHtml("#010000"); + EnableBlur(); + label1.ForeColor = Color.White; + label2.ForeColor = Color.White; + label3.ForeColor = Color.White; + label4.ForeColor = Color.White; + label5.ForeColor = Color.White; + label6.ForeColor = Color.White; + label7.ForeColor = Color.White; + label8.ForeColor = Color.White; + label9.ForeColor = Color.White; + label10.ForeColor = Color.White; + label11.ForeColor = Color.White; + } else + { + Application.Restart(); + Exit(0); + } } diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 59dc43e..296ba0e 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -6,11 +6,11 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("AppInstaller")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("Install your apps with ease")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyCompany("The AppInst team")] [assembly: AssemblyProduct("AppInstaller")] -[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyCopyright("Copyright © AppInst 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.1.0")] [assembly: AssemblyFileVersion("1.0.0.0")]