diff --git a/CSharp/Applications/UniversalEditor.Bootstrapper/Program.cs b/CSharp/Applications/UniversalEditor.Bootstrapper/Program.cs index 3867e80d..49ca6f70 100644 --- a/CSharp/Applications/UniversalEditor.Bootstrapper/Program.cs +++ b/CSharp/Applications/UniversalEditor.Bootstrapper/Program.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Reflection; using System.Windows.Forms; using UniversalEditor.UserInterface; diff --git a/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/App.config b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/App.config new file mode 100644 index 00000000..e208f424 --- /dev/null +++ b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/App.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/Program.cs b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/Program.cs new file mode 100644 index 00000000..b50e5341 --- /dev/null +++ b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/Program.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using UniversalEditor.UserInterface; + +namespace UniversalEditor.ConsoleBootstrapper +{ + class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + string directory = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + string[] libraries = System.IO.Directory.GetFiles(directory, "*.dll"); + List engines = new List(); + foreach (string library in libraries) + { + try + { + Assembly assembly = Assembly.LoadFile(library); + Type[] types = null; + try + { + types = assembly.GetTypes(); + } + catch (ReflectionTypeLoadException ex) + { + types = ex.Types; + } + if (types == null) + { + continue; + } + + foreach (Type type in types) + { + if (type.IsSubclassOf(typeof(Engine))) + { + Engine engine = (Engine)type.Assembly.CreateInstance(type.FullName); + engines.Add(engine); + } + } + } + catch + { + + } + } + + if (engines.Count < 1) + { + ConsoleColor oldcolor = Console.ForegroundColor; + Console.ForegroundColor = ConsoleColor.Red; + Console.WriteLine("ERROR: No engines are available to launch this application."); + Console.ForegroundColor = oldcolor; + + Pause(); + return; + } + else if (engines.Count == 1) + { + engines[0].StartApplication(); + } + else + { + engines[0].StartApplication(); + } + } + + private static void Pause() + { + Console.Write("Press any key to continue . . . "); + Console.ReadKey(true); + } + } +} diff --git a/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/Properties/AssemblyInfo.cs b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..ed342335 --- /dev/null +++ b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("UniversalEditor.ConsoleBootstrapper")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("City of Orlando")] +[assembly: AssemblyProduct("UniversalEditor.ConsoleBootstrapper")] +[assembly: AssemblyCopyright("Copyright © City of Orlando 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("78501f14-ac94-478c-913c-b325e8d5f438")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/UniversalEditor.ConsoleBootstrapper.csproj b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/UniversalEditor.ConsoleBootstrapper.csproj new file mode 100644 index 00000000..a59cddaf --- /dev/null +++ b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/UniversalEditor.ConsoleBootstrapper.csproj @@ -0,0 +1,70 @@ + + + + + Debug + AnyCPU + {62CFC025-B8CF-42AA-880A-92F27377FCAF} + Exe + Properties + UniversalEditor.ConsoleBootstrapper + UniversalEditorConsole + v3.5 + 512 + + + AnyCPU + true + full + false + ..\..\Output\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + ..\..\Output\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + {2d4737e6-6d95-408a-90db-8dff38147e85} + UniversalEditor.Core + + + {8622ebc4-8e20-476e-b284-33d472081f5c} + UniversalEditor.UserInterface + + + {30467e5c-05bc-4856-aadc-13906ef4cadd} + UniversalEditor.Essential + + + + + \ No newline at end of file diff --git a/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/console.ico b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/console.ico new file mode 100644 index 00000000..b557fa77 Binary files /dev/null and b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/console.ico differ diff --git a/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/console.png b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/console.png new file mode 100644 index 00000000..de173f18 Binary files /dev/null and b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/console.png differ diff --git a/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/metro-mainicon.ico b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/metro-mainicon.ico new file mode 100644 index 00000000..ac002299 Binary files /dev/null and b/CSharp/Applications/UniversalEditor.ConsoleBootstrapper/metro-mainicon.ico differ diff --git a/CSharp/UniversalEditor.sln b/CSharp/UniversalEditor.sln index e6f5a599..8f5f5795 100644 --- a/CSharp/UniversalEditor.sln +++ b/CSharp/UniversalEditor.sln @@ -63,6 +63,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.New EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.Abomination", "Plugins\UniversalEditor.Plugins.Abomination\UniversalEditor.Plugins.Abomination.csproj", "{D4D9C9A6-04A4-46AD-8238-2493A455723F}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.ConsoleBootstrapper", "Applications\UniversalEditor.ConsoleBootstrapper\UniversalEditor.ConsoleBootstrapper.csproj", "{62CFC025-B8CF-42AA-880A-92F27377FCAF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -199,6 +201,12 @@ Global {D4D9C9A6-04A4-46AD-8238-2493A455723F}.Release|Any CPU.ActiveCfg = Release|Any CPU {D4D9C9A6-04A4-46AD-8238-2493A455723F}.Release|Any CPU.Build.0 = Release|Any CPU {D4D9C9A6-04A4-46AD-8238-2493A455723F}.Release|x86.ActiveCfg = Release|Any CPU + {62CFC025-B8CF-42AA-880A-92F27377FCAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62CFC025-B8CF-42AA-880A-92F27377FCAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62CFC025-B8CF-42AA-880A-92F27377FCAF}.Debug|x86.ActiveCfg = Debug|Any CPU + {62CFC025-B8CF-42AA-880A-92F27377FCAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62CFC025-B8CF-42AA-880A-92F27377FCAF}.Release|Any CPU.Build.0 = Release|Any CPU + {62CFC025-B8CF-42AA-880A-92F27377FCAF}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -209,6 +217,7 @@ Global {8622EBC4-8E20-476E-B284-33D472081F5C} = {15D19291-4200-4C30-A68A-0191B6F83BE1} {BAC9FDFD-C39E-4A90-B9F8-CF75B551BE10} = {A935623A-E98E-43FF-BBE2-DAA61A587345} {6F0AB1AF-E1A1-4D19-B19C-05BBB15C94B2} = {A935623A-E98E-43FF-BBE2-DAA61A587345} + {62CFC025-B8CF-42AA-880A-92F27377FCAF} = {A935623A-E98E-43FF-BBE2-DAA61A587345} {30467E5C-05BC-4856-AADC-13906EF4CADD} = {71CFF024-26F7-4626-A526-B435FDF8D64E} {7CA0A889-C1A1-4CEB-AA54-43A640B41C6C} = {71CFF024-26F7-4626-A526-B435FDF8D64E} {BE4D0BA3-0888-42A5-9C09-FC308A4509D2} = {71CFF024-26F7-4626-A526-B435FDF8D64E}