Beispiel #1
0
 public void ScanDisc()
 {
     VerifyAccess();
     if (this.scanService.IsScanning)
     {
         scanService.Stop();
     }
     if (SourceDrive != null && SourceDrive.IsReady)
     {
         scanService.Scan(Path.Combine(SourceDrive.RootDirectory.FullName, "VIDEO_TS"), 0, 0);
     }
 }
Beispiel #2
0
        private static void RunFromConsole()
        {
            ConsoleManager.Show();

            var service = new ScanService(Settings.Default.Port);

            try
            {
                service.Start();
                Console.WriteLine("Press any key to stop service");
                Console.ReadKey();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            finally
            {
                service.Stop();
            }
        }