コード例 #1
0
 public DataService()
 {
     this.appSetting        = InstanceProvider.GetAppSetting();
     this.fileIOService     = InstanceProvider.GetTextFromFile();
     this.uri               = InstanceProvider.GetLocalPath();
     this.helloWorldWrapper = InstanceProvider.GetHelloWorld();
 }
コード例 #2
0
 public PrinterConfigurationManagerService(
     IStoragePathService storagePathService,
     IFileIOService fileIOService)
 {
     _storagePathService = storagePathService;
     _fileIOService      = fileIOService;
     Config = new PrintersConfigurationModel();
 }
コード例 #3
0
 public MainViewModel(ISettingsService settingsService, IFileIOService fileIOService, IContentDialogService contentDialogService)
 {
     this.settingsService = settingsService;
     this.fileIOService = fileIOService;
     this.contentDialogService = contentDialogService;
     OpenFilesCommand = new RelayCommand(OpenFiles);
     Startup();
 }
コード例 #4
0
 public PlaylistViewModel(IFileIOService fileIOService)
 {
     this.fileIOService = fileIOService;
     OrderPlaylistCommand = new RelayCommand<string>((mode) => OrderPlaylist(mode));
     DisplayedPlaylist.Items.CollectionChanged += new NotifyCollectionChangedEventHandler(HandleReorder);
     RemoveItemsFromPlaylistCommand = new RelayCommand<ObservableCollection<PlaylistItem>>((playItems) => RemoveItemFromPlaylist(playItems));
     Startup();
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:com.kiranpatel.crimecluster.framework.CSVReaderService"/> class.
 /// </summary>
 /// <param name="fileIOService">File IO service.</param>
 /// <param name="configService">Config service.</param>
 /// <param name="logger">Logger.</param>
 public CSVReaderService(
     IFileIOService fileIOService,
     IConfigurationService configService,
     ILogger logger)
 {
     this.fileIOService = fileIOService;
     this.configService = configService;
     this.logger        = logger;
 }
コード例 #6
0
 /// <summary>Initializes a new instance of the <see cref="TextureAtlasParameters"/> class.</summary>
 /// <param name="settings">The settings for the plug in.</param>
 /// <param name="spriteFiles">The sprite file manager.</param>
 /// <param name="atlasGen">The atlas generation service.</param>
 /// <param name="fileService">The service used for file I/O operations.</param>
 /// <param name="folderBrowser">The folder browser.</param>
 /// <param name="commonServices">The common services for the application.</param>
 /// <exception cref="ArgumentNullException">Thrown when any of the parameters are <b>null</b>.</exception>
 public TextureAtlasParameters(TextureAtlasSettings settings, ISpriteFiles spriteFiles, IGorgonTextureAtlasService atlasGen, IFileIOService fileService, IFileSystemFolderBrowseService folderBrowser, IViewModelInjection commonServices)
     : base(commonServices)
 {
     Settings       = settings ?? throw new ArgumentNullException(nameof(settings));
     SpriteFiles    = spriteFiles ?? throw new ArgumentNullException(nameof(spriteFiles));
     AtlasGenerator = atlasGen ?? throw new ArgumentNullException(nameof(atlasGen));
     FolderBrowser  = folderBrowser ?? throw new ArgumentNullException(nameof(folderBrowser));
     FileManager    = fileService ?? throw new ArgumentNullException(nameof(fileService));
 }
コード例 #7
0
 public HelloWorldDataService(
     IAppSettings appSettings,
     IFileIOService fileIOService,
     IHelloWorldMapper helloWorldMapper)
 {
     this.appSettings      = appSettings;
     this.fileIOService    = fileIOService;
     this.helloWorldMapper = helloWorldMapper;
 }
コード例 #8
0
        public FleetController()
        {
            this.dataService = null;
            appSettings      = new ConfigAppSettings();
            fileIOService    = new TextFileIOService(new ServerHostingEnvironmentService());
            dateTimeWrapper  = new SystemDateTime();
            HW_Mapper        = new HW_Mapper();

            this.dataService = new HW_DataService(appSettings, dateTimeWrapper, fileIOService, HW_Mapper);
        }
コード例 #9
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="HW_DataService" /> class.
 /// </summary>
 /// <param name="appSettings">The injected application settings service</param>
 /// <param name="dateTimeWrapper">The injected DateTime wrapper</param>
 /// <param name="fileIOService">The injected File IO Service</param>
 /// <param name="HW_Mapper">The injected Mapper</param>
 public HW_DataService(
     IAppSettings appSettings,
     IDateTime dateTimeWrapper,
     IFileIOService fileIOService,
     IHW_Mapper HW_Mapper)
 {
     this.appSettings     = appSettings;
     this.dateTimeWrapper = dateTimeWrapper;
     this.fileIOService   = fileIOService;
     this.HW_Mapper       = HW_Mapper;
 }
コード例 #10
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="HelloWorldDataService" /> class.
 /// </summary>
 /// <param name="appSettings">The injected application settings service</param>
 /// <param name="dateTimeWrapper">The injected DateTime wrapper</param>
 /// <param name="fileIOService">The injected File IO Service</param>
 /// <param name="helloWorldMapper">The injected Hello World Mapper</param>
 public HelloWorldDataService(
     IAppSettings appSettings,
     IDateTime dateTimeWrapper,
     IFileIOService fileIOService,
     IHelloWorldMapper helloWorldMapper)
 {
     this.appSettings = appSettings;
     this.dateTimeWrapper = dateTimeWrapper;
     this.fileIOService = fileIOService;
     this.helloWorldMapper = helloWorldMapper;
 }
コード例 #11
0
 public PlaylistListViewModel(IFileIOService fileIOService, IContentDialogService contentDialogService)
 {
     this.fileIOService = fileIOService;
     this.contentDialogService = contentDialogService;
     SavePlaylistCommand = new RelayCommand(CreatePlaylist);
     DeletePlaylistCommand = new RelayCommand<Playlist>((play) => DeletePlaylist(play));
     EditPlaylistCommand = new RelayCommand<Playlist>((play) => EditPlaylist(play));
     SelectedPlaylistChangedCommand = new RelayCommand<Playlist>((play) => SelectedPlaylistChanged(play));
     Startup();
     queue.CollectionChanged += Queue_CollectionChanged;
 }
コード例 #12
0
        public ProductViewModel(IRegionManager regionManager, IDialogWindowService dialogService, IFileIOService fileIOService, IFileDialogService fileDialog, IFileService fileService, IEventAggregator eventAggregator, IObjectUsageControlService <Product> usageControlService)
        {
            Title             = "Список товаров";
            ProductCollection = new ReadOnlyObservableCollection <Product>(_products);
            CanClose          = false;

            CurrentRegionManager = regionManager;
            _dialogService       = dialogService;
            _fileIOService       = fileIOService;
            _fileDialog          = fileDialog;
            _xmlService          = fileService;
            _eventAggregator     = eventAggregator;
            _usageControlService = usageControlService;

            SelectPreviousProductCommand = new DelegateCommand(SelectPreviousProductCommandExecute);
            SelectNextProductCommand     = new DelegateCommand(SelectNextProductCommandExecute);
            CreateProductCommand         = new DelegateCommand(CreateProductCommandExecute);
            EditProductCommand           = new DelegateCommand(EditProductCommandExecute, EditProductCommandCanExecute).ObservesProperty(() => SelectedProduct);
            RemoveProductCommand         = new DelegateCommand(RemoveProductCommandExecute, RemoveProductCommandCanExecute).ObservesProperty(() => SelectedProduct);
            ImportXmlCommand             = new DelegateCommand(ImportXmlCommandExecute);
            ExportXmlCommand             = new DelegateCommand(ExportXmlCommandExecute);

            _eventAggregator.GetEvent <CloseTabEvent>().Subscribe(OnCloseTab);
        }
コード例 #13
0
 public MainViewModel(IJsonDataService jsonDataService, IFileIOService fileIoService)
 {
     _jsonDataService = jsonDataService;
     _fileIOService   = fileIoService;
 }