Example #1
0
 public override void Start()
 {
     base.Start();
     profile = profileSettingService.GetProfile();
     if (Profile.DriverLicense != null)
     {
         driverLicense        = Profile.DriverLicense;
         SelectedVehicleClass = DriverLicense.VehicleClass;
         try
         {
             SelectedState = States.Find(state => state.Name + " " + state.Abbreviation == Profile.DriverLicense.State);
         }
         catch (NullReferenceException ex)
         {
             Debug.WriteLine(ex.Message);
             SelectedState = States[firstElement];
         }
     }
 }
Example #2
0
        public override void Start()
        {
            base.Start();

            var result = profileSettingService.GetProfile();

            if (result != null)
            {
                Profile = result;
            }
            try
            {
                SelectedState = States.Find(state => state.Name + " " + state.Abbreviation == Profile.State);
            }
            catch (NullReferenceException ex)
            {
                Debug.WriteLine(ex.Message);
                SelectedState = States[firstState];
            }
        }