Esempio n. 1
0
    // 송신용 byte[] 형 데이터 획득
    public byte[] GetData()
    {
        CharacterSerializer serializer = new CharacterSerializer();

        serializer.Serialize(packet);
        return(serializer.GetSerializedData());
    }
        private void buttonAddMember_Click(object sender, RoutedEventArgs e)
        {
            MainPage.CHARACTERcurrent.Party.Add(new Character(MainPage.CHARACTERloaded.ID));

            CharacterSerializer.Serialize();

            LoadMembers();
        }
Esempio n. 3
0
        private async Task <bool> LoadCharacters()
        {
            CharacterSerializer.CharFolder = await Windows.Storage.ApplicationData.Current.LocalFolder.CreateFolderAsync("Appstate", Windows.Storage.CreationCollisionOption.OpenIfExists);

            await CharacterSerializer.Deserialize();

            UpdateLoadGrid();

            await CharacterSerializer.Serialize();

            return(true);
        }
        private async void Create()
        {
            Character character = new Character();

            character.ID = CharacterSerializer.GenerateID();

            CharacterSerializer.AddCharacterToSerializationList(character);
            await CharacterSerializer.Serialize();

            MainPage.MAINPAGE.SwitchCharacter(character);

            //System.Diagnostics.Debug.WriteLine("Created!");
        }
Esempio n. 5
0
        public async Task <bool> LoadMenu()
        {
            gridView.Visibility  = Visibility.Visible;
            gridFiles.Visibility = Visibility.Visible;

            await LoadCharacters();

            NavigationButton blank = new NavigationButton();

            blank.SetPageType(PageType.BLANK);
            ChangePage(blank);

            await CharacterSerializer.Serialize();

            return(true);
        }
Esempio n. 6
0
 private void textCampaign_LostFocus(object sender, RoutedEventArgs e)
 {
     MainPage.CHARACTERcurrent.Campaign = textCampaign.Text;
     CharacterSerializer.Serialize();
 }
Esempio n. 7
0
 private void textPlayer_LostFocus(object sender, RoutedEventArgs e)
 {
     MainPage.CHARACTERcurrent.Player = textPlayer.Text;
     CharacterSerializer.Serialize();
 }