Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. private void Application_Launching(object sender, LaunchingEventArgs e)
  2. {
  3.  
  4. IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
  5. List<MyConnection.locationList.locations> source = new List<MyConnection.locationList.locations>();
  6.  
  7. if (!settings.Contains("firstrun"))
  8. {
  9. source.Add(new MyConnection.locationList.locations("Dulles, VA"));
  10. source.Add(new MyConnection.locationList.locations("Dulles, VA (Q)"));
  11. }
  12. }
  13.  
  14. public locationList()
  15. {
  16. InitializeComponent();
  17.  
  18. List<locationSelectorClass.locationChoice<locations>> DataSource = locationSelectorClass.locationChoice<locations>.CreateGroups(source,
  19. System.Threading.Thread.CurrentThread.CurrentUICulture,
  20. (locations s) => { return s.LastName; }, true);
  21. }
  22.  
  23. public class locations
  24. {
  25. public string locName
  26. {
  27. get;
  28. set;
  29. }
  30.  
  31.  
  32. public locations(string locName)
  33. {
  34. this.locName = locName;
  35. }
  36. }
  37.  
  38. List<MyConnection.locationList.locations> source;
  39. private void Application_Launching(object sender, LaunchingEventArgs e)
  40. {
  41.  
  42. IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
  43. source = new List<MyConnection.locationList.locations>();
  44.  
  45. if (!settings.Contains("firstrun"))
  46. {
  47. source.Add(new MyConnection.locationList.locations("Dulles, VA"));
  48. source.Add(new MyConnection.locationList.locations("Dulles, VA (Q)"));
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement