From a0ee79dbcd26a8f07d493a7e993cbaf0d02e44db Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Jul 2017 14:34:59 -0400 Subject: Hacking, barebones fskimmer, double clicking --- ShiftOS_TheReturn/FileSkimmerBackend.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'ShiftOS_TheReturn/FileSkimmerBackend.cs') diff --git a/ShiftOS_TheReturn/FileSkimmerBackend.cs b/ShiftOS_TheReturn/FileSkimmerBackend.cs index ac20d34..b14733f 100644 --- a/ShiftOS_TheReturn/FileSkimmerBackend.cs +++ b/ShiftOS_TheReturn/FileSkimmerBackend.cs @@ -44,7 +44,8 @@ namespace ShiftOS.Engine /// Opens a file from the specified ShiftFS path. /// /// The path to open. - public static void OpenFile(string path) + /// Whether or not the file could be opened. + public static bool OpenFile(string path) { if (!Objects.ShiftFS.Utils.FileExists(path)) throw new System.IO.FileNotFoundException("ShiftFS could not find the file specified.", path); @@ -56,9 +57,11 @@ namespace ShiftOS.Engine { var obj = (IFileHandler)Activator.CreateInstance(type); obj.OpenFile(path); + return true; } } } + return false; } public static FileType GetFileType(string path) { @@ -137,11 +140,6 @@ namespace ShiftOS.Engine _fs = fs; } - public static System.Drawing.Image GetImage(string filepath) - { - return _fs.GetImage(filepath); - } - public static string GetFileExtension(FileType fileType) { return _fs.GetFileExtension(fileType); @@ -153,10 +151,8 @@ namespace ShiftOS.Engine /// public interface IFileSkimmer { - void OpenFile(string filepath); void GetPath(string[] filetypes, FileOpenerStyle style, Action callback); void OpenDirectory(string path); - Image GetImage(string path); string GetFileExtension(FileType fileType); } -- cgit v1.2.3