aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs
diff options
context:
space:
mode:
authorMichael VanOverbeek <[email protected]>2017-06-11 11:57:31 +0000
committerGitHub <[email protected]>2017-06-11 11:57:31 +0000
commit997a81457ebb6d6523c36ca552cee143e0d92244 (patch)
treeda98985ced112b6d238811f3ca770014d67e34fc /ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs
parent0d75f701778a0900a58343c4c80c124279bc231f (diff)
parent107a98686a105468b5f200ebcbd27343c1210ce4 (diff)
downloadshiftos_thereturn-997a81457ebb6d6523c36ca552cee143e0d92244.tar.gz
shiftos_thereturn-997a81457ebb6d6523c36ca552cee143e0d92244.tar.bz2
shiftos_thereturn-997a81457ebb6d6523c36ca552cee143e0d92244.zip
Merge pull request #129 from RogueAI42/master
ReflectMan Saves The Day..............
Diffstat (limited to 'ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs')
-rw-r--r--ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs30
1 files changed, 9 insertions, 21 deletions
diff --git a/ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs b/ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs
index c7830d0..c9b6f64 100644
--- a/ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs
+++ b/ShiftOS.WinForms/ShiftnetSites/AppscapeMain.cs
@@ -207,33 +207,21 @@ namespace ShiftOS.WinForms.ShiftnetSites
if (result == true)
{
SaveSystem.CurrentSave.Codepoints -= upg.Cost;
- foreach (var exe in Directory.GetFiles(Environment.CurrentDirectory))
+ foreach (var type in ReflectMan.Types)
{
- if (exe.EndsWith(".exe") || exe.EndsWith(".dll"))
+ var attrib = type.GetCustomAttributes(false).FirstOrDefault(x => x is AppscapeEntryAttribute) as AppscapeEntryAttribute;
+ if (attrib != null)
{
- try
+ if (attrib.Name == upg.Name)
{
- var asm = Assembly.LoadFile(exe);
- foreach (var type in asm.GetTypes())
- {
- var attrib = type.GetCustomAttributes(false).FirstOrDefault(x => x is AppscapeEntryAttribute) as AppscapeEntryAttribute;
- if (attrib != null)
- {
- if (attrib.Name == upg.Name)
- {
- var installer = new Applications.Installer();
- var installation = new AppscapeInstallation(upg.Name, attrib.DownloadSize, upg.ID);
- AppearanceManager.SetupWindow(installer);
- installer.InitiateInstall(installation);
- return;
- }
- }
- }
+ var installer = new Applications.Installer();
+ var installation = new AppscapeInstallation(upg.Name, attrib.DownloadSize, upg.ID);
+ AppearanceManager.SetupWindow(installer);
+ installer.InitiateInstall(installation);
+ return;
}
- catch { }
}
}
-
}
});
}