From 5b8d350af0dc2a9862fa3a8007be362fc91e6eba Mon Sep 17 00:00:00 2001 From: AShifter Date: Tue, 2 May 2017 19:43:58 -0600 Subject: [PATCH 1/2] fix advance file skimmer it looks better --- ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs b/ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs index a7b7aa5..d19d639 100644 --- a/ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs +++ b/ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs @@ -69,10 +69,9 @@ namespace ShiftOS.WinForms.Applications // // lvitems // - this.lvitems.Dock = System.Windows.Forms.DockStyle.Right; - this.lvitems.Location = new System.Drawing.Point(120, 0); + this.lvitems.Location = new System.Drawing.Point(135, 0); this.lvitems.Name = "lvitems"; - this.lvitems.Size = new System.Drawing.Size(514, 332); + this.lvitems.Size = new System.Drawing.Size(499, 332); this.lvitems.TabIndex = 0; this.lvitems.UseCompatibleStateImageBehavior = false; this.lvitems.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.lvitems_ItemSelectionChanged); @@ -81,8 +80,8 @@ namespace ShiftOS.WinForms.Applications // // panel1 // - this.panel1.Controls.Add(this.pinnedItems); this.panel1.Controls.Add(this.lvitems); + this.panel1.Controls.Add(this.pinnedItems); this.panel1.Controls.Add(this.lbcurrentfolder); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(0, 24); @@ -92,10 +91,10 @@ namespace ShiftOS.WinForms.Applications // // pinnedItems // - this.pinnedItems.Dock = System.Windows.Forms.DockStyle.Left; + this.pinnedItems.Dock = System.Windows.Forms.DockStyle.Fill; this.pinnedItems.Location = new System.Drawing.Point(0, 0); this.pinnedItems.Name = "pinnedItems"; - this.pinnedItems.Size = new System.Drawing.Size(114, 332); + this.pinnedItems.Size = new System.Drawing.Size(634, 332); this.pinnedItems.TabIndex = 3; // // lbcurrentfolder From 2fede89938014129cf50d66d5ff62af1bde4a477 Mon Sep 17 00:00:00 2001 From: AShifter Date: Tue, 2 May 2017 20:08:43 -0600 Subject: [PATCH 2/2] Catch invalid skin file I accidentally tried to load 0.0.x skin file, and it crashed. Added a try/catch around it and if caught, give an infobox saying "This skin is not compatible with this version of ShiftOS.". --- ShiftOS.WinForms/Applications/Skin Loader.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ShiftOS.WinForms/Applications/Skin Loader.cs b/ShiftOS.WinForms/Applications/Skin Loader.cs index 1f09e4a..f9857b7 100644 --- a/ShiftOS.WinForms/Applications/Skin Loader.cs +++ b/ShiftOS.WinForms/Applications/Skin Loader.cs @@ -313,7 +313,15 @@ namespace ShiftOS.WinForms.Applications { AppearanceManager.SetupDialog(new FileDialog(new[] { ".skn" }, FileOpenerStyle.Open, new Action((filename) => { - LoadedSkin = JsonConvert.DeserializeObject(ShiftOS.Objects.ShiftFS.Utils.ReadAllText(filename)); + try + { + LoadedSkin = JsonConvert.DeserializeObject(ShiftOS.Objects.ShiftFS.Utils.ReadAllText(filename)); + } + catch + { + Infobox.Show("Invalid Skin", "This skin is not compatible with this version of ShiftOS."); + } + SetupUI(); }))); }