protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { try { StrCommonObject = NavigationContext.QueryString["common"]; ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); txtPoint.Text = "8.7"; ImgHeader.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/ScorePage/upperStrip")); ImgMain.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/ScorePage/mainBg")); Imgprogress.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/ScorePage/progressBg")); ImgQuote.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/ScorePage/getaquoteButton")); ImgblueLine.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/ScorePage/blueLine")); ImggreyLine1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/ScorePage/greyRoad")); Imgbubble1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/ScorePage/bubble")); txtBlue.Text = ""; ImggreenLine.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/ScorePage/greenLine")); ImggreyLine2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/ScorePage/greyRoad")); Imgbubble2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/ScorePage/bubble")); txtGreen.Text = ""; txtFalg1.Text = "Great driving.Save up to 20% off \n comprehensive car insurance"; txtFalg2.Text = "What does my score mean?"; txtFalg3.Text = "Existing car customer? Give us \n at renewal to claim your discount"; } catch { } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { try { StrCommonObject = NavigationContext.QueryString["common"]; ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); } catch { StrCommonObject = ""; } base.OnNavigatedTo(e); Imgbackground.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Help/helpFullCloudBg")); ImgHeader.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Quote/getaquoteStrip")); ImgProgressDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/progress")); ImgRecordDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/record")); ImgHelpDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/help")); ImgQuoteSelect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/quoteSelected")); TxtFirst.Text = "Default 5 star comprehensive car \n insurance from £198"; TxtSecond.Text = "That's what 10% of our customers paid."; TxtThird.Text = "If you want, get a car insurance quote now, but \nto get the Ageas Drive discount of up to 20%\n you'll need to keep going and complete those \n 150 miles"; ImgBtnQuote.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Quote/getaquoteButton")); }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { try { FromSplash = NavigationContext.QueryString["FromSplash"]; StrCommonObject = NavigationContext.QueryString["common"]; //Waypoints = new List<GeoCoordinate>() ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); } catch { FromSplash = ""; } if (FromSplash == "true") { System.Threading.Thread.Sleep(2000); NavigationContext.QueryString["FromSplash"] = ""; } base.OnNavigatedTo(e); txtHeader.Text = "Welcome to Ageas Driver ,we'd like to take a few contact details from u so we can email your progress while using the app."; txtFooter.Text = "Just so you know,we'll need some more personal details from you before we can provide you with a score and apply any discount you may have earned"; Imgbackground.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Registration/fullCloudBg")); ImgHeader.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Registration/wellcomeStrip")); ImgBtnSubmit.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Registration/submitButton")); ImgBtnSkip.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Registration/skipButton")); }
/// <summary> /// Constructor for the Application object. /// </summary> public App() { // Global handler for uncaught exceptions. UnhandledException += Application_UnhandledException; objclsCommon = new ClsCommon(); // Standard XAML initialization InitializeComponent(); // Phone-specific initialization InitializePhoneApplication(); // Language display initialization InitializeLanguage(); // Show graphics profiling information while debugging. if (Debugger.IsAttached) { // Display the current frame rate counters. Application.Current.Host.Settings.EnableFrameRateCounter = false; // Show the areas of the app that are being redrawn in each frame. //Application.Current.Host.Settings.EnableRedrawRegions = true; // Enable non-production analysis visualization mode, // which shows areas of a page that are handed off to GPU with a colored overlay. //Application.Current.Host.Settings.EnableCacheVisualization = true; // Prevent the screen from turning off while under the debugger by disabling // the application's idle detection. // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run // and consume battery power when the user is not using the phone. PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { try { StrCommonObject = NavigationContext.QueryString["common"]; //Waypoints = new List<GeoCoordinate>() ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); } catch { StrCommonObject = ""; } base.OnNavigatedTo(e); Imgbackground.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Help/helpFullCloudBg")); ImgHeader.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/help/helpFeedbackTopStrip")); ImgProgressDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/progress")); ImgRecordDeSelect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/record")); ImgHelpSelect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/helpSelected")); ImgQuoteDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/quote")); TxtFirst.Text = "Got a suggestion,or would like to \n report a problem?"; TxtSecond.Text = "We'd really appreciate hearing any \n thoughts you may have."; TxtThird.Text = "Use the button below to report an \n accident to us"; ImgEmail.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Help/emailUs")); ImgAccident.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Help/reportAccident")); }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { try { StrCommonObject = NavigationContext.QueryString["common"]; //Waypoints = new List<GeoCoordinate>() ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); txtPoint.Text = "8.7"; } catch { } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { //TxtPost.Text = "Well done,you handle those \n comer safely"; StrCommonObject = NavigationContext.QueryString["common"]; //Waypoints = new List<GeoCoordinate>() ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); base.OnNavigatedTo(e); TxtPost.Text = "I am using #AgeasDrive to try and \n save up to 20% on my comprehensive \n car insurance. You could too"; Txtlink.Text = " https://www.ageas.co.uk/"; }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { try { StrCommonObject = NavigationContext.QueryString["common"]; //Waypoints = new List<GeoCoordinate>() ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); ObjRootObjectJourney = JsonConvert.DeserializeObject<RootObjectJourney>(ObjCommon.JourneyDetails); } catch { StrCommonObject = ""; } base.OnNavigatedTo(e); Imgbackground.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/DetailsBg")); // ImgHeader.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/DetailsBg")); ImgMapSelect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/map")); ImgGraphDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/graph")); ImgDetailsDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/detailsActive")); ImgTblR0C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR0C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); ImgTblR1C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR1C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); ImgTblR2C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR2C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); ImgTblR3C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR3C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); ImgTblR4C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR4C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); ImgTblR5C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR5C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); ImgTblR6C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR6C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); TxtR0C2.Text = ObjRootObjectJourney.journey.date.ToString(); TxtR1C2.Text = ObjRootObjectJourney.journey.total_distance.ToString(); TxtR2C2.Text = ObjRootObjectJourney.journey.total_time.ToString(); TxtR3C2.Text = ObjRootObjectJourney.journey.max_velocity.ToString(); TxtR4C2.Text = ObjRootObjectJourney.journey.avg_velocity.ToString(); TxtR5C2.Text = ObjRootObjectJourney.journey.max_acceleration.ToString(); TxtR6C2.Text = ObjRootObjectJourney.journey.breaking.ToString(); //TxtFirst.Text = "Got a suggestion,or would like to \n report a problem?"; //TxtSecond.Text = "We'd really appreciate hearing any \n thoughts you may have."; //TxtThird.Text = "Use the button below to report an \n accident to us"; }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { try { StrCommonObject = NavigationContext.QueryString["common"]; //Waypoints = new List<GeoCoordinate>() ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); ObjRootObjectJourney = JsonConvert.DeserializeObject<RootObjectJourney>(ObjCommon.JourneyDetails); } catch { StrCommonObject = ""; } base.OnNavigatedTo(e); Imgbackground.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/DetailsBg")); ImgHeader.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/journeyTopStrip")); ImgBack.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/InnerTab/back")); ImgMapSelect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/InnerTab/map")); ImgGraphDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/InnerTab/graph")); ImgDetailsDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/InnerTab/detailsActive")); ImgTblR0C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR0C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); ImgTblR1C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR1C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); ImgTblR2C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR2C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); ImgTblR3C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR3C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); ImgTblR4C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR4C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); ImgTblR5C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR5C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); ImgTblR6C1.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/leftTd")); ImgTblR6C2.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Details/rightTd")); TxtR0C2.Text = ObjRootObjectJourney.journey.date.ToString(); TxtR1C2.Text = ObjRootObjectJourney.journey.total_distance.ToString() + " (mi)"; TxtR2C2.Text = String.Format("{00}", TimeSpan.FromMilliseconds(Convert.ToDouble(ObjRootObjectJourney.journey.total_time)).Hours.ToString()) + ":" + String.Format("{00}", TimeSpan.FromMilliseconds(Convert.ToDouble(ObjRootObjectJourney.journey.total_time)).Minutes.ToString()) + ":" + String.Format("{00}", TimeSpan.FromMilliseconds(Convert.ToDouble(ObjRootObjectJourney.journey.total_time)).Seconds.ToString()) + " (H:M:S)"; TxtR3C2.Text = ObjRootObjectJourney.journey.max_velocity.ToString() + " (mi/h)"; TxtR4C2.Text = ObjRootObjectJourney.journey.avg_velocity.ToString() + " (mi/h)"; TxtR5C2.Text = ObjRootObjectJourney.journey.max_acceleration.ToString() + " (ft/s²)"; TxtR6C2.Text = ObjRootObjectJourney.journey.breaking.ToString() + " (ft/s²)"; }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { try { StrCommonObject = NavigationContext.QueryString["common"]; ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); ObjRootObjectJourney = JsonConvert.DeserializeObject<RootObjectJourney>(ObjCommon.JourneyDetails); base.OnNavigatedTo(e); ImgHeader.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Graph/graphTopStrip")); ImgBack.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/InnerTab/back")); ImgMapDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/InnerTab/map")); ImgDetailsDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/InnerTab/details")); ImgGrapSelect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/InnerTab/graphActive")); ImgAccelerationDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/InnerTab/acceleration")); ImgVelocitySelect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/InnerTab/velocityActive")); } catch { } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { StrCommonObject = NavigationContext.QueryString["common"]; ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); base.OnNavigatedTo(e); TxtPost.Text = "I am using #AgeasDrive to try and \n save up to 20% on my comprehensive \n car insurance. You could too"; Txtlink.Text = " https://www.ageas.co.uk/"; if (isAlreadyLoggedIn()) { // userLoggedIn(); this.loginBrowserControl.Visibility = Visibility.Collapsed; VisibileControl(true); } else { VisibileControl(false); var requestTokenQuery = OAuthUtil.GetRequestTokenQuery(); requestTokenQuery.RequestAsync(AppSettings.RequestTokenUri, null); requestTokenQuery.QueryResponse += new EventHandler<WebQueryResponseEventArgs>(requestTokenQuery_QueryResponse); } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { try { base.OnNavigatedTo(e); imgBackground.Height = Application.Current.Host.Content.ActualHeight; imgBackground.Width = Application.Current.Host.Content.ActualWidth; imgBackground.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Splash/SplashPage")); objclsCommon = new ClsCommon(); objclsCommon.LoadSettings(); } catch { } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { try { StrCommonObject = NavigationContext.QueryString["common"]; //Waypoints = new List<GeoCoordinate>() ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); ObjRootObjectJourney = JsonConvert.DeserializeObject<RootObjectJourney>(ObjCommon.JourneyDetails); base.OnNavigatedTo(e); ImgMapSelect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/mapActive")); ImgGrapDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/graph")); ImgDetailsDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/details")); //ImgHeader.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/quote")); //getureR.touch = true; //cnvBackground.Visibility = Visibility.Visible; //progressBar1.Visibility = Visibility.Visible; } catch { } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { try { StrCommonObject = NavigationContext.QueryString["common"]; ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); base.OnNavigatedTo(e); ImgHeader.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Progress/upperStrip")); ImgProgressSelect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/progressSelected")); ImgRecordDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/record")); ImgHelpDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/help")); ImgQuoteDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/quote")); ImgProgress.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Progress/mainBg_progress1")); ImgProgressButtom.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Progress/mainBg_progress2")); txtprogressvalue.Text = "0.5"; //ObjCommon.TotalJourney = 152; if (ObjCommon != null) { ObjRootJouneyDtls = JsonConvert.DeserializeObject<RootObjectJourneydetail>(ObjCommon.JourneyListDetails); if (ObjCommon.TotalJourney < 51) { ImageBrush _ImageBrush = new ImageBrush(); _ImageBrush.ImageSource = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Progress/displayUnselected")); stackprogress.Background = _ImageBrush; _ImageBrush = null; } else if (ObjCommon.TotalJourney < 100) { ImageBrush _ImageBrush = new ImageBrush(); _ImageBrush.ImageSource = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Progress/display(50)")); stackprogress.Background = _ImageBrush; _ImageBrush = null; } else if (ObjCommon.TotalJourney < 150) { ImageBrush _ImageBrush = new ImageBrush(); _ImageBrush.ImageSource = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Progress/display(100)")); stackprogress.Background = _ImageBrush; _ImageBrush = null; } //else if (ObjCommon.TotalJourney >= 150) //{ // ImageBrush _ImageBrush = new ImageBrush(); // _ImageBrush.ImageSource = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Progress/display(150)")); // stackprogress.Background = _ImageBrush; // _ImageBrush = null; // StrCommonObject = JsonConvert.SerializeObject(ObjCommon); // NavigationService.Navigate(new Uri("/Pages/FrmScore.xaml?common=" + StrCommonObject, UriKind.Relative)); //} else { ImageBrush _ImageBrush = new ImageBrush(); _ImageBrush.ImageSource = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Progress/displayUnselected")); stackprogress.Background = _ImageBrush; _ImageBrush = null; } } TxtBudget.Text = "LATEST BUDGET EARNED!"; TxtBudgetDetails.Text = "Well done,you handle those \n comer safely"; TxtShare.Text = "Share with:"; TxtJourneyCmplt.Text = "JOURNEYS COMPLETED"; Imgfacebk.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Progress/facebookIcon")); Imgtwitter.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Progress/twitterIcon")); ImgTblHeader.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Progress/tableHeader")); objDBHelper = new ClsDBHelper.ClsDBHelper(); var context = new DataAccessLayer.AgeasDriverDetails(ClsDBHelper.ClsDBHelper.DBConnectionString); List<JourneyDetails> Journelist = (from a in context.tblJourneyDetails select a).ToList(); List<Journeydetail> databaseJlist = new List<Journeydetail>(); Journeydetail _Journey; for (int i = 0; i < Journelist.Count; i++) { _Journey = new Journeydetail(); _Journey.journey_id = Journelist[i].JourneyId.ToString(); _Journey.distance = Convert.ToDouble(Journelist[i].Last_distance.ToString("0.00")); _Journey.time = Journelist[i].TimeDuration.ToString(); _Journey.date = Journelist[i].JDate.ToString(); databaseJlist.Add(_Journey); _Journey = null; } lstjourneyList.ItemsSource = databaseJlist; if (Journelist.Count > 0) { TxtlatestdisValue.Text = Journelist[Journelist.Count - 1].Last_distance.ToString("0.00"); } } catch (Exception ex) { } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { try { try { StrCommonObject = NavigationContext.QueryString["common"]; //Waypoints = new List<GeoCoordinate>() ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); } catch { StrCommonObject = ""; } Imgbackground.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Record/mainBg")); ImgHeader.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Record/upperStrip")); ImgProgressDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/progress")); ImgRecordSelect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/recordSelected")); ImgHelpDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/help")); ImgQuoteDeselect.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/General/quote")); ImgGreen.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Record/greenlight")); ImgRed.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Record/Redlight")); ImgButton.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Record/startButton")); ImgLoader.Source = new System.Windows.Media.Imaging.BitmapImage(ClsCommon.GetScaledImageUri("/Images/Record/Progress_bg")); LoaderMsg.Text = "Oops, sorry your journey was less than 0.5 miles\n and not long enough to count. \n Please wait..."; progressBar1.Visibility = Visibility.Collapsed; IsFirst = false; if (StrCommonObject != "") { // JourneySave(); ObjCommon.JourneySave(); } } catch { } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { StrCommonObject = NavigationContext.QueryString["common"]; ObjCommon = JsonConvert.DeserializeObject<ClsCommon>(StrCommonObject); base.OnNavigatedTo(e); TxtPost.Text = "I am using #AgeasDrive to try and \n save up to 20% on my comprehensive \n car insurance. You could too"; Txtlink.Text = " https://www.ageas.co.uk/"; client = new FacebookClient(); client.PostCompleted += (o, args) => { if (args.Error != null) { var error = args.Error as FacebookApiException; if (error.ErrorCode == 190) { Dispatcher.BeginInvoke(() => MessageBox.Show("Authorization Error")); SaveToken(null); client.AccessToken = null; return; } Dispatcher.BeginInvoke(() => MessageBox.Show(error.Message)); return; } var result = (IDictionary<string, object>)args.GetResultData(); Dispatcher.BeginInvoke(() => { MessageBox.Show("Message posted successfully"); Browser.Visibility = System.Windows.Visibility.Collapsed; Deployment.Current.Dispatcher.BeginInvoke(() => { StrCommonObject = JsonConvert.SerializeObject(ObjCommon); NavigationService.Navigate(new Uri("/Pages/FrmProgress.xaml?common=" + StrCommonObject, UriKind.Relative)); }); }); }; if (GetToken() != null) client.AccessToken = GetToken(); InitializeComponent(); if (!NetworkInterface.GetIsNetworkAvailable()) { Dispatcher.BeginInvoke(() => { MessageBox.Show("No Internet Connection, Try again later"); }); return; } //If we already have an access token, then just post, otherwise move to the login page if (client.AccessToken == null) { var parameters = new Dictionary<string, object>(); parameters["client_id"] = FBApiID; parameters["redirect_uri"] = "https://www.facebook.com/connect/login_success.html"; parameters["response_type"] = "token"; parameters["display"] = "touch"; parameters["scope"] = ExtendedPermisions; Browser.Visibility = System.Windows.Visibility.Visible; string t = client.GetLoginUrl(parameters).AbsoluteUri; Browser.Navigate(client.GetLoginUrl(parameters)); } }