protected override void InitializeDependencies() { base.InitializeDependencies(); _iconsService = App.Container.GetInstance <IIconsService>(); _statisticsManager = App.Container.GetInstance <IStatisticsManager>(); }
/// <summary> /// Constructor /// </summary> /// <param name="translationService"></param> /// <param name="databaseRepository"></param> /// <param name="passwordService"></param> /// <param name="iconsService"></param> /// <param name="clipboardService"></param> public EntryViewModel(ITranslationService translationService, IDatabaseRepository databaseRepository, IPasswordService passwordService, IIconsService iconsService, IClipboardService clipboardService) : base(translationService) { this.databaseRepository = databaseRepository; this.passwordService = passwordService; this.iconsService = iconsService; this.clipboardService = clipboardService; iconsService.IconDownloadedEvent += IconDownloadedEventHandler; backupPasswordEntry = new PasswordEntryModel(); Categories = new ObservableCollection <string>(); UserControlVisibility = false; DeletionConfimationVisibility = false; PasswordGenerationDialogVisibility = false; Messenger.Default.Register <DatabaseUnloadedMessage>(this, DatabaseUnloadedHandler); Messenger.Default.Register <EntrySelectedMessage>(this, EntrySelectedHandler); Messenger.Default.Register <ShowNewEntryViewMessage>(this, StartEntryCreation); Messenger.Default.Register <CategoryAddedMessage>(this, HandleNewCategory); Messenger.Default.Register <CategoryDeletedMessage>(this, CategoryDeletedHandler); Messenger.Default.Register <CategoryEditedMessage>(this, CategoryEditedHandler); Messenger.Default.Register <LanguageChangedMessage>(this, LanguageChangedHandler); }
public DependenciesService(IDataContext dataContext, IIconsService iconsService) { _dataContext = dataContext; _iconsService = iconsService; _dataContext.Loaded += DataContextLoaded; _iconsService.Loaded += IconsLoaded; }
public DefaultCategoriesInitializer(IDataContext dataContext, IIconsService iconsService) { _dataContext = dataContext; _iconsService = iconsService; _dataContext.Loaded += DataContextLoaded; _iconsService.Loaded += IconsLoaded; }
public OptionsViewModel() { _iconsService = App.Container.GetInstance <IIconsService>(); _ratesService = App.Container.GetInstance <IRatesService>(); _dataContext.Categories.Collection.CollectionChanged += CategoriesCollectionChanged; _dataContext.Loaded += DataContextUpdated; InitializeQuickAccess(); }
private void ConfigurateContainer() { _bootStrapper = new BootStrapper(); _bootStrapper.Initialize(); _options = Container.GetInstance <Options>(); _dataContext = Container.GetInstance <IDataContext>(); _ratesService = Container.GetInstance <IRatesService>(); _iconsService = Container.GetInstance <IIconsService>(); }
/// <summary> /// Constructor /// </summary> /// <param name="databaseRepository"></param> /// <param name="iconsService"></param> public DatabaseSelectionViewModel(ITranslationService translationService, IDatabaseRepository databaseRepository, IIconsService iconsService, ISettingsService settingsService) : base(translationService) { this.databaseRepository = databaseRepository; this.iconsService = iconsService; this.settingsService = settingsService; iconsService.IconsLoadedEvent += IconsLoadedEventHandler; Messenger.Default.Register <ShowDatabaseSelectionViewMessage>(this, InitUserControl); }
/// <summary> /// Constructor /// </summary> /// <param name="translationService"></param> /// <param name="iconsService"></param> /// <param name="clipboardService"></param> public EntryListViewModel(ITranslationService translationService, IIconsService iconsService, IClipboardService clipboardService) : base(translationService) { this.iconsService = iconsService; this.clipboardService = clipboardService; iconsService.IconDownloadedEvent += IconDownloadedEventHandler; basePasswordEntries = new List <PasswordEntryModel>(); Messenger.Default.Register <DatabaseLoadedMessage>(this, DatabaseLoadedHandler); Messenger.Default.Register <DatabaseUnloadedMessage>(this, DatabaseUnloadedHandler); Messenger.Default.Register <EntryEditedMessage>(this, EntryEditedHandler); Messenger.Default.Register <EntryAddedMessage>(this, EntryAddedHandler); Messenger.Default.Register <EntryDeletedMessage>(this, EntryDeletedHandler); Messenger.Default.Register <CategorySelectedMessage>(this, CategorySelectedHandler); Messenger.Default.Register <CategoryDeletedMessage>(this, CategoryDeletedHandler); Messenger.Default.Register <CategoryEditedMessage>(this, CategoryEditedHandler); }
/// <summary> /// Constructor /// </summary> /// <param name="translationService"></param> /// <param name="settingsService"></param> /// <param name="databaseRepository"></param> /// <param name="iconsService"></param> /// <param name="encryptionService"></param> /// <param name="clipboardService"></param> public MainViewModel(ITranslationService translationService, ISettingsService settingsService, IDatabaseRepository databaseRepository, IIconsService iconsService, IEncryptionService encryptionService, IClipboardService clipboardService) : base(translationService) { this.settingsService = settingsService; this.databaseRepository = databaseRepository; this.iconsService = iconsService; this.encryptionService = encryptionService; this.clipboardService = clipboardService; MainViewVisibility = false; DatabaseOpeningGroupVisibility = true; SettingsVisibility = false; SyncVisibility = false; Messenger.Default.Register <DatabaseLoadedMessage>(this, DatabaseLoadedHandler); Messenger.Default.Register <ToggleSettingsViewMessage>(this, SettingsViewVisibilityHandler); Messenger.Default.Register <ToggleSyncViewMessage>(this, SyncViewVisibilityHandler); }
public UrlToIconBitmapSourceConverter() { iconsService = ServiceLocator.Current.GetInstance <IIconsService>(); }
public IconsController(IIconsService iconsService) { this.iconsService = iconsService; }
public CategoriesController(ICategoriesService categoriesService, IIconsService iconsService) { _categoriesService = categoriesService; _iconsService = iconsService; }