Example #1
0
        //void SetUpWindowSize(CGSize toSize, CGRect newBounds)
        //{
        //	//CGSize newSizeForScroll;

        //	//if (toSize.Width > toSize.Height)// landscape
        //	//{
        //	//	newSizeForScroll = new CGSize(toSize.Width, toSize.Width);
        //	//	ScrollView.ContentSize = newSizeForScroll;
        //	//}
        //	//else // portrait
        //	//{
        //	//	newSizeForScroll = new CGSize(toSize.Width, toSize.Height);
        //	//}

        //	//MainImageView.Frame = new CGRect(0, 0, newSizeForScroll.Width, newSizeForScroll.Height);
        //	////MainImageView.Bounds = new CGRect(0, 0, toSize.Width, toSize.Height);;
        //	//ScrollView.Frame = newBounds;
        //	//ScrollView.ContentSize = newSizeForScroll;
        //}

        partial void ReportingEnabledChanged(UISwitch sender)
        {
            // user changes reporting pref - update settings
            _watchTowerSettings.SaveReportLocationPreference(sender.On);

            if (sender.On)
            {
                Manager.ResumePostingLocation();
            }
            else
            {
                Manager.StopPostingLocation();
            }

            SetReportLocationTextAppearance();
        }
        /// <summary>
        /// Handles the report location toggle.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">E.</param>
        void HandleReportLocationToggle(object sender, EventArgs e)
        {
            // New value is opposite of what it was
            bool bNewReportLocationPreference = !_watchTowerSettings.bReportLocation;

            SetReportLocationBackgroundColor(bNewReportLocationPreference);

            // user changes reporting pref - update settings
            _watchTowerSettings.SaveReportLocationPreference(bNewReportLocationPreference);

            if (_watchTowerSettings.bReportLocation)
            {
                _locationManager.ResumePostingLocation();
            }
            else
            {
                _locationManager.StopPostingLocation();
            }
        }