Exemple #1
0
 private Monitor(string homeDir, string courseId)
 {
     courseDir = Path.Combine(homeDir, courseId);
     server    = new PreviewHttpServer(courseDir, Path.Combine(homeDir, "html"), 1337);
     server.Start();
     StartWatchingCourseDir();
     Console.WriteLine($"Started monitoring {courseDir}");
     OpenInBrowser();
     while (true)
     {
         var key = Console.ReadKey(true).Key;
         if (key == ConsoleKey.Q)
         {
             break;
         }
         if (key == ConsoleKey.O)
         {
             OpenInBrowser();
         }
         if (key == ConsoleKey.R)
         {
             ReloadCourse();
         }
         else
         {
             Console.WriteLine(@"Press 'Q' to exit. Press 'O' to open course in browser");
         }
     }
 }
Exemple #2
0
		private Monitor(string homeDir, string courseId)
		{
			courseDir = Path.Combine(homeDir, courseId);
			server = new PreviewHttpServer(courseDir, Path.Combine(homeDir, "html"), 1337);
			server.Start();
			StartWatchingCourseDir();
			Console.WriteLine($"Started monitoring {courseDir}");
			OpenInBrowser();
			while (true)
			{
				var key = Console.ReadKey(true).Key;
				if (key == ConsoleKey.Q)
					break;
				if (key == ConsoleKey.O)
					OpenInBrowser();
				if (key == ConsoleKey.R)
					ReloadCourse();
				else
					Console.WriteLine(@"Press 'Q' to exit. Press 'O' to open course in browser");
			}
		}