예제 #1
0
        private static void WelcomeMenu()
        {
            Console.WriteLine("Hello choose function:\n"
                              + "Press 1 - Monitoring Mode\n"
                              + "Press 2 - Restoring Mode\n"
                              + "Press q(Q) - for exit application\n"
                              );

            var input = Console.ReadKey();

            switch (input.Key)
            {
            case ConsoleKey.D1:
                Console.WriteLine("\nMonitoring Mode\n");
                Listener.RunListen(Folders.Storage, "*.txt", Helpers.FilesChangeEvent);
                break;

            case ConsoleKey.D2:
                Console.WriteLine("\nRestoring Mode\n Write restore date. Date format = dd.MM.yyyy HH:m\n");
                RollBack.RoolBackChange(Helpers.DateParse(Console.ReadLine()));
                Console.WriteLine("\nRestored successfull");
                Console.ReadKey();
                break;

            case ConsoleKey.Q:
                Console.WriteLine("\nApplication closed...");
                Console.ReadKey();
                return;
            }
        }
예제 #2
0
 private void OnRollBack(RollBack R)
 {
     if (GameManager.levelState == LevelState.Play && ChangeInfoList.Count > 0)
     {
         StartCoroutine(RollBack());
     }
 }