public SourceMainViewModel(ISourcesManager sourcesManager) { _sourcesManager = sourcesManager; _customNavigationService = ServiceLocator.Current.GetInstance <ICustomNavigationService>("SourceInternal"); LoadData(); }
static DbInitializer() { _architectsManager = ServiceLocator.Current.GetInstance <IArchitectManager>(); _architecturesManager = ServiceLocator.Current.GetInstance <IArchitecturesManager>(); _repairsManager = ServiceLocator.Current.GetInstance <IRepairsManager>(); _restorationsManager = ServiceLocator.Current.GetInstance <IRestorationsManager>(); _sourcesManager = ServiceLocator.Current.GetInstance <ISourcesManager>(); _stylesManager = ServiceLocator.Current.GetInstance <IStylesManager>(); }
public ChocolateySourcesViewModel(ISourcesManager sourcesManager, IChocolateyFeedFactory feedFactory) { this._sourcesManager = sourcesManager; this._feedFactory = feedFactory; this.Sources = new ObservableCollection <ChocolateySource>(); this.AddSourceCommand = new RelayCommand(this.AddSource, this.ValidateNewSource); this.RemoveSourceCommand = new RelayCommand <ChocolateySource>(this.RemoveSource, source => source != null); this.AddNewSourceCommand = new RelayCommand(() => this.SelectedChocolateySource = null); }
public ChocolateySourcesViewModel(ISourcesManager sourcesManager, IChocolateyFeedFactory feedFactory) { this._sourcesManager = sourcesManager; this._feedFactory = feedFactory; this.Sources = new ObservableCollection<ChocolateySource>(); this.AddSourceCommand = new RelayCommand(this.AddSource, this.ValidateNewSource); this.RemoveSourceCommand = new RelayCommand<ChocolateySource>(this.RemoveSource, source => source != null); this.AddNewSourceCommand = new RelayCommand(() => this.SelectedChocolateySource = null); }
public SourceAddViewModel(ISourcesManager sourcesManager, IArchitecturesManager architecturesManager) { _sourcesManager = sourcesManager; _architecturesManager = architecturesManager; _customNavigationService = ServiceLocator.Current.GetInstance <ICustomNavigationService>("SourceInternal"); _source = _customNavigationService.CurrentPageParams as SourceModel; SaveCommand = _source == null ? new RelayCommand(async() => await AddSource()) : new RelayCommand(async() => await UpdateSource()); ActionText = _source == null ? "Добавление" : "Редактирование"; ButtonText = _source == null ? "Добавить" : "Сохранить изменения"; InitData(); SetupFields(); }
public SourceAddArchitectureViewModel(ISourcesManager sourcesManager, IArchitecturesManager architecturesManager, IArchitectureSourceManager architectureSourceManager) { _sourcesManager = sourcesManager; _architecturesManager = architecturesManager; _architectureSourceManager = architectureSourceManager; _customNavigationService = ServiceLocator.Current.GetInstance <ICustomNavigationService>("SourceInternal"); _source = _customNavigationService.CurrentPageParams as SourceModel; _architectures = new ObservableCollection <ArchitectureModel>( _architecturesManager.GetArchitecturesListBySourceId(_source.Id)); SaveCommand = new RelayCommand(async() => await AddSourceArchitecture()); ActionText = "Добавление сооружения"; ButtonText = "Добавить"; InitData(); }
public SetupScriptCreator(ISourcesManager sources) { this._sources = sources; }