private void OnOpenFolderCallback(IUserInteraction interaction) { if (interaction.UserInteractionResult == UserInteractionOptions.Ok) { var directory = (interaction.Content as OpenFolderDialogViewModel).SelectedDirectory; currenGenerationProvider = GenerationProviderFactory.Get(directory, business.GenerationLoader); // ReSharper disable once RedundantArgumentDefaultValue OnPropertyChanged(null); SelectedGeneration = 0; } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { if ((this._parent.GenerationProvider == null)) { IGenerationProvider generationProviderCasted = item.As <IGenerationProvider>(); if ((generationProviderCasted != null)) { this._parent.GenerationProvider = generationProviderCasted; return; } } if ((this._parent.TitleHeldBy_Marketer == null)) { IMarketer titleHeldBy_MarketerCasted = item.As <IMarketer>(); if ((titleHeldBy_MarketerCasted != null)) { this._parent.TitleHeldBy_Marketer = titleHeldBy_MarketerCasted; return; } } IEnergyTransaction energyTransactionsCasted = item.As <IEnergyTransaction>(); if ((energyTransactionsCasted != null)) { this._parent.EnergyTransactions.Add(energyTransactionsCasted); } IMarketer resoldBy_MarketersCasted = item.As <IMarketer>(); if ((resoldBy_MarketersCasted != null)) { this._parent.ResoldBy_Marketers.Add(resoldBy_MarketersCasted); } IServicePoint servicePointCasted = item.As <IServicePoint>(); if ((servicePointCasted != null)) { this._parent.ServicePoint.Add(servicePointCasted); } }