public SkinDesignerViewModel(IServiceLocator serviceLocator, AvailableGameViewModelCollection existingClientGames, AvailableGameViewModelCollection allOtherGames, FilterableCollectionViewModel <ArenaFilterViewModel> availableFilters, SkinDefinitionViewModel skinDefinition, ExplorerBarViewModel explorerBar, IEnumerable <ErrorMessageViewModel> buildErrors, SkinIndentity sourceSkin, SkinIndentity destinationSkin) { serviceLocator.GetInstance <IUnityContainer>().RegisterInstance <ISkinDesigner>(this); ServiceLocator = serviceLocator; AvailableGames = existingClientGames; NewGames = allOtherGames; AvailableFilters = availableFilters; SkinDefinition = skinDefinition; ExplorerBar = explorerBar; _buildErrors = buildErrors; SourceSkin = sourceSkin; DestinationSkin = destinationSkin; CreateCommands(); InitMockupViewModel(); RegisterGlobalNotificationHandlers(); _validator = new SkinValidator(this, ServiceLocator.GetInstance <IApplicationServices>()); RegisterApplicationExitHandler(); }
private void InitSkinSelector(SkinIndentity skinIdentity) { SkinSelector = new SkinDefinitionBuilderSelectorViewModel(_serviceLocator.GetAllInstances <ISkinDefinitionBuilderViewModel>() .Where(b => b.CanProvideClientUrl) .ToArray()); SkinSelector.StateRestored += SkinSelector_StateRestored; SkinSelector.LoadFrom(skinIdentity); }
public InputFile GetNavigationPlanFile(SkinIndentity skinIdentity) { var fileFullPath = @"C:\CasinoTools\NDLLayoutAdmin\Head\src\LayoutConverter\OriginalFiles\navigation_plan_ndl.xmm"; return(new InputFile(Path.GetFileName(fileFullPath), _fileSystemManager.ReadAllText(fileFullPath), new PathDescriptor(fileFullPath))); }
public void RestoreStateFrom(SkinIndentity skinIdentity) { RestoreStateCore(skinIdentity); ServiceLocator.GetInstance <IApplicationServices>().StartNewParallelTask(() => { RestoreTestCase(skinIdentity.ABTestCase); ServiceLocator.GetInstance <IApplicationServices>().ExecuteOnUIThread(() => StateRestored?.Invoke(this, EventArgs.Empty)); }); }
public MockupViewModel(IServiceLocator serviceLocator, SkinIndentity skinIdentity, TriggerViewModelCollection triggers) { _serviceLocator = serviceLocator; InitSkinSelector(skinIdentity); OpenClientCommand = new Command(OpenClient); UpdateUrl(); PlayerAttributes = new PlayerAttributesSimulatorViewModel(serviceLocator, triggers); }
public void LoadFrom(SkinIndentity skinIdentity) { var builder = this.Builders.FirstOrDefault(b => b.Id == skinIdentity.Selector.Id); if (builder == null) { return; } builder.RestoreStateFrom(skinIdentity); ActivateBuilder(builder); }
protected override void RestoreStateCore(SkinIndentity skinIdentity) { var property = skinIdentity.Selector.Properties.FirstOrDefault(p => p.Name == "SelectedWebSite"); if (property != null) { this.SelectedWebSite = this.WebSites.FirstOrDefault(w => w.Name == property.Value); } property = skinIdentity.Selector.Properties.FirstOrDefault(p => p.Name == "SelectedVirtualDirectory"); if (property != null) { this.SelectedVirtualDirectory = this.VirtualDirectories.FirstOrDefault(d => d.Name == property.Value); } var skinCode = new SkinCode(skinIdentity.BrandId, skinIdentity.SkinId); this.SelectedSkinCode = this.SkinCodes.FirstOrDefault(sc => sc.Code == skinCode.Code); }
protected override void RestoreStateCore(SkinIndentity skinIdentity) { var property = skinIdentity.Selector.Properties.FirstOrDefault(p => p.Name == "SelectedEnvironment"); if (property != null) { this.SelectedEnvironment = this.Environments.FirstOrDefault(e => e.Id == property.Value); } property = skinIdentity.Selector.Properties.FirstOrDefault(p => p.Name == "SelectedVersion"); if (property != null) { this.SelectedVersion = this.Versions.FirstOrDefault(v => v.Id == property.Value); } this.SelectedBrand = this.Brands.FirstOrDefault(b => b.Id == skinIdentity.BrandId); this.SelectedSkin = this.Skins.FirstOrDefault(b => b.Id == skinIdentity.SkinId); }
protected abstract void RestoreStateCore(SkinIndentity skinIdentity);
protected override void RestoreStateCore(SkinIndentity skinIdentity) { this.SelectedBrand = this.Brands.FirstOrDefault(b => b.Id == skinIdentity.BrandId); this.SelectedSkin = this.Skins.FirstOrDefault(b => b.Id == skinIdentity.SkinId); }
public InputFile GetNavigationPlanFile(SkinIndentity skinIdentity) { throw new InvalidCommandLineArgumentsException("Reading navigation file from Artifactory is not implemented!"); }
void ISkinDefinitionBuilderViewModel.RestoreStateFrom(SkinIndentity skinIdentity) { throw new NotSupportedException(); }