Ejemplo n.º 1
0
        public void DeleteChar()
        {
            if (gridView.SelectedItem != null)
            {
                //Select by Character Indicated
                Character c = CharacterSerializer.FindCharacterByID(((LoadItem)gridView.SelectedItem).ID);

                CharacterSerializer.RemoveCharacterFromSerializationList(c);

                UpdateLoadGrid();
            }
            else
            {
                MessageDialog dialog = new MessageDialog("Select a character to delete.");
                dialog.ShowAsync();
            }
        }
Ejemplo n.º 2
0
        public void SwitchCharacter()
        {
            if (gridView.SelectedItem != null)
            {
                gridView.Visibility  = Visibility.Collapsed;
                gridFiles.Visibility = Visibility.Collapsed;

                //Select by Index
                //CHARACTER = CharacterSerializer.characters.Values.ElementAt(gridView.SelectedIndex);

                //Select by Character Indicated
                CHARACTERcurrent = CharacterSerializer.FindCharacterByID(((LoadItem)gridView.SelectedItem).ID);
                CHARACTERloaded  = CharacterSerializer.FindCharacterByID(((LoadItem)gridView.SelectedItem).ID);

                CharacterSerializer.CURRENTindex = CharacterSerializer.FindCharacterIndex(CHARACTERloaded);

                ChangePage(NavCharacter);
            }
        }