aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/AppearanceManager.cs
diff options
context:
space:
mode:
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