Ejemplo n.º 1
0
        public void preSetup()
        {
            //Enable app to run in the background detailedList
            PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode.Disabled;

            //Start the dispatch timer
            DispatcherTimer newTimer = new DispatcherTimer();

            // timer interval specified as 1 second
            newTimer.Interval = TimeSpan.FromSeconds(30);
            // Sub-routine OnTimerTick will be called at every 1 second
            newTimer.Tick += OnTimerTick;
            // starting the timer
            newTimer.Start();

            //set grapgh model
            areachart.DataContext = graphModel;

            //if true, internet is accessible.
            Debug.WriteLine(" internet access " + SystemEndPoints.isInternetOn().ToString());

            Debug.WriteLine(" airplane access " + SystemEndPoints.isAirplaneOn().ToString());

            Debug.WriteLine(" data access " + SystemEndPoints.isOverDataLimit().ToString());

            Debug.WriteLine(" number of  " + SystemEndPoints.countLastChargeFactors("all").ToString());

            if (appSettings.getSettingsBool(appSettings.AppRated))
            {
                rateMe.Text = "rate me";
            }

            if (appSettings.getSettingsBool(appSettings.ProEnabled))
            {
                goProButton.Visibility = System.Windows.Visibility.Collapsed;
            }
        }
Ejemplo n.º 2
0
        public void addBatteryStatus()
        {
            ViewModel batteryModel = new ViewModel();

            batteryModel.add(SystemEndPoints.currentBatteryLevel(), SystemEndPoints.isWifiOn(), SystemEndPoints.isPhoneOn(), SystemEndPoints.isLocationEnabled(), SystemEndPoints.isCharging(), SystemEndPoints.isAirplaneOn(), SystemEndPoints.isInternetOn(), SystemEndPoints.isOverDataLimit(), SystemEndPoints.isRoaming());

            Debug.WriteLine("Background");
        }