// 송신용 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(); }
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!"); }
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); }
private void textCampaign_LostFocus(object sender, RoutedEventArgs e) { MainPage.CHARACTERcurrent.Campaign = textCampaign.Text; CharacterSerializer.Serialize(); }
private void textPlayer_LostFocus(object sender, RoutedEventArgs e) { MainPage.CHARACTERcurrent.Player = textPlayer.Text; CharacterSerializer.Serialize(); }