private void Page_Loaded(object sender, RoutedEventArgs e) { customers = App._customers; if (customers == null) { customers = My_Storage.ReadXml <ObservableCollection <Customer> >("backup/Customers.xml"); MessageBox.Show("Your Customer data file name has been edited , a backup copy was reloaded"); } list_customers.ItemsSource = customers; }
private void Page_Loaded(object sender, RoutedEventArgs e) { bikes = App._bikes; if (bikes == null) { bikes = My_Storage.ReadXml <ObservableCollection <Bike> >("backup/Bikes.xml"); System.Windows.MessageBox.Show("Your Customer data file name has been edited , a backup copy was reloaded"); } listBox_bikes.ItemsSource = bikes; }