Advertisement
Guest User

Form2 cs

a guest
Mar 30th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.IO;
  5. using System.Linq;
  6. using System.Runtime.InteropServices.WindowsRuntime;
  7. using System.Threading.Tasks;
  8. using Windows.ApplicationModel.Core;
  9. using Windows.Foundation;
  10. using Windows.Foundation.Collections;
  11. using Windows.UI.Core;
  12. using Windows.UI.ViewManagement;
  13. using Windows.UI.WindowManagement;
  14. using Windows.UI.Xaml;
  15. using Windows.UI.Xaml.Controls;
  16. using Windows.UI.Xaml.Controls.Primitives;
  17. using Windows.UI.Xaml.Data;
  18. using Windows.UI.Xaml.Hosting;
  19. using Windows.UI.Xaml.Input;
  20. using Windows.UI.Xaml.Media;
  21. using Windows.UI.Xaml.Media.Imaging;
  22. using Windows.UI.Xaml.Navigation;
  23.  
  24.  
  25. //Szablon elementu Pusta strona jest udokumentowany na stronie https://go.microsoft.com/fwlink/?LinkId=234238
  26.  
  27. namespace Nazwiska
  28. {
  29. /// <summary>
  30. /// Pusta strona, która może być używana samodzielnie lub do której można nawigować wewnątrz ramki.
  31. /// </summary>
  32. public sealed partial class Form2 : Page
  33. {
  34.  
  35. public Form2()
  36. {
  37. this.InitializeComponent();
  38. }
  39.  
  40. Osoba osoba;
  41. protected override void OnNavigatedTo(NavigationEventArgs e)
  42. {
  43. osoba = (Osoba)e.Parameter;
  44. base.OnNavigatedTo(e);
  45. ImieTxt.Text = osoba.Imie;
  46. NazwiskoTxt.Text = osoba.Nazwisko;
  47. AdresTxt.Text = osoba.Adres;
  48. Obrazek.Source = new BitmapImage(new Uri(osoba.Image));
  49. }
  50.  
  51.  
  52. private void dodajButton_Click(object sender, RoutedEventArgs e)
  53. {
  54.  
  55. }
  56.  
  57. private void edytujButton_Click(object sender, RoutedEventArgs e)
  58. {
  59. osoba.Imie = ImieTxt.Text;
  60. osoba.Nazwisko = NazwiskoTxt.Text;
  61. osoba.Adres = AdresTxt.Text;
  62. }
  63. private void powrocButton_Click(object sender, RoutedEventArgs e)
  64. {
  65.  
  66. }
  67. }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement