public LoginPage() { this.InitializeComponent(); if (AppDataHelper.GetValue("uname") != null) { txt_UserName.Text = AppDataHelper.GetValue("uname") as string; } if (AppDataHelper.GetValue("upasswd") != null) { txt_Password.Password = AppDataHelper.GetValue("upasswd") as string; } if (AppDataHelper.GetValue("isauto") != null) { s_auto.IsChecked = Convert.ToBoolean(AppDataHelper.GetValue("isauto") as string); } if (AppDataHelper.GetValue("isrem") != null) { s_remember.IsChecked = Convert.ToBoolean(AppDataHelper.GetValue("isrem") as string); } if (s_auto.IsChecked == true) { beginLoading(); } var curView = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView(); curView.SetPreferredMinSize(new Windows.Foundation.Size(500, 630)); }
private void _loadSetting() { Pager.FontFamily = BookHelper.GetFont(AppDataHelper.GetValue("FontFamily", "方正启体简体")); Pager.CharacterSpacing = AppDataHelper.GetValue("CharacterSpacing", 300); Pager.LineHeight = AppDataHelper.GetValue <double>("LineHeight", 36); Pager.FontSize = AppDataHelper.GetValue <double>("FontSize", 30); Pager.Background = AppDataHelper.GetValue("Background", new SolidColorBrush(ColorHelper.GetColor("#FFE9FAFF"))); Pager.Foreground = AppDataHelper.GetValue("Background", new SolidColorBrush(ColorHelper.GetColor("#FF555555"))); Pager.SetProperty(); }
/// <summary> /// Migrates unused application data into their new alternatives if they exists. /// </summary> public static void Perform() { try { string topBarEnabled = "TopBarEnabled"; if (ApplicationData.Current.LocalSettings.Values.ContainsKey(topBarEnabled)) { AppDataHelper.TopBarVisibility = AppDataHelper.GetValue(true, topBarEnabled) ? UI.TopBarVisibility.Visible : UI.TopBarVisibility.AutoHide; ApplicationData.Current.LocalSettings.Values.Remove(topBarEnabled); } } catch { } }