コード例 #1
0
ファイル: HubMain.cs プロジェクト: polytronicgr/MultiCapture
        /// <summary>
        /// Main runtime loop used to collect and send data off too the computer
        /// </summary>
        private void Start()
        {
            ThreadManager manager = new ThreadManager(SaveContainer.Load());

            Logger.Logger logs = new Logger.Logger();
            logs.RemoveOldLogs(DateTime.Today.AddMonths(-1));

            string command = "";

            while ((command = Console.ReadLine()) != "e")
            {
                if (command == "t")
                {
                    manager.CaptureImageSet(CameraRequest.SendTestImage);
                }
                else if (command == "s")
                {
                    Console.WriteLine(manager.SavePath);
                    Console.Write("new save path: ");
                    manager.SavePath = Console.ReadLine();
                }
                else
                {
                    manager.CaptureImageSet();
                }
            }
            Console.WriteLine("Quitting");
        }
コード例 #2
0
        public static int Main(string[] args)
        {
            Logger.Logger log = new Logger.Logger();
            log.RemoveOldLogs(DateTime.Today.AddMonths(-1));

            Console.WriteLine("Starting");
            try
            {
                CameraSettings.Init();
                Listener listen = new Listener();
                listen.StartListening();
            }
            catch (Exception e)
            {
                Console.WriteLine("CRITICAL EXCEPTION SHUTING DOWN!!!");
                Console.WriteLine(e);
            }
            return(0);
        }