public void LoadEntries() { if (IsDataLoaded) { return; } IsDataLoaded = true; AppSettingListener commonSetting = new AppSettingListener("NormalSettingPageTitle"); commonSetting.ObjectListenTo = AppSetting; commonSetting.NavigateUri = ViewPath.SettingPages.CommonSettingPage; commonSetting.RegisterObjectPropertyChanged((o, f) => { return AppResources.AppSettingTitle_Common.FormatWith( o.CurrencyInfo.CurrencyNameWithSymbol, o.ShowAssociatedAccountItemSummary.ToLocalizedOnOffValue()); }, "DisplayLanguage", "DefaultCurrency", "ShowAssociatedAccountItemSummary") .NotifyFormat(); var currencyRateSettingPage = new AppSettingListener("CurrencySetting"); currencyRateSettingPage.ObjectListenTo = AppSetting; currencyRateSettingPage.NavigateUri = ViewPath.SettingPages.CurrencyRateSettingPage; currencyRateSettingPage.RegisterObjectPropertyChanged((o, e) => { return AppResources.CurrencyRateTable_LastSyncTime .FormatWith(ApplicationHelper.LastSyncAtString); }, "DisplayLanguage", "LastSyncAtString") .NotifyFormat(); var dataSettingPage = new AppSettingListener("AppUpdating"); dataSettingPage.ObjectListenTo = AppSetting; dataSettingPage.NavigateUri = ViewPath.SettingPages.DataSettingPage; dataSettingPage.RegisterObjectPropertyChanged((o, e) => { return "{0}: {1}" .FormatWith(AppResources.AutoBackupWhenAppUp, o.AutoBackupWhenAppUp.ToLocalizedOnOffValue()); }, "DisplayLanguage", "AutoBackupWhenAppUp") .NotifyFormat(); TwoLineListerner<Data.Model.IPAddress> dataSyncing = new TwoLineListerner<Data.Model.IPAddress>("DataSynchronization"); dataSyncing.ObjectListenTo = AppSetting.ServerSyncIPAddress; dataSyncing.NavigateUri = ViewPath.SettingPages.DataSyncingSettingPage; dataSyncing.RegisterObjectPropertyChanged((o, e) => { return AppResources.DataSyncing_SecondTitleFormatter .FormatWith(o.HttpAddress.DefaultIfNull(AppResources.NeverSync)); }, "Address", "DisplayLanguage") .NotifyFormat(); var profileSetting = new AppSettingListener("ProfileSetting"); profileSetting.ObjectListenTo = AppSetting; profileSetting.NavigateUri = ViewPath.SettingPages.ProfileSettingPage; profileSetting.RegisterObjectPropertyChanged((o, e) => { return AppResources.ProfileSetting_SecondFormatter.FormatWith( new CultureInfo(o.DisplayLanguage).NativeName, o.EnablePoketLock.ToLocalizedOnOffValue()); }, "DisplayLanguage", "EnablePoketLock") .NotifyFormat(); var preferenceSetting = new AppSettingListener("PreferenceSetting"); preferenceSetting.ObjectListenTo = AppSetting; preferenceSetting.NavigateUri = ViewPath.SettingPages.PreferenceSettingPage; preferenceSetting.RegisterObjectPropertyChanged((o, e) => { return AppResources.PreferenceSetting_SecondTitleFormatter; }, "DisplayLanguage") .NotifyFormat(); var budgetAndStasticsSettings = new AppSettingListener("BudgetStaticDateRange"); budgetAndStasticsSettings.ObjectListenTo = AppSetting; budgetAndStasticsSettings.NavigateUri = ViewPath.SettingPages.BudgetAndStasticsSettingsPage; budgetAndStasticsSettings.RegisterObjectPropertyChanged((o, e) => { return LocalizedStrings.GetLanguageInfoByKey(AppSetting.Instance.BudgetStatsicSettings.BudgetStatsicMode.ToString()); }, "DisplayLanguage", "BudgetStatsicMode") .NotifyFormat(); var scheduleManagerSetting = new AppSettingListener("ScheduleManagerSetting"); scheduleManagerSetting.ObjectListenTo = AppSetting; scheduleManagerSetting.NavigateUri = ViewPath.SettingPages.ScheduleManagerSettingPage; scheduleManagerSetting.RegisterObjectPropertyChanged((o, e) => { return AppResources.ScheduleManagerSetting_Tips; }, "DisplayLanguage") .NotifyFormat(); var voiceCommandSettings = new AppSettingListener("VoiceCommandSetting"); voiceCommandSettings.ObjectListenTo = AppSetting; voiceCommandSettings.NavigateUri = ViewPath.SettingPages.VoiceCommandSettingsPaga; voiceCommandSettings.RegisterObjectPropertyChanged((o, e) => { return AppResources.VoiceCommandSetting; }, "DisplayLanguage") .NotifyFormat(); //var tileSettingPage = new AppSettingListener("Tile Setting"); //tileSettingPage.ObjectListenTo = AppSetting; //tileSettingPage.NavigateUri = ViewPath.SettingPages.TileSettingPage; //tileSettingPage.RegisterObjectPropertyChanged((o, e) => //{ // return AppResources.ScheduleManagerSetting_Tips; //}, "DisplayLanguage") // .NotifyFormat(); this.SettingEnteries.AddRange( commonSetting, currencyRateSettingPage, dataSettingPage, preferenceSetting, budgetAndStasticsSettings, dataSyncing, //tileSettingPage, scheduleManagerSetting, voiceCommandSettings, profileSetting); }
public void LoadEntries() { if (IsDataLoaded) { return; } IsDataLoaded = true; AppSettingListener commonSetting = new AppSettingListener("NormalSettingPageTitle"); commonSetting.ObjectListenTo = AppSetting; commonSetting.NavigateUri = ViewPath.SettingPages.CommonSettingPage; commonSetting.RegisterObjectPropertyChanged((o, f) => { return AppResources.AppSettingTitle_Common.FormatWith( o.CurrencyInfo.CurrencyNameWithSymbol, o.ShowAssociatedAccountItemSummary.ToLocalizedOnOffValue()); }, "DisplayLanguage", "DefaultCurrency", "ShowAssociatedAccountItemSummary") .NotifyFormat(); var currencyRateSettingPage = new AppSettingListener("CurrencySetting"); currencyRateSettingPage.ObjectListenTo = AppSetting; currencyRateSettingPage.NavigateUri = ViewPath.SettingPages.CurrencyRateSettingPage; currencyRateSettingPage.RegisterObjectPropertyChanged((o, e) => { return AppResources.CurrencyRateTable_LastSyncTime .FormatWith(ApplicationHelper.LastSyncAtString); }, "DisplayLanguage", "LastSyncAtString") .NotifyFormat(); var dataSettingPage = new AppSettingListener("AppUpdating"); dataSettingPage.ObjectListenTo = AppSetting; dataSettingPage.NavigateUri = ViewPath.SettingPages.DataSettingPage; dataSettingPage.RegisterObjectPropertyChanged((o, e) => { return AppResources.AppUpdating_SecondTitleFormatter .FormatWith(o.SubscibeNotification.ToLocalizedOnOffValue()); }, "DisplayLanguage", "SubscibeNotificationTitle") .NotifyFormat(); TwoLineListerner<Data.Model.IPAddress> dataSyncing = new TwoLineListerner<Data.Model.IPAddress>("DataSynchronization"); dataSyncing.ObjectListenTo = AppSetting.ServerSyncIPAddress; dataSyncing.NavigateUri = ViewPath.SettingPages.DataSyncingSettingPage; dataSyncing.RegisterObjectPropertyChanged((o, e) => { return AppResources.DataSyncing_SecondTitleFormatter .FormatWith(o.HttpAddress.DefaultIfNull(AppResources.NeverSync)); }, "Address", "DisplayLanguage") .NotifyFormat(); var profileSetting = new AppSettingListener("ProfileSetting"); profileSetting.ObjectListenTo = AppSetting; profileSetting.NavigateUri = ViewPath.SettingPages.ProfileSettingPage; profileSetting.RegisterObjectPropertyChanged((o, e) => { return AppResources.ProfileSetting_SecondFormatter.FormatWith( new CultureInfo(o.DisplayLanguage).NativeName, o.EnablePoketLock.ToLocalizedOnOffValue()); }, "DisplayLanguage", "EnablePoketLock") .NotifyFormat(); var preferenceSetting = new AppSettingListener("PreferenceSetting"); preferenceSetting.ObjectListenTo = AppSetting; preferenceSetting.NavigateUri = ViewPath.SettingPages.PreferenceSettingPage; preferenceSetting.RegisterObjectPropertyChanged((o, e) => { return AppResources.PreferenceSetting_SecondTitleFormatter; }, "DisplayLanguage") .NotifyFormat(); var scheduleManagerSetting = new AppSettingListener("ScheduleManagerSetting"); scheduleManagerSetting.ObjectListenTo = AppSetting; scheduleManagerSetting.NavigateUri = ViewPath.SettingPages.ScheduleManagerSettingPage; scheduleManagerSetting.RegisterObjectPropertyChanged((o, e) => { return AppResources.ScheduleManagerSetting_Tips; }, "DisplayLanguage") .NotifyFormat(); this.SettingEnteries.AddRange( commonSetting, currencyRateSettingPage, dataSettingPage, preferenceSetting, dataSyncing, scheduleManagerSetting, profileSetting); }