Browse Source

Hotfix: Crash on load with no internet (v9.5)

deadmoon 4 năm trước cách đây
mục cha
commit
85347d5170

+ 4 - 0
CHANGELOG.md

@@ -2,6 +2,10 @@
 
 All notable changes to this project will be documented in this file.
 
+## [9.5] - 2021-07-15
+- Hotfix: Crash when running with no internet connection
+- Improved: Startup items can now be checked
+
 ## [9.4] - 2021-07-14
 - New: App now opens slightly faster
 - New: Enhance Privacy now attempts to enable Group Policy Editor on Windows 10 Home (gpedit.msc)

+ 7 - 7
Optimizer/HostsEditorForm.Designer.cs

@@ -42,10 +42,10 @@
             this.bpanel.Controls.Add(this.closebtn);
             this.bpanel.Controls.Add(this.savebtn);
             this.bpanel.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.bpanel.Location = new System.Drawing.Point(0, 392);
+            this.bpanel.Location = new System.Drawing.Point(0, 491);
             this.bpanel.Margin = new System.Windows.Forms.Padding(2);
             this.bpanel.Name = "bpanel";
-            this.bpanel.Size = new System.Drawing.Size(604, 49);
+            this.bpanel.Size = new System.Drawing.Size(615, 49);
             this.bpanel.TabIndex = 0;
             // 
             // closebtn
@@ -58,7 +58,7 @@
             this.closebtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.closebtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.closebtn.ForeColor = System.Drawing.Color.White;
-            this.closebtn.Location = new System.Drawing.Point(342, 8);
+            this.closebtn.Location = new System.Drawing.Point(353, 8);
             this.closebtn.Margin = new System.Windows.Forms.Padding(2);
             this.closebtn.Name = "closebtn";
             this.closebtn.Size = new System.Drawing.Size(124, 31);
@@ -77,7 +77,7 @@
             this.savebtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.savebtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.savebtn.ForeColor = System.Drawing.Color.White;
-            this.savebtn.Location = new System.Drawing.Point(470, 8);
+            this.savebtn.Location = new System.Drawing.Point(481, 8);
             this.savebtn.Margin = new System.Windows.Forms.Padding(2);
             this.savebtn.Name = "savebtn";
             this.savebtn.Size = new System.Drawing.Size(124, 31);
@@ -94,7 +94,7 @@
             this.panel1.Location = new System.Drawing.Point(0, 0);
             this.panel1.Margin = new System.Windows.Forms.Padding(2);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(604, 392);
+            this.panel1.Size = new System.Drawing.Size(615, 491);
             this.panel1.TabIndex = 1;
             // 
             // textBox1
@@ -106,7 +106,7 @@
             this.textBox1.ForeColor = System.Drawing.Color.White;
             this.textBox1.Location = new System.Drawing.Point(0, 0);
             this.textBox1.Name = "textBox1";
-            this.textBox1.Size = new System.Drawing.Size(604, 392);
+            this.textBox1.Size = new System.Drawing.Size(615, 491);
             this.textBox1.TabIndex = 0;
             this.textBox1.Text = "";
             // 
@@ -116,7 +116,7 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
             this.CancelButton = this.closebtn;
-            this.ClientSize = new System.Drawing.Size(604, 441);
+            this.ClientSize = new System.Drawing.Size(615, 540);
             this.Controls.Add(this.panel1);
             this.Controls.Add(this.bpanel);
             this.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

+ 3 - 3
Optimizer/InfoForm.Designer.cs

@@ -42,7 +42,7 @@
             this.btnOK.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.btnOK.ForeColor = System.Drawing.Color.White;
-            this.btnOK.Location = new System.Drawing.Point(566, 477);
+            this.btnOK.Location = new System.Drawing.Point(519, 494);
             this.btnOK.Margin = new System.Windows.Forms.Padding(2);
             this.btnOK.Name = "btnOK";
             this.btnOK.Size = new System.Drawing.Size(96, 31);
@@ -67,7 +67,7 @@
             this.txtInfo.Name = "txtInfo";
             this.txtInfo.ReadOnly = true;
             this.txtInfo.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
-            this.txtInfo.Size = new System.Drawing.Size(651, 454);
+            this.txtInfo.Size = new System.Drawing.Size(604, 471);
             this.txtInfo.TabIndex = 33;
             this.txtInfo.Text = "Integrator InfoBox";
             // 
@@ -78,7 +78,7 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
             this.CancelButton = this.btnOK;
-            this.ClientSize = new System.Drawing.Size(672, 517);
+            this.ClientSize = new System.Drawing.Size(625, 534);
             this.Controls.Add(this.txtInfo);
             this.Controls.Add(this.btnOK);
             this.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

+ 28 - 26
Optimizer/MainForm.Designer.cs

@@ -1372,7 +1372,7 @@ namespace Optimizer
             this.cancelBackup.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.cancelBackup.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.cancelBackup.ForeColor = System.Drawing.Color.White;
-            this.cancelBackup.Location = new System.Drawing.Point(432, 522);
+            this.cancelBackup.Location = new System.Drawing.Point(106, 551);
             this.cancelBackup.Margin = new System.Windows.Forms.Padding(2);
             this.cancelBackup.Name = "cancelBackup";
             this.cancelBackup.Size = new System.Drawing.Size(90, 25);
@@ -1391,7 +1391,7 @@ namespace Optimizer
             this.doBackup.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.doBackup.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.doBackup.ForeColor = System.Drawing.Color.White;
-            this.doBackup.Location = new System.Drawing.Point(338, 522);
+            this.doBackup.Location = new System.Drawing.Point(12, 551);
             this.doBackup.Margin = new System.Windows.Forms.Padding(2);
             this.doBackup.Name = "doBackup";
             this.doBackup.Size = new System.Drawing.Size(90, 25);
@@ -1407,7 +1407,7 @@ namespace Optimizer
             this.txtBackupTitle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.txtBackupTitle.Font = new System.Drawing.Font("Segoe UI Semibold", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.txtBackupTitle.ForeColor = System.Drawing.Color.White;
-            this.txtBackupTitle.Location = new System.Drawing.Point(11, 522);
+            this.txtBackupTitle.Location = new System.Drawing.Point(12, 522);
             this.txtBackupTitle.Margin = new System.Windows.Forms.Padding(2);
             this.txtBackupTitle.Name = "txtBackupTitle";
             this.txtBackupTitle.Size = new System.Drawing.Size(323, 25);
@@ -1420,7 +1420,7 @@ namespace Optimizer
             this.lblBackupTitle.AutoSize = true;
             this.lblBackupTitle.Font = new System.Drawing.Font("Segoe UI Semibold", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.lblBackupTitle.ForeColor = System.Drawing.Color.Silver;
-            this.lblBackupTitle.Location = new System.Drawing.Point(7, 501);
+            this.lblBackupTitle.Location = new System.Drawing.Point(8, 501);
             this.lblBackupTitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.lblBackupTitle.Name = "lblBackupTitle";
             this.lblBackupTitle.Size = new System.Drawing.Size(86, 19);
@@ -1437,7 +1437,7 @@ namespace Optimizer
             this.restoreStartupB.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.restoreStartupB.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.restoreStartupB.ForeColor = System.Drawing.Color.White;
-            this.restoreStartupB.Location = new System.Drawing.Point(175, 502);
+            this.restoreStartupB.Location = new System.Drawing.Point(176, 502);
             this.restoreStartupB.Margin = new System.Windows.Forms.Padding(2);
             this.restoreStartupB.Name = "restoreStartupB";
             this.restoreStartupB.Size = new System.Drawing.Size(160, 31);
@@ -1454,7 +1454,7 @@ namespace Optimizer
             this.backupStartupB.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.backupStartupB.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.backupStartupB.ForeColor = System.Drawing.Color.White;
-            this.backupStartupB.Location = new System.Drawing.Point(11, 502);
+            this.backupStartupB.Location = new System.Drawing.Point(12, 502);
             this.backupStartupB.Margin = new System.Windows.Forms.Padding(2);
             this.backupStartupB.Name = "backupStartupB";
             this.backupStartupB.Size = new System.Drawing.Size(160, 31);
@@ -1472,7 +1472,7 @@ namespace Optimizer
             this.findInRegB.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.findInRegB.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.findInRegB.ForeColor = System.Drawing.Color.White;
-            this.findInRegB.Location = new System.Drawing.Point(521, 537);
+            this.findInRegB.Location = new System.Drawing.Point(590, 538);
             this.findInRegB.Margin = new System.Windows.Forms.Padding(2);
             this.findInRegB.Name = "findInRegB";
             this.findInRegB.Size = new System.Drawing.Size(160, 31);
@@ -1490,7 +1490,7 @@ namespace Optimizer
             this.locateFileB.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.locateFileB.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.locateFileB.ForeColor = System.Drawing.Color.White;
-            this.locateFileB.Location = new System.Drawing.Point(521, 502);
+            this.locateFileB.Location = new System.Drawing.Point(754, 503);
             this.locateFileB.Margin = new System.Windows.Forms.Padding(2);
             this.locateFileB.Name = "locateFileB";
             this.locateFileB.Size = new System.Drawing.Size(160, 31);
@@ -1508,7 +1508,7 @@ namespace Optimizer
             this.refreshStartupB.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.refreshStartupB.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.refreshStartupB.ForeColor = System.Drawing.Color.White;
-            this.refreshStartupB.Location = new System.Drawing.Point(685, 537);
+            this.refreshStartupB.Location = new System.Drawing.Point(754, 538);
             this.refreshStartupB.Margin = new System.Windows.Forms.Padding(2);
             this.refreshStartupB.Name = "refreshStartupB";
             this.refreshStartupB.Size = new System.Drawing.Size(160, 31);
@@ -1526,18 +1526,20 @@ namespace Optimizer
             this.panel3.Location = new System.Drawing.Point(11, 40);
             this.panel3.Margin = new System.Windows.Forms.Padding(2);
             this.panel3.Name = "panel3";
-            this.panel3.Size = new System.Drawing.Size(834, 459);
+            this.panel3.Size = new System.Drawing.Size(903, 459);
             this.panel3.TabIndex = 37;
             // 
             // listStartupItems
             // 
             this.listStartupItems.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
             this.listStartupItems.BorderStyle = System.Windows.Forms.BorderStyle.None;
+            this.listStartupItems.CheckBoxes = true;
             this.listStartupItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
             this.columnHeader1,
             this.columnHeader2,
             this.columnHeader3});
             this.listStartupItems.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.listStartupItems.Font = new System.Drawing.Font("Segoe UI Semibold", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.listStartupItems.ForeColor = System.Drawing.Color.White;
             this.listStartupItems.FullRowSelect = true;
             this.listStartupItems.HideSelection = false;
@@ -1546,7 +1548,7 @@ namespace Optimizer
             this.listStartupItems.MultiSelect = false;
             this.listStartupItems.Name = "listStartupItems";
             this.listStartupItems.ShowGroups = false;
-            this.listStartupItems.Size = new System.Drawing.Size(832, 457);
+            this.listStartupItems.Size = new System.Drawing.Size(901, 457);
             this.listStartupItems.TabIndex = 0;
             this.listStartupItems.UseCompatibleStateImageBehavior = false;
             this.listStartupItems.View = System.Windows.Forms.View.Details;
@@ -1576,12 +1578,12 @@ namespace Optimizer
             this.removeStartupItemB.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.removeStartupItemB.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.removeStartupItemB.ForeColor = System.Drawing.Color.White;
-            this.removeStartupItemB.Location = new System.Drawing.Point(685, 502);
+            this.removeStartupItemB.Location = new System.Drawing.Point(590, 503);
             this.removeStartupItemB.Margin = new System.Windows.Forms.Padding(2);
             this.removeStartupItemB.Name = "removeStartupItemB";
             this.removeStartupItemB.Size = new System.Drawing.Size(160, 31);
             this.removeStartupItemB.TabIndex = 36;
-            this.removeStartupItemB.Text = "Remove";
+            this.removeStartupItemB.Text = "Delete";
             this.removeStartupItemB.UseVisualStyleBackColor = false;
             this.removeStartupItemB.Click += new System.EventHandler(this.button32_Click);
             // 
@@ -2012,7 +2014,7 @@ namespace Optimizer
             this.lblPretext.AutoSize = true;
             this.lblPretext.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.lblPretext.ForeColor = System.Drawing.Color.Silver;
-            this.lblPretext.Location = new System.Drawing.Point(29, 229);
+            this.lblPretext.Location = new System.Drawing.Point(51, 241);
             this.lblPretext.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.lblPretext.Name = "lblPretext";
             this.lblPretext.Size = new System.Drawing.Size(123, 21);
@@ -2026,7 +2028,7 @@ namespace Optimizer
             this.lblFootprint.Font = new System.Drawing.Font("Segoe UI Semibold", 13F, ((System.Drawing.FontStyle)(((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic) 
                 | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.lblFootprint.ForeColor = System.Drawing.Color.DodgerBlue;
-            this.lblFootprint.Location = new System.Drawing.Point(30, 250);
+            this.lblFootprint.Location = new System.Drawing.Point(52, 262);
             this.lblFootprint.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.lblFootprint.Name = "lblFootprint";
             this.lblFootprint.Size = new System.Drawing.Size(119, 31);
@@ -2614,7 +2616,7 @@ namespace Optimizer
             this.removeHostB.Name = "removeHostB";
             this.removeHostB.Size = new System.Drawing.Size(156, 31);
             this.removeHostB.TabIndex = 54;
-            this.removeHostB.Text = "Remove";
+            this.removeHostB.Text = "Delete";
             this.removeHostB.UseVisualStyleBackColor = false;
             this.removeHostB.Click += new System.EventHandler(this.button42_Click);
             // 
@@ -2632,7 +2634,7 @@ namespace Optimizer
             this.removeAllHostsB.Name = "removeAllHostsB";
             this.removeAllHostsB.Size = new System.Drawing.Size(156, 31);
             this.removeAllHostsB.TabIndex = 53;
-            this.removeAllHostsB.Text = "Remove all";
+            this.removeAllHostsB.Text = "Delete all";
             this.removeAllHostsB.UseVisualStyleBackColor = false;
             this.removeAllHostsB.Visible = false;
             this.removeAllHostsB.Click += new System.EventHandler(this.button46_Click);
@@ -3503,7 +3505,7 @@ namespace Optimizer
             this.removeDIB.Name = "removeDIB";
             this.removeDIB.Size = new System.Drawing.Size(137, 31);
             this.removeDIB.TabIndex = 80;
-            this.removeDIB.Text = "Remove";
+            this.removeDIB.Text = "Delete";
             this.removeDIB.UseVisualStyleBackColor = false;
             this.removeDIB.Click += new System.EventHandler(this.button61_Click);
             // 
@@ -3520,7 +3522,7 @@ namespace Optimizer
             this.removeAllIIB.Name = "removeAllIIB";
             this.removeAllIIB.Size = new System.Drawing.Size(137, 31);
             this.removeAllIIB.TabIndex = 79;
-            this.removeAllIIB.Text = "Remove all";
+            this.removeAllIIB.Text = "Delete all";
             this.removeAllIIB.UseVisualStyleBackColor = false;
             this.removeAllIIB.Click += new System.EventHandler(this.button62_Click);
             // 
@@ -3569,7 +3571,7 @@ namespace Optimizer
             this.RemoveOwnerB.Name = "RemoveOwnerB";
             this.RemoveOwnerB.Size = new System.Drawing.Size(334, 31);
             this.RemoveOwnerB.TabIndex = 78;
-            this.RemoveOwnerB.Text = "Remove \"Take Ownership\"";
+            this.RemoveOwnerB.Text = "Delete \"Take Ownership\"";
             this.RemoveOwnerB.UseVisualStyleBackColor = false;
             this.RemoveOwnerB.Click += new System.EventHandler(this.button65_Click);
             // 
@@ -3717,7 +3719,7 @@ namespace Optimizer
             this.panel6.Location = new System.Drawing.Point(11, 210);
             this.panel6.Margin = new System.Windows.Forms.Padding(2);
             this.panel6.Name = "panel6";
-            this.panel6.Size = new System.Drawing.Size(271, 263);
+            this.panel6.Size = new System.Drawing.Size(271, 313);
             this.panel6.TabIndex = 84;
             // 
             // listCustomCommands
@@ -3733,7 +3735,7 @@ namespace Optimizer
             this.listCustomCommands.Location = new System.Drawing.Point(0, 0);
             this.listCustomCommands.Margin = new System.Windows.Forms.Padding(2);
             this.listCustomCommands.Name = "listCustomCommands";
-            this.listCustomCommands.Size = new System.Drawing.Size(269, 261);
+            this.listCustomCommands.Size = new System.Drawing.Size(269, 311);
             this.listCustomCommands.TabIndex = 79;
             // 
             // removeCCB
@@ -3749,7 +3751,7 @@ namespace Optimizer
             this.removeCCB.Name = "removeCCB";
             this.removeCCB.Size = new System.Drawing.Size(120, 27);
             this.removeCCB.TabIndex = 82;
-            this.removeCCB.Text = "Remove";
+            this.removeCCB.Text = "Delete";
             this.removeCCB.UseVisualStyleBackColor = false;
             this.removeCCB.Click += new System.EventHandler(this.button26_Click);
             // 
@@ -3778,10 +3780,10 @@ namespace Optimizer
             this.removeCCL.Location = new System.Drawing.Point(6, 173);
             this.removeCCL.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.removeCCL.Name = "removeCCL";
-            this.removeCCL.Size = new System.Drawing.Size(268, 28);
+            this.removeCCL.Size = new System.Drawing.Size(254, 28);
             this.removeCCL.TabIndex = 80;
             this.removeCCL.Tag = "themeable";
-            this.removeCCL.Text = "Remove existing commands";
+            this.removeCCL.Text = "Delete existing commands";
             // 
             // btnCreateCustomCommand
             // 
@@ -4493,7 +4495,7 @@ namespace Optimizer
             this.trayExit});
             this.launcherMenu.Name = "launcherMenu";
             this.launcherMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
-            this.launcherMenu.Size = new System.Drawing.Size(205, 214);
+            this.launcherMenu.Size = new System.Drawing.Size(205, 192);
             // 
             // trayStartup
             // 

+ 101 - 61
Optimizer/MainForm.cs

@@ -59,7 +59,7 @@ namespace Optimizer
         readonly string _blockedIP = "0.0.0.0";
 
         string _restartMessage = "Restart to apply changes?";
-        string _removeStartupItemsMessage = "Are you sure you want to delete all startup items?";
+        string _removeStartupItemsMessage = "Are you sure you want to delete these startup items?\n\n";
         string _removeHostsEntriesMessage = "Are you sure you want to delete all hosts entries?";
         string _removeDesktopItemsMessage = "Are you sure you want to delete all desktop items?";
         string _removeModernAppsMessage = "Are you sure you want to uninstall the following app(s)?";
@@ -632,75 +632,85 @@ namespace Optimizer
 
             client.Headers.Add("Cache-Control", "no-cache");
 
-            string tmpImageFileName = string.Empty;
-            string tmpDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Optimizer-tmp");
-            
-            Directory.CreateDirectory(tmpDir);
-            client.DownloadFile(_feedImages, Path.Combine(tmpDir, "feed-images.raw"));
-
-            using (FileStream fs = new FileStream(Path.Combine(tmpDir, "feed-images.raw"), FileMode.Open))
-            using (ZipArchive zip = new ZipArchive(fs))
+            try
             {
-                var zipEntries = zip.Entries;
+                string tmpImageFileName = string.Empty;
+                string tmpDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Optimizer-tmp");
 
-                try
-                {
-                    string feed = client.DownloadString(_feedLink);
-                    AppsFromFeed = JsonConvert.DeserializeObject<List<FeedApp>>(feed);
+                Directory.CreateDirectory(tmpDir);
+                client.DownloadFile(_feedImages, Path.Combine(tmpDir, "feed-images.raw"));
 
-                    AppCard appCard;
-                    groupSystemTools.Controls.Clear();
-                    groupInternet.Controls.Clear();
-                    groupCoding.Controls.Clear();
-                    groupSoundVideo.Controls.Clear();
+                using (FileStream fs = new FileStream(Path.Combine(tmpDir, "feed-images.raw"), FileMode.Open))
+                using (ZipArchive zip = new ZipArchive(fs))
+                {
+                    var zipEntries = zip.Entries;
 
-                    foreach (FeedApp x in AppsFromFeed)
+                    try
                     {
-                        appCard = new AppCard();
-                        appCard.AutoSize = true;
-                        appCard.Anchor = AnchorStyles.None;
-                        appCard.Anchor = AnchorStyles.Top | AnchorStyles.Left;
-                        appCard.appTitle.Text = x.Title;
-                        appCard.appTitle.Name = x.Tag;
-                        appCard.appImage.SizeMode = PictureBoxSizeMode.Zoom;
-
-                        tmpImageFileName = x.Image.Substring(x.Image.LastIndexOf("/")+1, x.Image.Length - (x.Image.LastIndexOf("/") + 1));
-                        appCard.appImage.Image = Image.FromStream(zipEntries.First(ifn => ifn.Name == tmpImageFileName).Open());
-
-                        switch (x.Group)
+                        string feed = client.DownloadString(_feedLink);
+                        AppsFromFeed = JsonConvert.DeserializeObject<List<FeedApp>>(feed);
+
+                        AppCard appCard;
+                        groupSystemTools.Controls.Clear();
+                        groupInternet.Controls.Clear();
+                        groupCoding.Controls.Clear();
+                        groupSoundVideo.Controls.Clear();
+
+                        foreach (FeedApp x in AppsFromFeed)
                         {
-                            case "SystemTools":
-                                appCard.Location = new Point(0, groupSystemTools.Controls.Count * 30);
-                                groupSystemTools.Controls.Add(appCard);
-                                break;
-                            case "Internet":
-                                appCard.Location = new Point(0, groupInternet.Controls.Count * 30);
-                                groupInternet.Controls.Add(appCard);
-                                break;
-                            case "Coding":
-                                appCard.Location = new Point(0, groupCoding.Controls.Count * 30);
-                                groupCoding.Controls.Add(appCard);
-                                break;
-                            case "GraphicsSound":
-                                appCard.Location = new Point(0, groupSoundVideo.Controls.Count * 30);
-                                groupSoundVideo.Controls.Add(appCard);
-                                break;
-                            default:
-                                break;
+                            appCard = new AppCard();
+                            appCard.AutoSize = true;
+                            appCard.Anchor = AnchorStyles.None;
+                            appCard.Anchor = AnchorStyles.Top | AnchorStyles.Left;
+                            appCard.appTitle.Text = x.Title;
+                            appCard.appTitle.Name = x.Tag;
+                            appCard.appImage.SizeMode = PictureBoxSizeMode.Zoom;
+
+                            tmpImageFileName = x.Image.Substring(x.Image.LastIndexOf("/") + 1, x.Image.Length - (x.Image.LastIndexOf("/") + 1));
+                            appCard.appImage.Image = Image.FromStream(zipEntries.First(ifn => ifn.Name == tmpImageFileName).Open());
+
+                            switch (x.Group)
+                            {
+                                case "SystemTools":
+                                    appCard.Location = new Point(0, groupSystemTools.Controls.Count * 30);
+                                    groupSystemTools.Controls.Add(appCard);
+                                    break;
+                                case "Internet":
+                                    appCard.Location = new Point(0, groupInternet.Controls.Count * 30);
+                                    groupInternet.Controls.Add(appCard);
+                                    break;
+                                case "Coding":
+                                    appCard.Location = new Point(0, groupCoding.Controls.Count * 30);
+                                    groupCoding.Controls.Add(appCard);
+                                    break;
+                                case "GraphicsSound":
+                                    appCard.Location = new Point(0, groupSoundVideo.Controls.Count * 30);
+                                    groupSoundVideo.Controls.Add(appCard);
+                                    break;
+                                default:
+                                    break;
+                            }
                         }
+
+                        // UI handling
+                        btnDownloadApps.Enabled = true;
+                        txtFeedError.Visible = false;
                     }
+                    catch (Exception ex)
+                    {
+                        btnDownloadApps.Enabled = false;
+                        txtFeedError.Visible = true;
 
-                    // UI handling
-                    btnDownloadApps.Enabled = true;
-                    txtFeedError.Visible = false;
+                        ErrorLogger.LogError("MainForm.GetFeed", ex.Message, ex.StackTrace);
+                    }
                 }
-                catch (Exception ex)
-                {
-                    btnDownloadApps.Enabled = false;
-                    txtFeedError.Visible = true;
+            }
+            catch (Exception ex)
+            {
+                btnDownloadApps.Enabled = false;
+                txtFeedError.Visible = true;
 
-                    ErrorLogger.LogError("MainForm.GetFeed", ex.Message, ex.StackTrace);
-                }
+                ErrorLogger.LogError("MainForm.GetFeed-DownloadImages", ex.Message, ex.StackTrace);
             }
         }
 
@@ -867,6 +877,8 @@ namespace Optimizer
                     listDesktopItems.Items.Add(_desktopItems[i]);
                 }
             }
+
+            if (_desktopItems.Count > 0) listDesktopItems.SelectedIndex = 0;
         }
 
         private void GetHostsEntries()
@@ -894,6 +906,8 @@ namespace Optimizer
             adblockUlti.Enabled = !chkReadOnly.Checked;
 
             ((Control)this.hostsEditorTab).Enabled = true;
+
+            if (_hostsEntries.Count > 0) listHostEntries.SelectedIndex = 0;
         }
 
         private void GetStartupItems()
@@ -928,6 +942,8 @@ namespace Optimizer
             uninstallModernAppsButton.Enabled = true;
             refreshModernAppsButton.Enabled = true;
             listModernApps.Enabled = true;
+
+            if (_modernApps.Count > 0) listModernApps.SelectedIndex = 0;
         }
 
         private async void UninstallModernApps()
@@ -986,6 +1002,8 @@ namespace Optimizer
             {
                 listCustomCommands.Items.Add(s);
             }
+
+            if (_customCommands.Count > 0) listCustomCommands.SelectedIndex = 0;
         }
 
         private void Main_FormClosing(object sender, FormClosingEventArgs e)
@@ -1051,11 +1069,33 @@ namespace Optimizer
 
         private void button32_Click(object sender, EventArgs e)
         {
-            if (listStartupItems.SelectedItems.Count == 1)
+            if (listStartupItems.CheckedItems.Count <= 0) return; 
+
+            string report = string.Empty;
+
+            foreach (ListViewItem i in listStartupItems.CheckedItems)
+            {
+                report += i.Text + Environment.NewLine;
+            }
+            if (MessageBox.Show(_removeStartupItemsMessage + report, "Optimizer", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
             {
-                _startUpItems[listStartupItems.SelectedIndices[0]].Remove();
+                foreach (int x in listStartupItems.CheckedIndices)
+                {
+                    _startUpItems[x].Remove();
+                }
+
                 GetStartupItems();
             }
+
+            //foreach (int x in listStartupItems.CheckedIndices)
+            //{
+            //    MessageBox.Show(x.ToString());
+            //}
+            //if (listStartupItems.SelectedItems.Count == 1)
+            //{
+            //    _startUpItems[listStartupItems.SelectedIndices[0]].Remove();
+            //    GetStartupItems();
+            //}
         }
 
         internal void RemoveAllStartupItems()

+ 1 - 1
Optimizer/Program.cs

@@ -13,7 +13,7 @@ namespace Optimizer
         // Enter current version here
 
         internal readonly static float Major = 9;
-        internal readonly static float Minor = 4;
+        internal readonly static float Minor = 5;
 
         internal readonly static bool EXPERIMENTAL_BUILD = false;
 

+ 4 - 2
Optimizer/Resources/DE.json

@@ -231,7 +231,7 @@
 	"deleteBackupB": "Löschen",
 	"noNewVersion": "Sie haben bereits die neueste Version!",
 	"betaVersion": "Sie verwenden eine experimentelle Version!",
-	"removeAllStartup": "Sind Sie sicher, dass Sie alle Startobjekte löschen möchten?",
+	"removeAllStartup": "Sind Sie sicher, dass Sie alle Startobjekte löschen möchten?\n\n",
 	"removeAllHosts": "Sind Sie sicher, dass Sie alle Hosts-Einträge löschen wollen?",
 	"removeAllItems": "Sind Sie sicher, dass Sie alle Desktopelemente löschen möchten?",
 	"removeModernApps": "Sind Sie sicher, dass Sie die folgende(n) App(s) deinstallieren möchten?",
@@ -274,7 +274,9 @@
 - Zeigt immer Dateierweiterungen an
 - Zeigt versteckte Dateien",
     "networkTip": "Windows implementiert einen Netzwerk-Drosselmechanismus, der den Netzwerkverkehr einschränkt, wenn Multimedia-Anwendungen ausgeführt werden. Es kann auch die Leistung des Netzwerks verringern, wenn Sie Online-Spiele spielen.",
-    "defenderTip": "Windows Defender ist der integrierte Virenschutz in Windows-Systemen.",
+    "defenderTip": "⚠ Windows Defender kann in Windows 10 Version 1903 und höher NICHT deaktiviert werden disabled.
+	
+Windows Defender ist der integrierte Virenschutz in Windows-Systemen.",
 	"smartScreenTip": "SmartScreen scannt automatisch Dateien, Downloads und Websites, blockiert bereits bekannte gefährliche Inhalte und warnt Sie, bevor Sie diese ausführen.",
 	"systemRestoreTip": "Die Systemwiederherstellung ist eine Funktion, mit der der jetzige Zustand von Windows auf einen früheren Zustand zurückgesetzt werden kann, um Fehlfunktionen oder anderen Problemen zu lösen.",
 	"reportingTip": "Die Fehlerberichterstattung sammelt Anwendungsabstürze und Fehler und sendet diese an Microsoft.",

+ 4 - 2
Optimizer/Resources/EL.json

@@ -231,7 +231,7 @@
 	"deleteBackupB": "Διαγραφή",
 	"noNewVersion": "Έχετε την τελευταία έκδοση!",
 	"betaVersion": "Χρησιμοποιείτε μία πειραματική έκδοση!",
-	"removeAllStartup": "Είστε βέβαιοι ότι θέλετε να διαγράψετε όλα τα στοιχεία εκκίνησης;",
+	"removeAllStartup": "Είστε βέβαιοι ότι θέλετε να διαγράψετε τα παρακάτω στοιχεία εκκίνησης;\n\n",
 	"removeAllHosts": "Είστε σίγουροι ότι θέλετε να διαγράψετε όλες τις καταχωρήσεις hosts;",
 	"removeAllItems": "Είστε βέβαιοι ότι θέλετε να διαγράψετε όλα τα στοιχεία της επιφάνειας εργασίας;",
 	"removeModernApps": "Είστε βέβαιοι ότι θέλετε να απεγκαταστήσετε τις ακόλουθες εφαρμογές;",
@@ -276,7 +276,9 @@
 	"networkTip": "Τα Windows εφαρμόζουν έναν μηχανισμό δικτύου που θα περιορίσει
 κυκλοφορία δικτύου κατά την εκτέλεση εφαρμογών πολυμέσων. Μπορεί επίσης να μειώσει την απόδοση του δικτύου 
 όταν παίζετε διαδικτυακά παιχνίδια.",
-	"defenderTip": "Το Windows Defender είναι το ενσωματωμένο antivirus σε συστήματα Windows.",
+	"defenderTip": "⚠ Το Windows Defender ΔΕΝ μπορεί να απενεργοποιηθεί στα Windows 10 έκδοση 1903 και μετά.
+	
+Το Windows Defender είναι το ενσωματωμένο antivirus σε συστήματα Windows.",
 	"smartScreenTip": "Το SmartScreen σαρώνει αυτόματα αρχεία, λήψεις και ιστότοπους, αποκλείοντας
 ήδη γνωστό επικίνδυνο περιεχόμενο και σας προειδοποιεί προτού το εκτελέσετε.",
 	"systemRestoreTip": "Η Επαναφορά Συστήματος είναι μια δυνατότητα που επιτρέπει την επαναφορά της κατάστασης των Windows

+ 13 - 11
Optimizer/Resources/EN.json

@@ -63,7 +63,7 @@
 	"chkOnlyRemovable": "Only Uninstall-ables",
 	"txtUWP": "If you uninstall Store\nyou won't be able\nto install new UWP apps!\n\nAlso, some apps\ncan't be uninstalled.\n\nLike Microsoft Edge,\nSettings, etc.",
 	"startupTitle": "Choose your startup items",
-	"removeStartupItemB": "Remove",
+	"removeStartupItemB": "Delete",
 	"locateFileB": "Locate file",
 	"findInRegB": "Find in Registry",
 	"refreshStartupB": "Refresh",
@@ -120,9 +120,9 @@
 	"lblAdblockSub": "(will delete your current config)",
 	"adblockS": "AdBlock + Social",
 	"adblockP": "AdBlock + Porn",
-	"removeHostB": "Remove",
+	"removeHostB": "Delete",
 	"refreshHostsB": "Refresh",
-	"removeAllHostsB": "Remove all",
+	"removeAllHostsB": "Delete all",
 	"regFixB": "Fix",
 	"regLbl": "(some changes might need this)",
 	"checkRestartExplorer": "Also restart Explorer to apply changes",
@@ -162,7 +162,7 @@
 	"integrator7": "Items can have custom icons and position.\nThey can also be hidden,accessible only\nby pressing the SHIFT key.\nIt can also create custom commands\nfor Run Dialog, making it easy to launch\nany application only by typing your desired keyword.",
 	"integratorInfoTab": "Info",
 	"tabPage8": "Add/Modify",
-	"tabPage9": "Remove",
+	"tabPage9": "Delete",
 	"tabPage10": "Ready Menus",
 	"tabPage11": "Run Dialog",
 	"addItemL": "Add or modify an item",
@@ -191,21 +191,21 @@
 	"checkShift": "Show only when SHIFT is pressed",
 	"itemnamegroup": "Item name in menu",
 	"btnAddItem": "Add/Modify",
-	"removeIntegratorItemsL": "Remove existing Desktop items",
-	"removeDIB": "Remove",
+	"removeIntegratorItemsL": "Delete existing Desktop items",
+	"removeDIB": "Delete",
 	"refreshIIB": "Refresh",
-	"removeAllIIB": "Remove all",
+	"removeAllIIB": "Delete all",
 	"PMB": "Add Power Menu",
 	"STB": "Add System Tools",
 	"WAB": "Add Windows Apps",
 	"SSB": "Add System Shortcuts",
 	"DSB": "Add Desktop Shortcuts",
 	"AddOwnerB": "Add Take Ownership",
-	"RemoveOwnerB": "Remove Take Ownership",
+	"RemoveOwnerB": "Delete Take Ownership",
 	"readyMenusL": "Add useful, pre-made menus",
 	"refreshCCB": "Refresh",
-	"removeCCB": "Remove",
-	"removeCCL": "Remove existing commands",
+	"removeCCB": "Delete",
+	"removeCCL": "Delete existing commands",
 	"btnCreateCustomCommand": "Create",
 	"ccKeywordL": "keyword",
 	"ccFileL": "File location",
@@ -277,7 +277,9 @@ Completely safe to apply.
 	"networkTip": "Windows implements a network throttling mechanism that will restrict
 network traffic when running multimedia apps. It can also reduce network's
 performance when playing online games.",
-	"defenderTip": "Windows Defender is the built-in antivirus in Windows systems.",
+	"defenderTip": "⚠ Windows Defender CANNOT be disabled in Windows 10 version 1903 and higher.
+
+Windows Defender is the built-in antivirus in Windows systems.",
 	"smartScreenTip": "SmartScreen automatically scans files, downloads and websites, blocking
 already-known dangerous content and warns you before running them.",
 	"systemRestoreTip": "System Restore is a feature that allows to revert Windows' state

+ 4 - 2
Optimizer/Resources/RU.json

@@ -231,7 +231,7 @@
 	"deleteBackupB": "удалить",
 	"noNewVersion": "У вас уже установлена последняя версия!",
 	"betaVersion": "Вы используете экспериментальную версию!",
-	"removeAllStartup": "Вы действительно хотите удалить все элементы автозагрузки?",
+	"removeAllStartup": "Вы действительно хотите удалить все элементы автозагрузки?\n\n",
 	"removeAllHosts": "Вы уверены, что хотите удалить все записи о хостах?",
 	"removeAllItems": "Вы уверены, что хотите удалить все элементы рабочего стола?",
 	"removeModernApps": "Вы уверены, что хотите удалить следующие приложения?",
@@ -277,7 +277,9 @@
 	"networkTip": "Windows реализует механизм регулирования сети, который ограничивает
 сетевой трафик при запуске мультимедийных приложений. Это также может снизить
 производительность при игре в онлайн-игры.",
-	"defenderTip": "Защитник Windows - это встроенный антивирус в системах Windows.",
+	"defenderTip": "⚠ Защитник Windows НЕЛЬЗЯ отключить в Windows 10 версии 1903 и более поздних.
+
+Защитник Windows - это встроенный антивирус в системах Windows.",
 	"smartScreenTip": "SmartScreen автоматически сканирует файлы, загрузки и веб-сайты, блокируя
 уже известный опасный контент и предупреждает вас перед его запуском.",
 	"systemRestoreTip": "Восстановление системы - это функция, которая позволяет вернуть состояние Windows.

+ 4 - 2
Optimizer/Resources/TR.json

@@ -231,7 +231,7 @@
 	"deleteBackupB": "Sil",
 	"noNewVersion": "Zaten en son sürüme sahipsiniz!",
 	"betaVersion": "Deneysel bir sürüm kullanıyorsunuz!",
-	"removeAllStartup": "Tüm başlangıç öğelerini silmek istediğinizden emin misiniz?",
+	"removeAllStartup": "Tüm başlangıç öğelerini silmek istediğinizden emin misiniz\n\n?",
 	"removeAllHosts": "Tüm ana bilgisayar(hosts) girişlerini silmek istediğinizden emin misiniz?",
 	"removeAllItems": "Tüm masaüstü öğelerini silmek istediğinizden emin misiniz?",
 	"removeModernApps": "Seçilen uygulamaları kaldırmak istediğinizden emin misiniz?",
@@ -277,7 +277,9 @@ Uygulanması tamamen güvenlidir.
 	"networkTip": "Windows, multimedya uygulamalarını çalıştırırken
 ağ trafiğini kısıtlayacak bir ağ kısıtlama mekanizması uygular.
 Ayrıca çevrimiçi oyunlar oynarken ağın performansını da düşürebilir.",
-	"defenderTip": "Windows Defender, Windows sistemlerinde yerleşik antivirüs yazılımıdır.",
+	"defenderTip": "⚠ Windows Defender, Windows 10 sürüm 1903 ve sonraki sürümlerde devre dışı bırakılamaz.
+	
+Windows Defender, Windows sistemlerinde yerleşik antivirüs yazılımıdır.",
 	"smartScreenTip": "SmartScreen dosyaları, indirmeleri ve web sitelerini otomatik olarak tarar.
 Zaten bilinen tehlikeli içeriği engeller ve çalıştırmadan önce sizi uyarır.",
 	"systemRestoreTip": "Sistem Geri Yükleme, arızalardan veya diğer sorunlardan kurtulmak için

+ 2 - 0
Optimizer/StartupRestoreForm.cs

@@ -37,6 +37,8 @@ namespace Optimizer
             {
                 listRestoreItems.Items.Add(Path.GetFileNameWithoutExtension(x));
             }
+
+            if (_backups.Count() > 0) listRestoreItems.SelectedIndex = 0;
         }
 
         private void Translate()

+ 3 - 3
README.md

@@ -68,6 +68,6 @@ https://github.com/hellzerg/optimizer/blob/master/FEED.md
 
 ## Details: ##
 
-* Latest version: 9.4
-* Released: July 14, 2021
-* SHA256: FB3CD075F0C50C5A2111EB67948AD3548DA395304187609A661DE190B30E55F1
+* Latest version: 9.5
+* Released: July 15, 2021
+* SHA256: B7471DDFCC3A385C2DC30F715F560FDD959ACBF3385B6DC5206D0AC69383108A

+ 1 - 1
version.txt

@@ -1 +1 @@
-9.4
+9.5