示例#1
0
        protected override void OnAppearing()
        {
            Analytics.TrackPage(Analytics.PAGE_PROFILE);

            btnProfileEdit.Image   = Localization.btn_profile_edit;
            btnProfileCreate.Image = Localization.btn_profile_create;
        }
示例#2
0
        protected override void OnAppearing()
        {
            base.OnAppearing();

            Debug.LogToFileMethod();
            Analytics.TrackPage(Analytics.PAGE_PURCHASE);
            AppStore.Instance.SetListener(this);
        }
示例#3
0
        public OverlayPurchase(RelativeLayout parentLayout) : base(parentLayout)
        {
            Debug.LogToFileMethod();
            Analytics.TrackPage(Analytics.PAGE_PURCHASE);

            // shadow to darken display
            imgOverlay               = new Image();
            imgOverlay.Source        = "@drawable/ovr_shadow.png";
            imgOverlay.SizeChanged  += OnLayoutSizeChanged;
            imgOverlay.Aspect        = Aspect.Fill;
            imgOverlay.WidthRequest  = layout.Width;
            imgOverlay.HeightRequest = layout.Height;

            // app store button message
            imgMessage              = new Image();
            imgMessage.Source       = Localization.ovr_purchase;
            imgMessage.SizeChanged += OnLayoutSizeChanged;

            // app store button
            btnAppStore              = new TransparentButton();
            btnAppStore.SizeChanged += OnLayoutSizeChanged;
            btnAppStore.Clicked     += OnAppStoreClicked;

            // on touch outside app store button -> cancel
            tgrCancel         = new TapGestureRecognizer();
            tgrCancel.Tapped += OnCancelTapped;
            imgOverlay.GestureRecognizers.Add(tgrCancel);
            imgMessage.GestureRecognizers.Add(tgrCancel);

            layout.Children.Add
            (
                imgOverlay,
                Constraint.RelativeToParent(parent => parent.Width * 0.5 - imgOverlay.Width * 0.5),
                Constraint.RelativeToParent(parent => parent.Height * 0.5 - imgOverlay.Height * 0.5)
            );

            layout.Children.Add
            (
                imgMessage,
                Constraint.RelativeToParent(parent => parent.Width * 0.5 - imgMessage.Width * 0.5),
                Constraint.RelativeToParent(parent => parent.Height * 0.5 - imgMessage.Height * 0.5)
            );

            layout.Children.Add
            (
                btnAppStore,
                Constraint.RelativeToView(imgMessage, (parent, view) => view.X + view.Width * 0.25),
                Constraint.RelativeToView(imgMessage, (parent, view) => view.Y + view.Height * 0.75),
                Constraint.RelativeToView(imgMessage, (parent, view) => view.Width * 0.5),
                Constraint.RelativeToView(imgMessage, (parent, view) => view.Height * 0.25)
            );
        }
        protected override void OnAppearing()
        {
            Analytics.TrackPage(Analytics.PAGE_RUNADJUST);

            Device.StartTimer(TimeSpan.FromMilliseconds(50), () => // Focus() is not reliable if called immediately
            {
                if (isPinAccepted == false)
                {
                    entry.Focus(); // pop up soft keyboard to enter pin
                }
                return(false);     // stop timer
            });
        }
        void OnEntryComplete(object sender, EventArgs args) // check pin entry
        {
            try
            {
                int i = int.Parse(entry.Text, CultureInfo.InvariantCulture);

                if (i == (label.FontSize + 3) * 100 + (label.FontSize + 7)) // = 4347 = hex ascii = 0x43 0x47 = C G = Cem Gumus
                {
                    isPinAccepted = true;                                   // remember access to calibration access for the lifetime of this app running
                    Config.EnableCalibrationMode();                         // show additional labels in PageResult and LivePeakA in PageRun
                    ClearLayoutLocked();                                    // disable pin entry
                    ShowLayoutUnLocked();                                   // enable protected calibration access

                    Analytics.TrackPage(Analytics.PAGE_RUNADJUST_EDIT);
                }
            }
            catch (Exception e)
            {
                Debug.LogToFileMethod(e.ToString());
            }
        }
示例#6
0
        protected override void OnAppearing()
        {
            base.OnAppearing();
            Analytics.TrackPage(Analytics.PAGE_RUN);

            isRunning        = true; // workaround for xamarin.com Bug 35407 - jobject muste not be IntPtr.Zero with Animation
            isLaunchDetected = false;
            isGpsOk          = false;
            isUnitKmh        = Settings.IsSpeedUnitKph();
            settleCounter    = SETTLE_COUNT_LIMIT;
            timeStampLastGps = DateTime.Now.Ticks;
            runAdjust        = new RunAdjust();
            runData          = new RunData(runModeProvider.Mode);

            Debug.LogToFile(runModeProvider.ToString());

            Device.StartTimer(TimeSpan.FromMilliseconds(SPEEDO_UPDATE_RATE_MS), OnTimer);

            gpsProvider.SetListener(this);
            accelerometerProvider.SetListener(this);
        }
示例#7
0
        protected override void OnAppearing()
        {
            base.OnAppearing();
            Debug.LogToFileMethod();
            Analytics.TrackPage(Analytics.PAGE_MAIN);

            InitState();
            ApplyCalibration(false); // but do not log details to file

            if (gpsProvider != null)
            {
                gpsProvider.SetListener(this);
            }

            if (accelerometerProvider != null)
            {
                // register for launch detection event
                accelerometerProvider.SetListener(this);
            }

            isRunning        = true;
            timeStampLastGps = DateTime.Now.Ticks;
            Device.StartTimer(TimeSpan.FromMilliseconds(CONDITION_UPDATE_RATE_MS), OnTimer);
        }
示例#8
0
 protected override void OnAppearing()
 {
     Analytics.TrackPage(Analytics.PAGE_HELP);
 }
 protected override void OnAppearing()
 {
     Analytics.TrackPage(Analytics.PAGE_CALIBRATION);
 }
 protected override void OnAppearing()
 {
     Analytics.TrackPage(Analytics.PAGE_PROFILE_EDIT);
 }
示例#11
0
 protected override void OnAppearing()
 {
     Analytics.TrackPage(Analytics.PAGE_TIPOFDAY);
 }