aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/AppearanceManager.cs
diff options
context:
space:
mode:
authorwilliam341 <[email protected]>2017-06-18 16:43:30 -0700
committerGitHub <[email protected]>2017-06-18 16:43:30 -0700
commitba80dcf3f80018cbb041b62ad8a40268427d1311 (patch)
treef0bd18b2355d34c07c744c3cd82a4725a799eecd /ShiftOS_TheReturn/AppearanceManager.cs
parent771c20cfb3a703e0f1550fdcf9eb07b78298c944 (diff)
parent12acff8742f4c64976bfabee1b70dc515190fc7c (diff)
downloadshiftos_thereturn-ba80dcf3f80018cbb041b62ad8a40268427d1311.tar.gz
shiftos_thereturn-ba80dcf3f80018cbb041b62ad8a40268427d1311.tar.bz2
shiftos_thereturn-ba80dcf3f80018cbb041b62ad8a40268427d1311.zip
Merge pull request #2 from shiftos-game/master
wew
Diffstat (limited to 'ShiftOS_TheReturn/AppearanceManager.cs')
-rw-r--r--ShiftOS_TheReturn/AppearanceManager.cs23
1 files changed, 3 insertions, 20 deletions
diff --git a/ShiftOS_TheReturn/AppearanceManager.cs b/ShiftOS_TheReturn/AppearanceManager.cs
index 7cf06c9..47aa5fb 100644
--- a/ShiftOS_TheReturn/AppearanceManager.cs
+++ b/ShiftOS_TheReturn/AppearanceManager.cs
@@ -58,25 +58,7 @@ namespace ShiftOS.Engine
//HEY LETS FIND THE WINDOWS
public static IEnumerable<Type> GetAllWindowTypes()
{
- List<Type> types = new List<Type>();
- foreach(var file in System.IO.Directory.GetFiles(Environment.CurrentDirectory))
- {
- // hey if a thing is an exe or a dll show up plz kthx
- if(file.EndsWith(".exe") || file.EndsWith(".dll"))
- {
- try
- {
- var asm = Assembly.LoadFile(file);
- foreach(var type in asm.GetTypes())
- {
- if (type.GetInterfaces().Contains(typeof(IShiftOSWindow)))
- types.Add(type);
- }
- }
- catch { }
- }
- }
- return types;
+ return Array.FindAll(ReflectMan.Types, t => t.GetInterfaces().Contains(typeof(IShiftOSWindow)));
}
// hey you know that window we just made appear? well give it its title
@@ -126,6 +108,7 @@ namespace ShiftOS.Engine
}
+
// Provides a list of all open ShiftOS windows.
public static List<IWindowBorder> OpenForms = new List<IWindowBorder>();
@@ -183,7 +166,7 @@ namespace ShiftOS.Engine
public static event EmptyEventHandler OnExit;
// Starts the engine's exit routine, firing the OnExit event.
- internal static void Exit()
+ public static void Exit()
{
OnExit?.Invoke();
//disconnect from MUD