Exemplo n.º 1
0
 public MainWindow()
 {
     InitializeComponent();
     if (File.Exists("anime.xml"))
     {
         string text = File.ReadAllText("anime.xml");
         anime = (AnimeList)AnimeList.Deserialize(text, typeof(AnimeList));
     }
     else
     {
         anime = new AnimeList();
     }
     if (anime == null)
     {
         anime = new AnimeList();
     }
     dgAnime.ItemsSource = new ObservableCollection <AnimeToWatch>(anime.AllAnime);
 }