Example #1
0
        private static void Run(string[] args)
        {
            var context = new ModuleInitializationContextInternal(args);
            var modules = ModuleLoader.LoadModules(context);

            ShowWindow(modules, context);
        }
Example #2
0
 private static int Main(string[] args)
 {
     try {
         var context = new ModuleInitializationContextInternal(args);
         var modules = ModuleLoader.LoadModules(context);
         ShowWindow(modules, context);
         return(0);
     } catch (Exception e) {
         MessageBox.Show(e.Message, LanguageData.Current.MainWindow_OFD_Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
         return(e.HResult);
     }
 }
Example #3
0
        public void LauncherInternalTest()
        {
#if DEBUG
            var context = new ModuleInitializationContextInternal(Array.Empty <string>());

            Assert.IsNotNull(context.Arguments);
            Assert.AreEqual(Array.Empty <string>(), context.Arguments);
            Assert.AreEqual(0, context.Arguments.Length);
            Assert.IsNull(context.TransformerPipeline);
            Assert.IsNull(context.LogFilesToOpen);
            Assert.IsFalse(context.AllowEscape);
            Assert.IsFalse(context.DisallowExtensions);

            context.ParseArguments();
            Assert.IsNotNull(context.LogFilesToOpen);
#else
            Console.WriteLine(nameof(LauncherInternalTest) + " is only supported in the debug build.");
#endif
        }