示例#1
0
        public DuplicateConfigurationViewModel(Guid jobId)
        {
            _logger     = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
            _repository = (IJobRepository)Bootstrap.Instance.Services.GetService(typeof(IJobRepository));

            JobId = jobId;
        }
 public DuplicatesContentViewModel()
 {
     _logger                         = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
     _repository                     = (IDuplicatesRepository)Bootstrap.Instance.Services.GetService(typeof(IDuplicatesRepository));
     _duplicatesManager              = (IDuplicatesManager)Bootstrap.Instance.Services.GetService(typeof(IDuplicatesManager));
     _duplicatesManager.RefreshData += _duplicatesManager_RefreshData;
     _mainManager                    = (IMainManager)Bootstrap.Instance.Services.GetService(typeof(IMainManager));
 }
示例#3
0
        public MainWindowViewModel()
        {
            _logger      = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
            _mainManager = (IMainManager)Bootstrap.Instance.Services.GetService(typeof(IMainManager));
            _mainManager.StatusBarInfoTextChanged += _mainManager_StatusBarInfoTextChanged;

            Task.Run(OnRefresh).Wait();
        }
示例#4
0
 public JobsContentViewModel()
 {
     _logger                   = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
     _repository               = (IJobRepository)Bootstrap.Instance.Services.GetService(typeof(IJobRepository));
     _jobService               = (JobService.IJobService)Bootstrap.Instance.Services.GetService(typeof(JobService.IJobService));
     _jobServiceRepository     = (JobService.IJobServiceRepository)Bootstrap.Instance.Services.GetService(typeof(JobService.IJobServiceRepository));
     _compare                  = (JobService.ICompare)Bootstrap.Instance.Services.GetService(typeof(JobService.ICompare));
     _compare.JobStateChanged += _compare_JobStateChanged;
     _mainManager              = (IMainManager)Bootstrap.Instance.Services.GetService(typeof(IMainManager));
 }
        public JobConfigurationViewModel(Guid jobId)
        {
            _logger            = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
            _repository        = (IJobRepository)Bootstrap.Instance.Services.GetService(typeof(IJobRepository));
            _repositoryFolders = (Folders.IFolderRepository)Bootstrap.Instance.Services.GetService(typeof(Folders.IFolderRepository));

            JobId       = jobId;
            JobTypeEnum = Internal.ComboBoxBindingModelBuilder.FromEnum(typeof(JobType), false);
            Paths       = new ObservableCollection <KeyValuePair <Guid, string> >();
        }
示例#6
0
        public DuplicateConfiguration(Guid jobId)
        {
            _viewModel  = new DuplicateConfigurationViewModel(jobId);
            DataContext = _viewModel;

            InitializeComponent();

            _logger = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
            _viewModel.RefreshCommand.Execute(null);
        }
示例#7
0
        public CacheContent()
        {
            _viewModel  = new CacheContentViewModel();
            DataContext = _viewModel;

            InitializeComponent();

            _logger = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
            _viewModel.RefreshCommand.Execute(null);
        }
示例#8
0
        public DuplicateActionDialog(Guid duplicateValueId)
        {
            _viewModel  = new DuplicateActionDialogViewModel(duplicateValueId);
            DataContext = _viewModel;

            InitializeComponent();

            _logger = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
            _viewModel.RefreshCommand.Execute(null);
        }
        public JobConfiguration(Guid jobId)
        {
            _viewModel  = new JobConfigurationViewModel(jobId);
            DataContext = _viewModel;

            InitializeComponent();

            ctrlMaxParallelism.Maximum = Environment.ProcessorCount;

            _logger = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
            _viewModel.RefreshCommand.Execute(null);
        }
示例#10
0
 public CompareInAppHosting()
 {
     jobTasks                          = new Dictionary <Job, CancellationTokenSource>();
     duplicates                        = new Compare.Duplicates();
     _logger                           = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
     _repository                       = (Jobs.IJobRepository)Bootstrap.Instance.Services.GetService(typeof(Jobs.IJobRepository));
     _folderRepository                 = (Folders.IFolderRepository)Bootstrap.Instance.Services.GetService(typeof(Folders.IFolderRepository));
     _jobServiceRepository             = (IJobServiceRepository)Bootstrap.Instance.Services.GetService(typeof(IJobServiceRepository));
     _duplicatesManager                = (Duplicates.IDuplicatesManager)Bootstrap.Instance.Services.GetService(typeof(Duplicates.IDuplicatesManager));
     _mainManager                      = (IMainManager)Bootstrap.Instance.Services.GetService(typeof(IMainManager));
     _mainManager.ApplicationClosing  += _mainManager_ApplicationClosing;
     _mainManager.ApplicationStarting += _mainManager_ApplicationStarting;
 }
示例#11
0
 public FolderRepository()
 {
     _logger    = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
     _dBContext = (DAL.IDBContext)Bootstrap.Instance.Services.GetService(typeof(DAL.IDBContext));
 }
 public DuplicateActionDialogViewModel(Guid duplicateValueId)
 {
     _duplicateValueId = duplicateValueId;
     _logger           = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
     _repository       = (IDuplicatesRepository)Bootstrap.Instance.Services.GetService(typeof(IDuplicatesRepository));
 }
示例#13
0
 public FoldersContentViewModel()
 {
     _logger      = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
     _repository  = (IFolderRepository)Bootstrap.Instance.Services.GetService(typeof(IFolderRepository));
     _mainManager = (IMainManager)Bootstrap.Instance.Services.GetService(typeof(IMainManager));
 }
示例#14
0
 public Localize()
 {
     _resourceManager = new ResourceManager(typeof(Resource));
     _logger          = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
     _settings        = (Internal.ISettings)Bootstrap.Instance.Services.GetService(typeof(Internal.ISettings));
 }
示例#15
0
 public DBContext()
 {
     _logger   = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
     _settings = (Internal.ISettings)Bootstrap.Instance.Services.GetService(typeof(Internal.ISettings));
     Connect().GetAwaiter();
 }
示例#16
0
 public JobService()
 {
     _logger     = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
     _repository = (Jobs.IJobRepository)Bootstrap.Instance.Services.GetService(typeof(Jobs.IJobRepository));
     _compare    = (ICompare)Bootstrap.Instance.Services.GetService(typeof(ICompare));
 }
示例#17
0
 public Settings()
 {
     _logger = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
     Culture = Localize.Language.English;
     DBPath  = System.IO.Path.Combine(StaticFolders.GetUserFolder(), GlobalValues.DBFileName);
 }
示例#18
0
 public CacheContentViewModel()
 {
     _logger      = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger));
     _repository  = (JobService.IJobServiceRepository)Bootstrap.Instance.Services.GetService(typeof(JobService.IJobServiceRepository));
     _mainManager = (IMainManager)Bootstrap.Instance.Services.GetService(typeof(IMainManager));
 }