예제 #1
0
        public static void WriteContacBook(ContactBook contactBook)
        {
            var contactBookData =
                $"Full Name: {contactBook.FullName}\n" +
                $"Email: {contactBook.Email} \n" +
                $"Phone Number: {contactBook.PhoneNumber}\n" +
                $"Address: {contactBook.Address} \n";

            FileHelper.WriteTextFileAsync(TEXT_FILE_NAME, contactBookData);
        }
예제 #2
0
        private void Save_Click(object sender, RoutedEventArgs e)
        {
            var contactBook = new ContactBook
            {
                FullName    = fullName.Text,
                Email       = email.Text,
                PhoneNumber = phoneNumber.Text,
                Address     = address.Text,
                //ListBox = listBox.ItemeSources
            };

            ContactBook.WriteContacBook(contactBook);


            this.Frame.Navigate(typeof(AddContact));
        }
예제 #3
0
 private void show_Click(object sender, RoutedEventArgs e)
 {
     ContactBook.ReadContent();
 }