示例#1
0
 public DefaultController(IDriveAccountService siteService, IDriveService driveService, SettingService setting, ILogger <DefaultController> logger)
 {
     this.siteService  = siteService;
     this.driveService = driveService;
     this.setting      = setting;
     this.logger       = logger;
 }
        public DistanceMeasurementWorker(ILogger <DistanceMeasurementWorker> logger,
                                         IDistanceSensorDriver distanceSensor,
                                         IDriveServiceFactory driverServiceFactory)
        {
            this.logger         = logger;
            this.distanceSensor = distanceSensor;

            driveService = driverServiceFactory.GetDriveService();
        }
示例#3
0
 protected TrashCanServiceBase(
     IDriveService driveService,
     IOperationsService operationsService,
     IPathService pathService)
 {
     _driveService      = driveService;
     _operationsService = operationsService;
     _pathService       = pathService;
 }
示例#4
0
 public MacTrashCanService(
     IDriveService driveService,
     IOperationsService operationsService,
     IPathService pathService,
     IFileService fileService,
     IEnvironmentService environmentService)
     : base(driveService, operationsService, pathService, fileService)
 {
     _pathService        = pathService;
     _fileService        = fileService;
     _environmentService = environmentService;
 }
        public MainWindow(IDriveService driveService,
                          IFileSystemService fileSystemService,
                          IStatisticsService statisticsService)
        {
            InitializeComponent();
            this.driveService      = driveService;
            this.fileSystemService = fileSystemService;
            this.statisticsService = statisticsService;

            DataContext = this;
            DriveInfos  = new ObservableCollection <DriveInfo>();
            driveService.StartWatcher(SynchronizationContext.Current, DriveInfos);
        }
示例#6
0
        public DrivesListViewModel(
            IDriveService driveService,
            IDriveViewModelFactory driveViewModelFactory,
            IApplicationDispatcher applicationDispatcher)
        {
            _driveService          = driveService;
            _driveViewModelFactory = driveViewModelFactory;
            _applicationDispatcher = applicationDispatcher;
            _drives = new ObservableCollection <IDriveViewModel>();

            SubscribeToEvents();
            ReloadDrives();
        }
示例#7
0
 public LinuxTrashCanService(
     IDriveService driveService,
     IOperationsService operationsService,
     IPathService pathService,
     IFileService fileService,
     IEnvironmentService environmentService,
     IDirectoryService directoryService)
     : base(driveService, operationsService, pathService, fileService)
 {
     _pathService        = pathService;
     _fileService        = fileService;
     _environmentService = environmentService;
     _directoryService   = directoryService;
 }
        /// <summary>
        /// Selects the media type and displays the appropriate screen.
        /// </summary>
        /// <param name="type">The media type that will be used for this backup.</param>
        /// <param name="service">The drive service that will do the processing.</param>
        public void SelectMediaType(MediaType type, IDriveService service)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service");
            }

            this.mediaType = type;

            this.driveService                 = service;
            this.driveService.ImageReader     = this.imageReader;
            this.driveService.ReportProgress += this.DriveService_ReportProgress;

            this.RefreshDrives();
        }
示例#9
0
        public WindowsTrashCanService(
            IDriveService driveService,
            IOperationsService operationsService,
            IPathService pathService,
            IFileService fileService,
            IEnvironmentService environmentService,
            string sid)
            : base(driveService, operationsService, pathService)
        {
            _pathService        = pathService;
            _fileService        = fileService;
            _environmentService = environmentService;
            _sid = sid;

            _random = new Random();
        }
示例#10
0
 public MacTrashCanService(
     IDriveService driveService,
     IOperationsService operationsService,
     IPathService pathService,
     IFileService fileService,
     IEnvironmentService environmentService,
     IDirectoryService directoryService,
     IHomeDirectoryProvider homeDirectoryProvider)
     : base(driveService, operationsService, pathService)
 {
     _pathService           = pathService;
     _fileService           = fileService;
     _environmentService    = environmentService;
     _directoryService      = directoryService;
     _homeDirectoryProvider = homeDirectoryProvider;
 }
示例#11
0
        public WindowsTrashCanService(
            IDriveService driveService,
            IOperationsService operationsService,
            IPathService pathService,
            IFileService fileService,
            IEnvironmentService environmentService,
            IProcessService processService)
            : base(driveService, operationsService, pathService, fileService)
        {
            _pathService        = pathService;
            _fileService        = fileService;
            _environmentService = environmentService;

            _random = new Random();

            InitializeAsync(processService).Forget();
        }
 public DriveController(IConfiguration configuration, UserManager <ApplicationUser> userManager,
                        IDriveService driveService, IUrlService urlService, IMapper mapper,
                        IRepository <Drive> drivesRepository, IRepository <Driver> driversRepository, IRepository <Customer> customersRepository,
                        IRepository <DriveRequest> requestsRepository,
                        CarGoSimulatorDBContext context)
 {
     this.configuration       = configuration;
     this.userManager         = userManager;
     this.driveService        = driveService;
     this.urlService          = urlService;
     this.mapper              = mapper;
     this.drivesRepository    = drivesRepository;
     this.driversRepository   = driversRepository;
     this.customersRepository = customersRepository;
     this.requestsRepository  = requestsRepository;
     this.context             = context;
 }
示例#13
0
 public LinuxTrashCanService(
     IDriveService driveService,
     IOperationsService operationsService,
     IPathService pathService,
     IFileService fileService,
     IEnvironmentService environmentService,
     IDirectoryService directoryService,
     IDateTimeProvider dateTimeProvider,
     ILinuxRemovedFileMetadataBuilderFactory removedFileMetadataBuilderFactory)
     : base(driveService, operationsService, pathService)
 {
     _pathService        = pathService;
     _fileService        = fileService;
     _environmentService = environmentService;
     _directoryService   = directoryService;
     _dateTimeProvider   = dateTimeProvider;
     _removedFileMetadataBuilderFactory = removedFileMetadataBuilderFactory;
 }
示例#14
0
        public WindowsTrashCanService(
            IDriveService driveService,
            IOperationsService operationsService,
            IPathService pathService,
            IFileService fileService,
            IDateTimeProvider dateTimeProvider,
            IProcessService processService,
            IWindowsRemovedFileMetadataBuilderFactory removedFileMetadataBuilderFactory,
            IWindowsTrashCanNodeNameGenerator trashCanNodeNameGenerator)
            : base(driveService, operationsService, pathService)
        {
            _pathService      = pathService;
            _fileService      = fileService;
            _dateTimeProvider = dateTimeProvider;
            _removedFileMetadataBuilderFactory = removedFileMetadataBuilderFactory;
            _trashCanNodeNameGenerator         = trashCanNodeNameGenerator;

            InitializeAsync(processService).Forget();
        }
        public TrashCanServiceFactory(
            IPlatformService platformService,
            IDriveService driveService,
            IOperationsService operationsService,
            IEnvironmentService environmentService,
            IPathService pathService,
            IFileService fileService,
            IProcessService processService,
            IDirectoryService directoryService)
        {
            _platformService    = platformService;
            _driveService       = driveService;
            _operationsService  = operationsService;
            _environmentService = environmentService;
            _pathService        = pathService;
            _fileService        = fileService;
            _processService     = processService;
            _directoryService   = directoryService;

            InitializeAsync().Forget();
        }
示例#16
0
 public FileWatcher(ILoggerFactory loggerFactory, IConfiguration configuration, IDriveService driveService)
 {
     _logger            = loggerFactory.CreateLogger(typeof(FileWatcher));
     _fileSystemWatcher = new FileSystemWatcher(configuration["FilePath"]);
     _driveService      = driveService;
 }
示例#17
0
 /// <summary>
 /// construcktor
 /// </summary>
 public FileSystemController() : base()
 {
     DirectoryService = UnityDI.DiContainer.Resolve <IDirectoryService>();
     FileService      = UnityDI.DiContainer.Resolve <IFileService>();
     DriveService     = UnityDI.DiContainer.Resolve <IDriveService>();
 }
示例#18
0
        public DiscMenuViewModel(IDriveService driveService)
        {
            _driveService = driveService;

            Messenger.Default.Register <EventMessage>(this, true, OnEventMessage);
        }
示例#19
0
		public MainViewModel()
		{
			long affinity = (long)Process.GetCurrentProcess().ProcessorAffinity;

			Ioc.Container.Register(() => this);

			this.outputPathVM = Ioc.Container.GetInstance<OutputPathViewModel>();
			this.processingVM = Ioc.Container.GetInstance<ProcessingViewModel>();
			this.presetsVM = Ioc.Container.GetInstance<PresetsViewModel>();
			this.windowManagerVM = Ioc.Container.GetInstance<WindowManagerViewModel>();

			updater.CheckUpdates();

			this.JobCreationAvailable = false;

			this.sourceOptions = new ObservableCollection<SourceOptionViewModel>
			{
				new SourceOptionViewModel(new SourceOption { Type = SourceType.File }),
				new SourceOptionViewModel(new SourceOption { Type = SourceType.VideoFolder })
			};

			this.rangeTypeChoices = new List<ComboChoice<VideoRangeType>>
				{
					new ComboChoice<VideoRangeType>(VideoRangeType.Chapters, EnumsRes.VideoRangeType_Chapters),
					new ComboChoice<VideoRangeType>(VideoRangeType.Seconds, EnumsRes.VideoRangeType_Seconds),
					new ComboChoice<VideoRangeType>(VideoRangeType.Frames, EnumsRes.VideoRangeType_Frames),
				};

			this.recentSourceOptions = new ObservableCollection<SourceOptionViewModel>();
			this.RefreshRecentSourceOptions();

			this.useDefaultChapterNames = true;

			this.driveService = Ioc.Container.GetInstance<IDriveService>();

			this.DriveCollection = this.driveService.GetDiscInformation();

			this.audioChoices = new ObservableCollection<AudioChoiceViewModel>();
			this.audioChoices.CollectionChanged += (o, e) => { Messenger.Default.Send(new AudioInputChangedMessage()); };

			Messenger.Default.Register<SelectedTitleChangedMessage>(
				this,
				message =>
					{
						DispatchService.BeginInvoke(() => { this.AddTrackCommand.RaiseCanExecuteChanged(); });
					});

			Messenger.Default.Register<HighlightedChapterChangedMessage>(
				this,
				message =>
					{
						this.RefreshRangePreview();
					});

			Messenger.Default.Register<ProgressChangedMessage>(
				this,
				message =>
					{
						this.RaisePropertyChanged(() => this.WindowTitle);
					});

			Messenger.Default.Register<RangeFocusMessage>(this, this.OnRangeControlGotFocus);
		}
示例#20
0
 public FileService(IDriveService driveService)
 {
     _driveService = driveService;
 }
示例#21
0
        public DriveService(ISiteSaverBehavior behavior)
        {
            _baseSiteSaverBehavior = new BaseSiteSaverBehavior(behavior);

            _service = new DAL.DriveService();
        }
 public Downloader(IDriveService driveService, IFileSystem fileSystem)
 {
     DriveService = driveService;
     FileSystem = fileSystem;
 }
 public PermissionController(IDriveService iDriveService)
 {
     _iDriveService = iDriveService;
 }
示例#24
0
        /// <summary>
        /// Selects the media type and displays the appropriate screen.
        /// </summary>
        /// <param name="type">The media type that will be used for this backup.</param>
        /// <param name="service">The drive service that will do the processing.</param>
        public void SelectMediaType(MediaType type, IDriveService service)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service");
            }

            this.mediaType = type;

            this.driveService = service;
            this.driveService.ImageReader = this.imageReader;
            this.driveService.ReportProgress += this.DriveService_ReportProgress;

            this.RefreshDrives();
        }
 public DriveFileController(IDriveService iDriveService)
 {
     _iDriveService = iDriveService;
 }
 public void Download(IDriveService driveService, IFileBase file, Stream output)
 {
     driveService.Files.Export(file.Id, TargetMimeType(file)).Download(output);
 }
示例#27
0
 public FolderTreeController(IDriveService driveService, IDirectoryService directoryService, IFileService fileService)
 {
     this.directoryService = directoryService;
     this.driveService     = driveService;
     this.fileService      = fileService;
 }
示例#28
0
 public DriveController(IDriveService driveService)
 {
     this.driveService = driveService;
 }
示例#29
0
        private void TestForm_Load(object sender, EventArgs e)
        {
            try
              {
            progressBar.Visible = true;

            _driveService = DriveServiceFactory.CreateService();
              }
              catch (Exception exception)
              {
            MessageBox.Show(this, exception.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
              }
        }
示例#30
0
 public DriveServiceManager()
 {
     DriveService = DependencyService.Get <IDriveService>();
 }
 public DriveFolderController(IDriveService iDriveService)
 {
     _iDriveService = iDriveService;
 }
示例#32
0
 public Walker(IDriveService driveService)
 {
     _driveService = driveService;
 }
示例#33
0
 public SitesController(IDriveAccountService siteService, IDriveService driveService, SettingService setting)
 {
     this._siteService  = siteService;
     this._driveService = driveService;
     this._setting      = setting;
 }
 public CheckFileAccessHealthCheckService(IConfigurationService configurationService, IFileService fileService, IDriveService driveService)
 {
     this.configurationService = configurationService;
     this.fileService          = fileService;
     this._driveService        = driveService;
 }