aboutsummaryrefslogtreecommitdiff
path: root/source/WindowsFormsApplication1/Apps/File Skimmer.cs
diff options
context:
space:
mode:
authorMichael VanOverbeek <[email protected]>2016-07-25 12:57:52 -0400
committerGitHub <[email protected]>2016-07-25 12:57:52 -0400
commit46c1c31302f111a1f3ec23a70e6f3986a9aa2a27 (patch)
treef00af7ea3f6ad2641fb26fa1d310fd8b7179b39c /source/WindowsFormsApplication1/Apps/File Skimmer.cs
parentaf48e774189596b8d7a058c564a7d6d75205ca03 (diff)
parent6fa16209519896de09949a27425dff00ebf2970a (diff)
downloadshiftos-c--46c1c31302f111a1f3ec23a70e6f3986a9aa2a27.tar.gz
shiftos-c--46c1c31302f111a1f3ec23a70e6f3986a9aa2a27.tar.bz2
shiftos-c--46c1c31302f111a1f3ec23a70e6f3986a9aa2a27.zip
Merge pull request #17 from MichaelTheShifter/shiftui_integration
Shiftui integration
Diffstat (limited to 'source/WindowsFormsApplication1/Apps/File Skimmer.cs')
-rw-r--r--source/WindowsFormsApplication1/Apps/File Skimmer.cs25
1 files changed, 21 insertions, 4 deletions
diff --git a/source/WindowsFormsApplication1/Apps/File Skimmer.cs b/source/WindowsFormsApplication1/Apps/File Skimmer.cs
index 4ee8531..ab01f11 100644
--- a/source/WindowsFormsApplication1/Apps/File Skimmer.cs
+++ b/source/WindowsFormsApplication1/Apps/File Skimmer.cs
@@ -7,7 +7,8 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
-using System.Windows.Forms;
+using Newtonsoft.Json;
+using ShiftUI;
namespace ShiftOS
{
@@ -128,8 +129,16 @@ namespace ShiftOS
/// </summary>
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
/// <returns>The File ID.</returns>
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";
}