public void Navigate(IExplorerBarItem explorerBarItem) { var navigationList = explorerBarItem.GetAccessorsList(); this.NavigationList = navigationList.Select(item => new ContextCommand(item.Caption, () => item.IsSelected = true)) .ToArray(); }
private void Init(IExplorerBarItem innerItem) { _innerItem = innerItem; this.IsSelected = _innerItem.IsSelected; this.IsChecked = _innerItem.IsChecked; this.AllowItemCheck = _innerItem.AllowItemCheck; }
private void DoLazyLoad() { _lazyLoadIndicator.Do(indicator => { indicator.IsLoading = true; _lazyLoadIndicator = Optional <LazyLoadingIndicatorExplorerBarItem> .None(); StartBusyAction(() => { var appServices = this.ServiceLocator.GetInstance <IApplicationServices>(); IEnumerable <IExplorerBarItem> items = new IExplorerBarItem[0]; try { items = GetLazyLoadedItems(); } finally { appServices.ExecuteOnUIThread(() => { indicator.IsLoading = false; this.Items.Remove(indicator); }); } appServices.ExecuteOnUIThread(() => { foreach (var item in items) { this.Items.Add(item); } }); }); }); }
public GamePartTreeItem(string gameName, TViewModel viewModel, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(parent, serviceLocator) { GameName = gameName; ViewModel = viewModel; this.AllowItemCheck = false; }
public GameEngineTreeItem(IGameEngineViewModel gameEngine, IExplorerBarItem parent, IServiceLocator serviceLocator, Optional <IComponentRenameDeleteHandler> renamingService) : base(gameEngine, parent, serviceLocator, renamingService) { foreach (var game in gameEngine.Games.OrderBy(g => g.Name)) { this.Items.Add(new GameTreeItem(game, this, serviceLocator, renamingService)); } }
public GameEnginePublisherTreeViewItem(IGameEnginePublisherViewModel publisher, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(publisher, parent, serviceLocator) { foreach (var game in publisher.Games) { this.Items.Add(new GamePublisherTreeViewItem(game, this, serviceLocator)); } }
public ProductionBranchExplorerBarItem(IProductionBranch productionBranch, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(parent, serviceLocator) { _productionBranch = productionBranch; foreach (var env in _productionBranch.GetEnvironments()) { this.Items.Add(ItemsFactory.CreateProductionEnvironment(env)); } }
public EnvironmentBranchExplorerBarItem(TMainBranch mainBranch, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(parent, serviceLocator) { this.MainBranch = mainBranch; Items.Add(CreateMainExplorerBarItem(mainBranch)); LoadFeatureBranches(); SubscribeToEvent <NewFeatureBranchEventData>(NewFeatureBranchEventHandler); }
public QAInstallersExplorerBarItem(IQaBranch qaBranch, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(parent, serviceLocator) { _qaBranch = qaBranch; if (!UseLazyLoading) { foreach (var item in GetLazyLoadedItems()) { this.Items.Add(item); } } }
public ComponentsExplorerBarItem(TComponentViewModel componentViewModel, IExplorerBarItem parent, IServiceLocator serviceLocator, Optional <IComponentRenameDeleteHandler> renameDeleteHandler) : base(parent, serviceLocator) { this.ComponentViewModel = componentViewModel; _renameDeleteHanlder = renameDeleteHandler; SubscribeToEvent <ComponentRenamedEventData>(ComponentRenamedEventHandler); SubscribeToEvent <ComponentDeletedEventData>(ComponentDeletedEventHandler); }
public GameTreeItem(IGameViewModel game, IExplorerBarItem parent, IServiceLocator serviceLocator, Optional <IComponentRenameDeleteHandler> renameHandler) : base(game, parent, serviceLocator, renameHandler) { game.Math.Do(math => { this.Items.Add(new GameMathTreeItem(game.Name, math, this, serviceLocator)); }); game.Limits.Do(limits => { this.Items.Add(new GameLimitsTreeItem(game.Name, limits, this, serviceLocator)); }); }
public ExplorerBarItem(IExplorerBarItem parent, IServiceLocator serviceLocator) : base(serviceLocator) { if (parent == null) { throw new ArgumentNullException(nameof(parent)); } this.Parent = Optional <IExplorerBarItem> .Some(parent); _explorerBar = () => parent.ExplorerBar; InitLazyLoading(); }
private void InitDependencies() { _qaBranch = Substitute.For <IQaBranch>(); _parent = Substitute.For <IExplorerBarItem>(); _explorerBarItemsRepositoryFactory = Substitute.For <IExplorerBarItemsRepositoryFactory>(); _explorerBarItemsRepository = Substitute.For <IExplorerBarItemsRepository>(); _explorerBarItemsRepositoryFactory.GetRepository(Arg.Any <IExplorerBarItem>()).Returns(_explorerBarItemsRepository); _pubSubMediator = new Spark.Wpf.Common.TestHelpers.MockPubSubMediator(); _serviceLocator = ServiceLocatorBuilder.ServiceLocator() .WithService(_explorerBarItemsRepositoryFactory) .WithService(_pubSubMediator) .Build(); }
public GamePublisherTreeViewItem(IGamePublisherViewModel publisher, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(publisher, parent, serviceLocator) { this.IsExpanded = true; publisher.MathPublisher.Do(p => { this.Items.Add(new GameMathPublisherTreeViewItem(p, this, serviceLocator)); }); publisher.LimitsPublisher.Do(p => { this.Items.Add(new GameLimitsPublisherTreeViewItem(p, this, serviceLocator)); }); }
public ProductionInstallersExplorerBarItem(IProductionEnvironment environment, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(parent, serviceLocator) { _environment = environment; if (!UseLazyLoading) { foreach (var item in GetLazyLoadedItems()) { this.Items.Add(item); } } }
public DevBranchExplorerBarItem(IDevBranch devBranch, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(devBranch, parent, serviceLocator) { }
public ExplorerBarItemsRepository(IServiceLocator serviceLocator, IExplorerBarItem parent) { _serviceLocator = serviceLocator; _parent = parent; }
public QABranchExplorerBarItem(IQaBranch qaBranch, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(qaBranch, parent, serviceLocator) { this.Items.Add(ItemsFactory.CreateQAInstallersItem(qaBranch)); }
public CoreComponentPublisherTreeViewItem(ICoreComponentPublisherViewModel publisher, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(publisher, parent, serviceLocator) { }
public ProductionInstallerExplorerBarItem(IProductionInstaller installer, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(parent, serviceLocator) { _installer = installer; SubscribeToEvent <InstallerBranchedEventData>(InstallerBranchedHandler); }
public GameMathPublisherTreeViewItem(IGameMathPublisherViewModel mathPublisher, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(mathPublisher, parent, serviceLocator) { }
public GameLimitsPublisherTreeViewItem(IGameLimitsPublisherViewModel limitsPublisher, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(limitsPublisher, parent, serviceLocator) { }
public FoundItem(IExplorerBarItem item, ExplorerBarSearchViewModel searcher) { _item = item; _searcher = searcher; this.GoToItemCommand = new Command(() => { _searcher.Close(); _item.IsSelected = true; }); }
public DevFeaturesBranchesExplorerBarItem(IDevBranch mainBranch, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(mainBranch, parent, serviceLocator) { }
public QAFeatureBranchExplorerBarItem(IFeatureBranch featureBranch, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(featureBranch, parent, serviceLocator) { }
public QaMainBranchExplorerBarItem(IQaBranch qaBranch, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(qaBranch, parent, serviceLocator) { }
public FeaturesBranchesExplorerBarItem(TMainBranch mainBranch, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(parent, serviceLocator) { this.MainBranch = mainBranch; LoadFeatureBranches(); SubscribeToEvent <NewFeatureBranchEventData>(NewFeatureBranchEvent); }
public FeatureBranchExplorerBarItem(IFeatureBranch featureBranch, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(parent, serviceLocator) { this.FeatureBranch = featureBranch; }
public MainBranchExplorerBarItem(TMainBranch mainBranch, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(parent, serviceLocator) { this.MainBranch = mainBranch; }
public QaFeaturesBranchesExplorerBarItem(IQaBranch qaBranch, IExplorerBarItem parent, IServiceLocator serviceLocator) : base(qaBranch, parent, serviceLocator) { }