From 321ddfc66a0a366efa64506c0c33316ca57f251d Mon Sep 17 00:00:00 2001 From: Carver Harrison Date: Sun, 24 Jul 2016 14:56:02 -0700 Subject: HOLY **** THATS A LOT OFF ADDIITIONS --- source/WindowsFormsApplication1/Apps/Appscape.cs | 10 +++++++++- source/WindowsFormsApplication1/Apps/Artpad.cs | 10 +++++++++- .../Apps/File Skimmer.Designer.cs | 1 + .../WindowsFormsApplication1/Apps/File Skimmer.cs | 23 +++++++++++++++++++--- .../WindowsFormsApplication1/Apps/IconManager.cs | 10 +++++++++- .../WindowsFormsApplication1/Apps/NameChanger.cs | 10 +++++++++- source/WindowsFormsApplication1/Apps/NetGen.cs | 16 +++++++++++---- .../Apps/NetworkBrowser.cs | 10 +++++++++- 8 files changed, 78 insertions(+), 12 deletions(-) (limited to 'source/WindowsFormsApplication1/Apps') diff --git a/source/WindowsFormsApplication1/Apps/Appscape.cs b/source/WindowsFormsApplication1/Apps/Appscape.cs index 81025f0..3cec4c6 100644 --- a/source/WindowsFormsApplication1/Apps/Appscape.cs +++ b/source/WindowsFormsApplication1/Apps/Appscape.cs @@ -22,7 +22,15 @@ namespace ShiftOS /// public Appscape() { - InitializeComponent(); + try + { + InitializeComponent(); + } + catch (Exception ex) + { + API.Crash(ex); + Close(); + } } private List clients = null; diff --git a/source/WindowsFormsApplication1/Apps/Artpad.cs b/source/WindowsFormsApplication1/Apps/Artpad.cs index 26c1ece..a8de9f5 100644 --- a/source/WindowsFormsApplication1/Apps/Artpad.cs +++ b/source/WindowsFormsApplication1/Apps/Artpad.cs @@ -20,7 +20,15 @@ namespace ShiftOS /// public Artpad() { - InitializeComponent(); + try + { + InitializeComponent(); + } + catch (Exception ex) + { + API.Crash(ex); + Close(); + } } #region Variables diff --git a/source/WindowsFormsApplication1/Apps/File Skimmer.Designer.cs b/source/WindowsFormsApplication1/Apps/File Skimmer.Designer.cs index f22811f..b7c1a6a 100644 --- a/source/WindowsFormsApplication1/Apps/File Skimmer.Designer.cs +++ b/source/WindowsFormsApplication1/Apps/File Skimmer.Designer.cs @@ -153,6 +153,7 @@ this.menuStrip1.Size = new System.Drawing.Size(763, 24); this.menuStrip1.TabIndex = 0; this.menuStrip1.Text = "menuStrip1"; + // // newFolderToolStripMenuItem // diff --git a/source/WindowsFormsApplication1/Apps/File Skimmer.cs b/source/WindowsFormsApplication1/Apps/File Skimmer.cs index 56295f2..ab01f11 100644 --- a/source/WindowsFormsApplication1/Apps/File Skimmer.cs +++ b/source/WindowsFormsApplication1/Apps/File Skimmer.cs @@ -7,6 +7,7 @@ using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using Newtonsoft.Json; using ShiftUI; namespace ShiftOS @@ -128,8 +129,16 @@ namespace ShiftOS /// public File_Skimmer() { - MountMgr.Init(); - InitializeComponent(); + try + { + MountMgr.Init(); + InitializeComponent(); + } + catch (Exception ex) + { + API.Crash(ex); + Close(); + } } public File_Skimmer(FileSkimmerMode mode, string filters) @@ -385,6 +394,7 @@ namespace ShiftOS imgtypes.Images.Add("doc", API.GetIcon("TextFile")); imgtypes.Images.Add("skin", API.GetIcon("SkinFile")); imgtypes.Images.Add("package", API.GetIcon("SetupPackage")); + imgtypes.Images.Add("image", API.GetIcon("Image")); imgtypes.Images.Add("none", API.GetIcon("UnrecognizedFile")); } @@ -395,13 +405,15 @@ namespace ShiftOS /// The File ID. public string GetFileType(string extension) { - SetupImages(); + SetupImages(); switch(extension) { case ".owd": + case ".text": case ".doc": case ".docx": case ".txt": + case ".log": return "doc"; case ".exe": case ".saa": @@ -413,6 +425,11 @@ namespace ShiftOS case ".skn": case ".spk": return "skin"; + case ".png": + case ".bmp": + case ".pic": + case ".jpg": + return "image"; default: return "none"; } diff --git a/source/WindowsFormsApplication1/Apps/IconManager.cs b/source/WindowsFormsApplication1/Apps/IconManager.cs index b33d373..a2969f5 100644 --- a/source/WindowsFormsApplication1/Apps/IconManager.cs +++ b/source/WindowsFormsApplication1/Apps/IconManager.cs @@ -16,7 +16,15 @@ namespace ShiftOS { public IconManager() { - InitializeComponent(); + try + { + InitializeComponent(); + } + catch (Exception ex) + { + API.Crash(ex); + Close(); + } } private void IconManager_Load(object sender, EventArgs e) diff --git a/source/WindowsFormsApplication1/Apps/NameChanger.cs b/source/WindowsFormsApplication1/Apps/NameChanger.cs index 2c1014c..718c27c 100644 --- a/source/WindowsFormsApplication1/Apps/NameChanger.cs +++ b/source/WindowsFormsApplication1/Apps/NameChanger.cs @@ -17,7 +17,15 @@ namespace ShiftOS { public NameChanger() { - InitializeComponent(); + try + { + InitializeComponent(); + } + catch (Exception ex) + { + API.Crash(ex); + Close(); + } } public NamePackModel np = new NamePackModel(); diff --git a/source/WindowsFormsApplication1/Apps/NetGen.cs b/source/WindowsFormsApplication1/Apps/NetGen.cs index 679ad51..2c64971 100644 --- a/source/WindowsFormsApplication1/Apps/NetGen.cs +++ b/source/WindowsFormsApplication1/Apps/NetGen.cs @@ -13,10 +13,18 @@ namespace ShiftOS { public partial class NetGen : Form { - public NetGen() - { - InitializeComponent(); - } + public NetGen() + { + try + { + InitializeComponent(); + } + catch (Exception ex) + { + API.Crash(ex); + Close(); + } + } private EnemyHacker network = null; private int stage = 0; diff --git a/source/WindowsFormsApplication1/Apps/NetworkBrowser.cs b/source/WindowsFormsApplication1/Apps/NetworkBrowser.cs index d7aed28..a34d7b4 100644 --- a/source/WindowsFormsApplication1/Apps/NetworkBrowser.cs +++ b/source/WindowsFormsApplication1/Apps/NetworkBrowser.cs @@ -17,7 +17,15 @@ namespace ShiftOS { public NetworkBrowser() { - InitializeComponent(); + try + { + InitializeComponent(); + } + catch (Exception ex) + { + API.Crash(ex); + Close(); + } } public Dictionary Networks = null; -- cgit v1.2.3