diff options
Diffstat (limited to 'TimeHACK.Main/Program.cs')
| -rw-r--r-- | TimeHACK.Main/Program.cs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/TimeHACK.Main/Program.cs b/TimeHACK.Main/Program.cs index 1b89e53..a7d4d31 100644 --- a/TimeHACK.Main/Program.cs +++ b/TimeHACK.Main/Program.cs @@ -10,7 +10,8 @@ using Newtonsoft.Json; using TimeHACK.OS; using TimeHACK.OS.Win95; using TimeHACK.OS.Win95.Win95Apps; - +using TimeHACK.Engine; +using TimeHACK.Engine.Template; namespace TimeHACK { @@ -21,6 +22,8 @@ namespace TimeHACK internal static TitleScreen title = null; public static string AddressBookSelectedFolderName; public static AddressBookContact AddressBookSelectedContact; + public static string WindowsExplorerReturnPath; + static WindowManager wm = new WindowManager(); /// <summary> /// The main entry point for the application. @@ -72,5 +75,24 @@ namespace TimeHACK Application.SetCompatibleTextRenderingDefault(false); Application.Run(title = new TitleScreen()); } + + public static String OpenFileExplorerAsDialogAndReturnGivenPath() + { + WinClassicWindowsExplorer we = new WinClassicWindowsExplorer(); + WinClassic app = wm.startWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true); + TitleScreen.frm95.AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); + + TitleScreen.frm95.nonimportantapps.Add(app); + TitleScreen.frm95.nonimportantapps[TitleScreen.frm95.nonimportantapps.Count - 1].BringToFront(); + TitleScreen.frm95.nonimportantapps[TitleScreen.frm95.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(TitleScreen.frm95.NonImportantApp_Closing); + + app.BringToFront(); + try + { + return WindowsExplorerReturnPath; + } catch { + return ""; + } + } } } |
