public result() { App app = Application.Current as App; if (app.DRs != null) { this.DRs = app.DRs; } else { this.DRs = new Data_Result(); app.DRs = this.DRs; } InitializeComponent(); }
private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e) { App app = Application.Current as App; if (app.DRs != null) { this.DRs = app.DRs; } int rid = this.DRs.rid; int sid = this.DRs.sid; this.textRoute.Text = DRs.routes[rid].details[sid].from+"→"+ DRs.routes[rid].details[sid].to; this.subroutelist.ItemsSource = this.DRs.routes[rid].details[sid].subSections; this.tollsList.ItemsSource = this.DRs.routes[rid].details[sid].tolls; }