public static void Main(string[] args)
        {
            try
            {
                BifurcationForm.m_sModuleName = "Bifurcation";
                m_oForm       = new BifurcationForm();
                updateService = new FrontendService();
                object oFrontendObject = updateService;

                var oFrontendModule = new ModuleImplementation(BifurcationForm.m_sModuleName, "Bifurcation Frontend",
                                                               LowLevel.ModuleManagementType.UniqueModule,
                                                               "this module implements a frontend for the bifurcation discovery module");
                oFrontendModule.addService("update", "Bifurcation Discovery Tool", "Analysis",
                                           "implementation of the update function that will be called by the bifurcation module",
                                           ref oFrontendObject);
                oFrontendModule.EnableServices(args);

                oFrontendModule.ModuleShutdown += oFrontendModule_ModuleShutdown;
                Application.EnableVisualStyles();
                Application.DoEvents();
                Application.Run(m_oForm);
            }
            catch (SBWException)
            {
                MessageBox.Show(
                    "An exception occured while trying to register the module. The only possible explenation would be an outdated SBW DLL.",
                    "Error druning module initialization");
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Error druning module initialization");
            }
        }
Пример #2
0
        private static void Main(string[] args)
        {
            CultureInfo culture = CultureInfo.CreateSpecificCulture("en");

            culture.NumberFormat.NumberDecimalSeparator = ".";
            Thread.CurrentThread.CurrentCulture         = culture;

            //Application.SetCompatibleTextRenderingDefault(false);
            Application.EnableVisualStyles();
            Application.DoEvents();


            MainForm newForm1 = MainForm.Instance;
            object   oBox     = newForm1;

            var oImpl = new ModuleImplementation(
                "AutoCSharp", "Auto CSharp", LowLevel.ModuleManagementType.UniqueModule,
                "Direct Interface to AUTO2000 with C# frontend");

            oImpl.addService("auto", "Auto2000 (C#)", "/Analysis", "Direct Interface to AUTO2000 with C# frontend",
                             ref oBox);
            oImpl.EnableServices(args);
            MainForm.IsSBWAvailable = true;
            Application.Run(newForm1);
        }
Пример #3
0
        static void Main(string[] args)
        {
            string fileName = null;
              foreach (string arg in args)
              {
            if (arg == "-r" || arg == "--run-test")
            {
              RunTest(args);
              return;
            }
            if (File.Exists(arg))
              fileName = arg;

              }

              var culture = System.Globalization.CultureInfo.CreateSpecificCulture("en");
              culture.NumberFormat.NumberDecimalSeparator = ".";
              Thread.CurrentThread.CurrentCulture = culture;
              try
              {
            Application.CurrentCulture = culture;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            formInstance = new MainForm();
            object instance = formInstance;

            var module = new ModuleImplementation(
            "FluxBalance", "Flux Balance Analsysis", LowLevel.ModuleManagementType.UniqueModule,
            "Module performing Flux Balance Analysis on SBML Models");
            module.addService("analysis", "Flux Balance Analysis", "/Analysis", "Module performing Flux Balance Analysis on SBML Models", ref instance);

            module.ModuleShutdown += module_ModuleShutdown;

            module.EnableServices(args);

            if (fileName != null)
              formInstance.LoadSBMLFile(fileName);

            Application.Run(formInstance);
              }
              catch (Exception e)
              {
            Console.WriteLine(e);
              }
        }
Пример #4
0
        private static void Main(string[] args)
        {
            CultureInfo culture = CultureInfo.CreateSpecificCulture("en");
            culture.NumberFormat.NumberDecimalSeparator = ".";
            Thread.CurrentThread.CurrentCulture = culture;

            //Application.SetCompatibleTextRenderingDefault(false);
            Application.EnableVisualStyles();
            Application.DoEvents();

            MainForm newForm1 = MainForm.Instance;
            object oBox = newForm1;

            var oImpl = new ModuleImplementation(
                "AutoCSharp", "Auto CSharp", LowLevel.ModuleManagementType.UniqueModule,
                "Direct Interface to AUTO2000 with C# frontend");
            oImpl.addService("auto", "Auto2000 (C#)", "/Analysis", "Direct Interface to AUTO2000 with C# frontend",
                             ref oBox);
            oImpl.EnableServices(args);
            MainForm.IsSBWAvailable = true;
            Application.Run(newForm1);
        }