Exemplo n.º 1
0
 void UpdateContent()
 {
     PlayerSet.SaveState();
     listView.Items.Clear();
     foreach (Player p in PlayerSet.Set)
     {
         listView.Items.Add(p);
     }
 }
Exemplo n.º 2
0
 private void UpdateContent()
 {
     PlayerSet.SaveState();
     listView.Header = currentPlayer.Name + "'s Exclusions";
     listView.Items.Clear();
     foreach (string s in currentPlayer.Exclusions)
     {
         listView.Items.Add(s);
     }
 }
Exemplo n.º 3
0
        public static void LoadState()
        {
            var    localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
            object s             = localSettings.Values[typeof(PlayerSet).ToString()];

            if (s == null && !(s is string))
            {
                return;
            }

            string[]  ss  = (s as string).Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
            PlayerSet set = new PlayerSet();

            foreach (string p in ss)
            {
                set.Add(Player.LoadFromString(p));
            }
            PlayerSet.set = set;
        }
Exemplo n.º 4
0
 private void Page_Loaded(object sender, RoutedEventArgs e)
 {
     PlayerSet.LoadState();
     UpdateContent();
 }