public InjectionConfigurationViewModelFactory( DomainActionBuilder actionBuilder, ComponentViewModelFactory componentViewModelFactory, IFindFirstLaunchTimeQuery findFirstLaunchTimeQuery, IFindGamePackageByIdQuery findGamePackageByIdQuery, IFindGamesQuery findGamesQuery, IFindLastEditedGamePackageQuery findLastEditedGamePackageQuery, IDirectoryPicker directoryPicker, IEqualityComparer <ProxySettings> stateEqualityComparer, IEventPublisher eventPublisher, IFilePicker filePicker, IPluginFactory pluginFactory, INavigationService navigationService, ITaskRunner runner) { _actionBuilder = actionBuilder; _componentViewModelFactory = componentViewModelFactory; _findFirstLaunchTimeQuery = findFirstLaunchTimeQuery; _findGamePackageByIdQuery = findGamePackageByIdQuery; _findGamesQuery = findGamesQuery; _findLastEditedGamePackageQuery = findLastEditedGamePackageQuery; _directoryPicker = directoryPicker; _stateEqualityComparer = stateEqualityComparer; _eventPublisher = eventPublisher; _filePicker = filePicker; _pluginFactory = pluginFactory; _navigationService = navigationService; _runner = runner; }
private void SelectFilesForDataset(object obj) { if (RecursivleyLoadInputs) { IDirectoryPicker picker = GlobalContainer.Instance.Container.Resolve <IDirectoryPicker>(); if (picker.Resolve()) { _loadFilesFromDirectoryAndSubDirectories(picker.Directory); } } else { Stream myStream; OpenFileDialog dialogOpen = new OpenFileDialog(); ; //Setup properties for open file dialog dialogOpen.InitialDirectory = "C:\\"; dialogOpen.FilterIndex = 1; dialogOpen.Multiselect = true; dialogOpen.Title = "Please select image files which are going to be part of this dataset"; Nullable <bool> isOkay = dialogOpen.ShowDialog(); String[] strFiles = dialogOpen.FileNames; if (isOkay == true) { foreach (string file in dialogOpen.FileNames) { _addFileToCurrentSet(file); } } } }
public TextureManagementWindowViewModel( DomainActionBuilder actionBuilder, IDirectoryPicker directoryPicker, IEventPublisher eventPublisher, IFilePicker filePicker, IFindTextureManagementSettingsQuery findTextureManagementSettingsQuery, IImageProvider emptyImageProvider, ITaskRunner dispatcher) { _actionBuilder = actionBuilder; _directoryPicker = directoryPicker; _eventPublisher = eventPublisher; _filePicker = filePicker; _findTextureManagementSettingsQuery = findTextureManagementSettingsQuery; _eventPublisher.Register(this); StatusViewModel = new StatusViewModel(dispatcher); TexturePreview = new TexturePreviewViewModel(_actionBuilder, _eventPublisher, this, emptyImageProvider); AbortCommand = new ActionCommand(AbortConversion, IsAbortConversionEnabled); CheckAllCommand = new ActionCommand(CheckAll, IsCheckAllEnabled); ConvertMultiCommand = new ActionCommand(() => _queue.QueueTask(ConvertMultiAsync), IsMultiConversionEnabled); ConvertSingleCommand = new ActionCommand(() => _queue.QueueTask(ConvertSingleAsync), IsSingleConversionEnabled); MoveToDestinationDirectoryCommand = new ActionCommand(MoveToDestinationDirectory, () => !DestinationDirectory.IsNullOrEmpty()); MoveToSourceDirectoryCommand = new ActionCommand(MoveToSourceDirectory, () => !SourceDirectory.IsNullOrEmpty()); MultiChangedCommand = new ActionCommand(() => _queue.QueueTask(OnChangedAsync), () => true); PickDestinationDirectoryCommand = new ActionCommand(() => _queue.QueueTask(PickDestinationDirectoryAsync), () => true); PickSourceDirectoryCommand = new ActionCommand(() => _queue.QueueTask(PickSourceDirectoryAsync), () => true); SingleChangedCommand = new ActionCommand(() => _queue.QueueTask(OnSingleChangedAsync), () => true); UncheckAllCommand = new ActionCommand(UncheckAll, IsUncheckAllEnabled); }
public InjectionConfigurationViewModel( DomainActionBuilder actionBuilder, ComponentViewModelFactory componentViewModelFactory, IFindFirstLaunchTimeQuery findFirstLaunchTimeQuery, IFindGamePackageByIdQuery findGamePackageByIdQuery, IFindGamesQuery findGamesQuery, IFindLastEditedGamePackageQuery findLastEditedGamePackageQuery, IDirectoryPicker directoryPicker, IEqualityComparer <ProxySettings> stateEqualityComparer, IEventPublisher publisher, IFilePicker filePicker, IPluginFactory pluginFactory, INavigationService navigationService, IProcessable processable, ITaskRunner runner) { _actionBuilder = actionBuilder; _componentViewModelFactory = componentViewModelFactory; _findFirstLaunchTimeQuery = findFirstLaunchTimeQuery; _findGamePackageByIdQuery = findGamePackageByIdQuery; _findGamesQuery = findGamesQuery; _findLastEditedGamePackageQuery = findLastEditedGamePackageQuery; _directoryPicker = directoryPicker; _stateEqualityComparer = stateEqualityComparer; _publisher = publisher; _filePicker = filePicker; _pluginFactory = pluginFactory; _navigationService = navigationService; _processable = processable; _runner = runner; _publisher.Register <ApplicationActionEvent>(this); _publisher.Register <ApplicationMinimizedEvent>(this); _publisher.Register <ApplicationRestoredEvent>(this); ActionCommand = new ActionCommand(() => _queue.QueueTask(ExecuteActionAsync), IsActionEnabled); ActivationState = new StateViewModel(_runner); AddGameProfileCommand = new ActionCommand(() => _queue.QueueTask(AddGameProfileAsync), () => true); ChangedCommand = new ActionCommand(async() => await UpdateGameProfileAsync(), () => true); ClearGameFilePathCommand = new ActionCommand(async() => await ClearApplicationFilePathAsync(), () => !GameFilePath.IsNullOrEmpty()); EditGameProfileCommand = new ActionCommand(() => _queue.QueueAction(EditPluginMainSettings), () => true); MoveToGameFilePathCommand = new ActionCommand(MoveToApplicationPath, () => !GameFilePath.IsNullOrEmpty()); MoveToConfigurationDirectoryPathCommand = new ActionCommand(MoveToConfigurationDirectoryPath, () => !GameFilePath.IsNullOrEmpty()); MoveToLogsDirectoryPathCommand = new ActionCommand(MoveToLogsDirectoryPath, () => !GameFilePath.IsNullOrEmpty()); SwitchModeCommand = new ActionCommand(async() => await SwapModeAsync(), () => true); PickGameFilePathCommand = new ActionCommand(async() => await PickApplicationFilePathAsync(), () => true); PickPluginSettingsEditViewCommand = new GenericActionCommand <IComponentViewModel>(EditPluginComponent, () => true); RemoveGameProfileCommand = new ActionCommand(async() => await RemoveGameProfileAsync(), () => _package?.Game.Profiles.Count > 1); RenameGameProfileCommand = new ActionCommand(async() => await RenameGameProfileAsync(), () => true); ValidationTriggeredCommand = new GenericActionCommand <ValidationResultEventArgs>(eventArgs => _queue.QueueAction(Validate), () => true); }
private async void directoryButton_Clicked(object sender, EventArgs args) { _parent.Reset(); if (Device.RuntimePlatform == Device.Android) { await Navigation.PushAsync(new FolderPage(this)); } else if (Device.RuntimePlatform == Device.UWP) { IDirectoryPicker picker = DependencyService.Get <IDirectoryPicker>(); _musicFiles = await picker.GetFilesWithHandles(); listView.ItemsSource = _musicFiles; SetCurrentSong(); } }
public ReadonlyDirectoryPathViewModel(IGenericProperty <string> property, IDirectoryPicker directoryPicker, IEqualityComparer <string> equalityComparer, IPropertyConverter <string> converter) : base(property, equalityComparer, converter) { _property = property; _directoryPicker = directoryPicker; }
public ComponentViewModelFactory(IDirectoryPicker directoryPicker) { _directoryPicker = directoryPicker; }
public ExternalDisplayer(IDirectoryPicker directoryPicker) { this.directoryPicker = directoryPicker; }