예제 #1
0
 public MainPage.People GetNewPerson()
 {
     MainPage.People newPerson = new MainPage.People
     {
         DisplayName = DisplayName1.Text,
         FirstName   = First_Name1.Text,
         LastName    = Last_Name1.Text,
         Hired       = Date_Hired.Date,
         IsOperator  = OpCheck1.IsChecked
     };
     return(newPerson);
 }
예제 #2
0
        private async void AddPerson(object sender, RoutedEventArgs e)
        {
            AddDialog           addPerson = new AddDialog();
            ContentDialogResult result    = await addPerson.ShowAsync();

            if (result == ContentDialogResult.Primary)
            {
                MainPage.People newPerson = addPerson.GetNewPerson();
                LittleList.Add(newPerson);
                PeopleList.Clear();
                Updater();
            }
        }