/// <summary> /// Initializes a new instance of the <see cref="NeedDatabaseReloadViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// Injected common loggeing. /// </param> /// <param name="iocEventAggregator"> /// Injected event aggregator. /// </param> /// <param name="iocNavigationService"> /// </param> public NeedDatabaseReloadViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { BaseTitle = "Database reload needed"; BaseTitleIcon = CommonConstants.IconSettings; }
public SettingsViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { BaseTitle = "Settings"; BaseTitleIcon = CommonConstants.IconSettings; switch (CommonLocalSettings.ApplicationTheme) { case OSAppTheme.Light: { ThemeButtonLightChecked = true; break; } case OSAppTheme.Dark: { ThemeButtonDarkChecked = true; break; } default: { ThemeButtonSystemChecked = true; break; } } }
//private double mX = 0f; //private double mY = 0f; /// <summary> /// Initializes a new instance of the <see cref="MediaDetailViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The common logging. /// </param> /// <param name="iocEventAggregator"> /// The event aggregator. /// </param> /// <param name="iocNavigationService"> /// The navigation service. /// </param> public MediaDetailViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { BaseCL.LogProgress("MediaDetailViewModel created"); OpenImageCommand = new DelegateCommand(OpenImage, CanOpenImage); }
/// <summary> /// Initializes a new instance of the <see cref="StorePostLoad"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The ioc common logging. /// </param> /// <param name="iocEventAggregator"> /// The ioc event aggregator. /// </param> public StorePostLoad(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator) { _EventAggregator = iocEventAggregator; _CommonLogging = iocCommonLogging; _EventAggregator.GetEvent <DataLoadXMLEvent>().Subscribe(LoadXMLUIItems, ThreadOption.UIThread); }
/// <summary> /// Initializes a new instance of the <see cref="PersonDetailViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The common logging service. /// </param> public PersonDetailViewModel(ICommonLogging iocCommonLogging, IPlatformSpecific iocPlatformSpecific) : base(iocCommonLogging) { BaseTitle = "Person Detail"; BaseTitleIcon = CommonConstants.IconPeople; _PlatformSpecific = iocPlatformSpecific; }
/// <summary> /// Initializes a new instance of the <see cref="HubViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The ioc common logging. /// </param> /// <param name="iocEventAggregator"> /// The ioc event aggregator. /// </param> /// <param name="iocNavigationService"> /// </param> public HubViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { BaseTitle = "Hub"; BaseTitleIcon = CommonConstants.IconHub; BaseEventAggregator.GetEvent <DataLoadCompleteEvent>().Subscribe(CheckHeroImageLoad, ThreadOption.BackgroundThread); }
public SettingsViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { BaseTitle = "Settings"; BaseTitleIcon = CommonConstants.IconSettings; TestCommand = new DelegateCommand(TestButtonHandler).ObservesCanExecute(() => CanHandleTestButton); }
/// <summary> /// Initializes a new instance of the <see cref="FirstRunViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// Common logger /// </param> /// <param name="iocEventAggregator"> /// The ioc event aggregator. /// </param> /// <param name="iocNavigationService"> /// </param> public FirstRunViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { LoadDataCommand = new DelegateCommand(FirstRunLoadAFileButton); BaseTitle = "First Run"; BaseTitleIcon = CommonConstants.IconSettings; }
/// <summary> /// Initializes a new instance of the <see cref="SetupStorageViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The common logging. /// </param> /// <param name="iocEventAggregator"> /// The event aggregator. /// </param> /// <param name="iocNavigationService"> /// The navigation service. /// </param> public WhatsNewViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { LoadDataCommand = new DelegateCommand(LoadDataAction); BaseTitle = "What's new"; BaseTitleIcon = CommonConstants.IconSettings; }
/// <summary> /// Initializes a new instance of the <see cref="SearchViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// Common Logging. /// </param> /// <param name="iocEventAggregator"> /// Event Aggregator. /// </param> /// <param name="iocNavigationService"> /// NavigationService /// </param> public SearchPageViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { BaseTitle = "Search Page"; BaseTitleIcon = CommonConstants.IconSearch; SearchButtonCommand = new Command <string>(SearchProcessQuery); }
/// <summary> /// Initializes a new instance of the <see cref="FileInputHandlerViewModel"/> class. /// </summary> /// <param name="iocDataRepositoryManager"> /// The ioc data repository manager. /// </param> /// <param name="iocCommonLogging"> /// The common logging. /// </param> /// <param name="iocEventAggregator"> /// The event aggregator. /// </param> public FileInputHandlerViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { BaseTitle = "File Input Handler"; BaseTitleIcon = CommonConstants.IconSettings; PickFileCommand = new DelegateCommand(PickFile).ObservesCanExecute(() => LocalCanHandleDataFolderChosen); UseExistingFolderCommand = new DelegateCommand(UseExistingFolder).ObservesCanExecute(() => LocalCanHandleUseExistingFolder); }
/// <summary> /// Initializes a new instance of the <see cref="CommonNotifications"/> class. /// </summary> /// <param name="iocCommonLogging"> /// Common Logging routines /// </param> /// <param name="iocEventAggregator"> /// The event aggregator. /// </param> public CommonNotifications(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, IDataLog iocDataLog) { if (iocEventAggregator is null) { throw new ArgumentNullException(nameof(iocEventAggregator)); } _iocEventAggregator = iocEventAggregator; _iocCommonLogging = iocCommonLogging; _DataLog = iocDataLog; }
/// <summary> /// Initializes a new instance of the <see cref="CommonNotifications"/> class. /// </summary> /// <param name="iocCommonLogging"> /// Common Logging routines /// </param> /// <param name="iocEventAggregator"> /// The event aggregator. /// </param> public CommonNotifications(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator) { if (iocEventAggregator is null) { throw new ArgumentNullException(nameof(iocEventAggregator)); } _iocEventAggregator = iocEventAggregator; _iocCommonLogging = iocCommonLogging; //_EventAggregator.GetEvent<GVNotificationLogAdd>().Subscribe(DataLoadLogAdd, ThreadOption.UIThread); }
/// <summary> /// Initializes a new instance of the <see cref="DataRepositoryManager"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The ioc common logging. /// </param> /// <param name="iocEventAggregator"> /// The ioc event aggregator. /// </param> /// <param name="iocExternalStorage"> /// The ioc external storage. /// </param> /// <param name="iocGrampsStorePostLoad"> /// The ioc gramps store post load. /// </param> /// <param name="iocGrampsStoreSerial"> /// The ioc gramps store serial. /// </param> /// <param name="iocStoreFile"> /// The ioc store file. /// </param> public DataRepositoryManager(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, IGrampsStoreXML iocExternalStorage, IStorePostLoad iocGrampsStorePostLoad, IGrampsStoreSerial iocGrampsStoreSerial, IStoreFile iocStoreFile) { _CL = iocCommonLogging ?? throw new ArgumentNullException(nameof(iocCommonLogging)); localExternalStorage = iocExternalStorage ?? throw new ArgumentNullException(nameof(iocExternalStorage)); localPostLoad = iocGrampsStorePostLoad; localStoreSerial = iocGrampsStoreSerial; localStoreFile = iocStoreFile; _EventAggregator = iocEventAggregator; // Event Handlers //_EventAggregator.GetEvent<AppStartLoadDataEvent>().Subscribe(StartDataLoad, ThreadOption.BackgroundThread); _EventAggregator.GetEvent <DataLoadStartEvent>().Subscribe(StartDataLoad, ThreadOption.BackgroundThread); _EventAggregator.GetEvent <DataSaveSerialEvent>().Subscribe(SerializeRepositoriesAsync, ThreadOption.BackgroundThread); _EventAggregator.GetEvent <DataLoadCompleteEvent>().Subscribe(DataLoadedSetTrue, ThreadOption.BackgroundThread); }
/// <summary> /// Initializes a new instance of the <see cref="NoteDetailViewModel"/> class. Common logging. /// </summary> /// <param name="iocCommonLogging"> /// Common logging. /// </param> /// <param name="iocEventAggregator"> /// Common Event Aggregator. /// </param> /// <param name="iocNavigationService"> /// </param> public NoteDetailViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { BaseTitleIcon = CommonConstants.IconNotes; }
/// <summary> /// Initializes a new instance of the <see cref="PeopleGraphViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The ioc common logging. /// </param> /// <param name="iocEventAggregator"> /// The ioc event aggregator. /// </param> public PeopleGraphViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { BaseTitle = "People Graph"; BaseTitleIcon = CommonConstants.IconPeopleGraph; }
/// <summary> /// Initializes a new instance of the <see cref="EventDetailViewModel"/> class. /// </summary> /// <param name="iocCommonModelGridBuilder"> /// The ioc common model grid builder. /// </param> /// <param name="iocEventAggregator"> /// The event aggregator. /// </param> /// <param name="iocCommonLogging"> /// Common Logging interface. /// </param> public EventDetailViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { }
public ViewModelBase(ICommonLogging iocCommonLogging) { BaseCL = iocCommonLogging; }
/// <summary> /// Initializes a new instance of the <see cref="GrampsStoreXML"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The gramps view common logging. /// </param> /// <param name="iocGrampsStorePostLoad"> /// The ioc gramps store post load. /// </param> public GrampsStoreXML(ICommonLogging iocCommonLogging) { localGrampsCommonLogging = iocCommonLogging; ns = CommonConstants.GrampsXMLNameSpace; }
/// <summary> /// Initializes a new instance of the <see cref="GrampsStoreSerial"/> class. /// </summary> /// <param name="iocGVProgress"> /// The ioc gv progress. /// </param> /// <param name="iocGVLogging"> /// The ioc gv logging. /// </param> public GrampsStoreSerial(ICommonLogging iocGVLogging) { // save injected references for later localGVLogging = iocGVLogging; }
/// <summary> /// Initializes a new instance of the <see cref="BaseViewModel"/> class. Initializes the /// specified ioc common logging. /// </summary> /// <param name="iocCommonLogging"> /// The ioc common logging. /// </param> /// <param name="iocEventAggregator"> /// The ioc event aggregator. /// </param> public ViewModelBase(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) { BaseCL = iocCommonLogging; BaseEventAggregator = iocEventAggregator; BaseNavigationService = iocNavigationService; }
public CommonLogPrism(ICommonLogging iocCommonLogging) { Logger = iocCommonLogging; }
/// <summary> /// Initializes a new instance of the <see cref="AddressDetailViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The common logging service. /// </param> public AddressDetailViewModel(ICommonLogging iocCommonLogging) : base(iocCommonLogging) { BaseTitle = "Address Detail"; BaseTitleIcon = CommonConstants.IconAddress; }
/// <summary> /// Initializes a new instance of the <see cref="MediaDataView"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The ioc common logging. /// </param> /// <param name="iocCommonProgress"> /// The ioc common progress. /// </param> public MediaDataView(ICommonLogging iocCommonLogging) { localCL = iocCommonLogging; }
/// <summary> /// Initializes a new instance of the <see cref="EventListViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The common logging. /// </param> /// <param name="iocEventAggregator"> /// The event aggregator. /// </param> /// <param name="iocNavigationService"> /// Prism Navigation Service. /// </param> public PersonBirthdayViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { BaseTitle = "Person Birthday List"; BaseTitleIcon = CommonConstants.IconPeopleBirthday; }
/// <summary> /// Initializes a new instance of the <see cref="FamilyListViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The common logging. /// </param> /// <param name="iocEventAggregator"> /// The event aggregator. /// </param> /// <param name="iocNavigationService"> /// Injected Navigation Service. /// </param> public FamilyListViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { BaseTitle = "Family List"; BaseTitleIcon = CommonConstants.IconFamilies; }
public MainPageViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService, FirstRunDisplayService iocFirstRunDisplayService, WhatsNewDisplayService iocWhatsNewDisplayService, DatabaseReloadDisplayService iocDatabaseReloadDisplayService, IDialogService dialogService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { localWhatsNewDisplayService = iocWhatsNewDisplayService; localFirstRunDisplayService = iocFirstRunDisplayService; localDatabaseReloadDisplayService = iocDatabaseReloadDisplayService; _dialogService = dialogService; BaseEventAggregator.GetEvent <AppStartFirstRunEvent>().Subscribe(ServiceFirstRun, ThreadOption.UIThread); BaseEventAggregator.GetEvent <AppStartLoadDataEvent>().Subscribe(ServiceLoadData, ThreadOption.UIThread); BaseEventAggregator.GetEvent <AppStartReloadDatabaseEvent>().Subscribe(ServiceReloadDatabase, ThreadOption.UIThread); BaseEventAggregator.GetEvent <AppStartWhatsNewEvent>().Subscribe(ServiceWhatsNew, ThreadOption.UIThread); BaseEventAggregator.GetEvent <DataLoadCompleteEvent>().Subscribe(LoadHubPage, ThreadOption.UIThread); BaseEventAggregator.GetEvent <DialogBoxEvent>().Subscribe(ActionDialog, ThreadOption.UIThread); BaseEventAggregator.GetEvent <PageNavigateEvent>().Subscribe(OnNavigateCommandExecuted, ThreadOption.UIThread); BaseEventAggregator.GetEvent <PageNavigateParmsEvent>().Subscribe(OnNavigateParmsCommandExecuted, ThreadOption.UIThread); // Build the Menu NavigateCommand = new DelegateCommand <string>(OnNavigateCommandExecuted); MainMenuItems = new List <MainMenuItem>() { new MainMenuItem() { Title = "Hub", Icon = CommonConstants.IconHub, TargetType = nameof(HubPage) }, new MainMenuItem() { Title = "Bookmarks", Icon = CommonConstants.IconBookMark, TargetType = nameof(BookMarkListPage) }, new MainMenuItem() { Title = "Citations", Icon = CommonConstants.IconCitation, TargetType = nameof(CitationListPage) }, new MainMenuItem() { Title = "Events", Icon = CommonConstants.IconEvents, TargetType = nameof(EventListPage) }, new MainMenuItem() { Title = "Families", Icon = CommonConstants.IconFamilies, TargetType = nameof(FamilyListPage) }, new MainMenuItem() { Title = "Media", Icon = CommonConstants.IconMedia, TargetType = nameof(MediaListPage) }, new MainMenuItem() { Title = "Notes", Icon = CommonConstants.IconNotes, TargetType = nameof(NoteListPage) }, new MainMenuItem() { Title = "People", Icon = CommonConstants.IconPeople, TargetType = nameof(PersonListPage) }, new MainMenuItem() { Title = "Places", Icon = CommonConstants.IconPlace, TargetType = nameof(PlaceListPage) }, new MainMenuItem() { Title = "Repositories", Icon = CommonConstants.IconRepository, TargetType = nameof(RepositoryListPage) }, new MainMenuItem() { Title = "Sources", Icon = CommonConstants.IconSource, TargetType = nameof(SourceListPage) }, new MainMenuItem() { Title = "Tags", Icon = CommonConstants.IconTag, TargetType = nameof(TagListPage) }, //<!-- // new NavigationViewItemSeparator // { // }, //--> new MainMenuItem() { Title = "PeopleGraph", Icon = CommonConstants.IconPeopleGraph, TargetType = nameof(PeopleGraphPage) }, //<!-- // new NavigationViewItemSeparator // { // }, //--> new MainMenuItem() { Title = "Search", Icon = CommonConstants.IconSearch, TargetType = nameof(SearchPage) }, new MainMenuItem() { Title = "Choose data file", Icon = CommonConstants.IconChooseDataFile, TargetType = nameof(FileInputHandlerPage) }, new MainMenuItem() { Title = "Settings", Icon = CommonConstants.IconSettings, TargetType = nameof(SettingsPage) }, new MainMenuItem() { Title = "About", Icon = CommonConstants.IconAbout, TargetType = nameof(AboutPage) }, }; }
/// <summary> /// Initializes a new instance of the <see cref="AddressDetailViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The common logging service. /// </param> public PersonNameDetailViewModel(ICommonLogging iocCommonLogging) : base(iocCommonLogging) { BaseTitle = "Name Detail"; BaseTitleIcon = CommonConstants.IconPersonName; }
/// <summary> /// Initializes a new instance of the <see cref="RepositoryListViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The Common Logger /// </param> /// <param name="iocEventAggregator"> /// The ioc event aggregator. /// </param> /// <param name="iocNavigationService"> /// The ioc navigation service. /// </param> public RepositoryListViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { BaseTitle = "Repository List"; BaseTitleIcon = CommonConstants.IconRepository; }
//private IHLinkMediaModel _MediaCard = new HLinkMediaModel(); /// <summary> /// Initializes a new instance of the <see cref="HubViewModel"/> class. /// </summary> /// <param name="iocCommonLogging"> /// The ioc common logging. /// </param> /// <param name="iocEventAggregator"> /// The ioc event aggregator. /// </param> /// <param name="iocNavigationService"> /// </param> public HubViewModel(ICommonLogging iocCommonLogging, IEventAggregator iocEventAggregator, INavigationService iocNavigationService) : base(iocCommonLogging, iocEventAggregator, iocNavigationService) { BaseTitle = "Hub"; BaseTitleIcon = CommonConstants.IconHub; }