Ejemplo n.º 1
0
        private static void Main(string[] args)
        {
            //fixes wrong screensize for screen share
            if (Environment.OSVersion.Version.Major >= 6)
            {
                SetProcessDPIAware();
            }

            if (!Directory.Exists(AppEnvironment.DataPath))
            {
                Directory.CreateDirectory(AppEnvironment.DataPath);
            }

            if (!Debugger.IsAttached)
            {
                ExceptionHandler.AddGlobalHandlers();
            }


            Console.WriteLine("Exception Handlers attached");


            Settings.Initialize("Config.json");

            Console.Title = Resources.Program_Title;
            Tools.ConfigureServer();
            var useTerminal  = Convert.ToBoolean(Settings.Get("Terminal").AllowTerminal);
            var usePlugins   = Convert.ToBoolean(Settings.Get("Plugins").LoadPlugins);
            var useWebServer = Convert.ToBoolean(Settings.Get("WebServer").UseWebServer);

            WebCamManager.LoadWebcams();
            if (usePlugins)
            {
                PluginHandler.LoadPlugins();
            }
            if (useWebServer)
            {
                HttpServer.Setup();
            }
            var systemUtilities = new SystemUtilities();

            systemUtilities.Start();
            //Keep down here if you actually want a functional program
            TaskManagerServer.Start();
            if (useTerminal)
            {
                TerminalManagerServer.Start();
            }
            Console.ReadLine();
        }
Ejemplo n.º 2
0
        private static void ConsoleMain(string[] args)
        {
            Console.WriteLine("Command line = {0}", Environment.CommandLine);
            for (var ix = 0; ix < args.Length; ++ix)
                Console.WriteLine("Argument{0} = {1}", ix + 1, args[ix]);
            WebCamManager.LoadWebcams();
            PluginManager.LoadPlugins();
            Tools.GenerateSettings();
            HttpServer.Setup();
            var systemUtilities = new SystemUtilities();
            systemUtilities.Start();

            //Keep down here if you actually want a functional program
            TaskManagerServer.Start();
            TerminalManagerServer.Start();
            Console.ReadLine();
        }