protected void ReportException(string errorMsg, Exception e) { Rock.Mobile.Threading.Util.PerformOnUIThread(delegate { FinishNotesCreation( ); // if we have more download attempts, use them before reporting // an error to the user. if (NoteDownloadRetries > 0) { NoteDownloadRetries--; PrepareCreateNotes( ); } else { if (e != null) { errorMsg += e.Message; } if (MobileApp.Shared.Network.RockLaunchData.Instance.Data.DeveloperModeEnabled == true) { Springboard.DisplayError("Note Error", errorMsg); } else { ResultView.Show(MessagesStrings.Error_Title, PrivateControlStylingConfig.Result_Symbol_Failed, MessagesStrings.Error_Message, GeneralStrings.Retry); } } }); }
bool CheckDebug( ) { bool debugKeyEntered = false; if (RequestText.Text.ToLower( ).Trim( ) == "clear cache") { debugKeyEntered = true; FileCache.Instance.CleanUp(true); Springboard.DisplayError("Cache Cleared", "All cached items have been deleted"); } else if (RequestText.Text.ToLower( ).Trim( ) == "developer") { debugKeyEntered = true; MobileApp.Shared.Network.RockLaunchData.Instance.Data.DeveloperModeEnabled = !MobileApp.Shared.Network.RockLaunchData.Instance.Data.DeveloperModeEnabled; Springboard.DisplayError("Developer Mode", string.Format("Developer Mode has been toggled: {0}", MobileApp.Shared.Network.RockLaunchData.Instance.Data.DeveloperModeEnabled == true ? "ON" : "OFF")); } else if (RequestText.Text.ToLower( ).Trim( ) == "version") { debugKeyEntered = true; Springboard.DisplayError("Current Version", GeneralConfig.Version.ToString( )); } else { // otherwise, see if our special UI caught it. debugKeyEntered = UISpecial.Trigger(RequestText.Text.ToLower( ).Trim( ), View, this, ParentTask, null); } return(debugKeyEntered); }
public override bool OnDoubleTap(MotionEvent e) { // a double tap CAN create a user note. If it did, // we want to know that so we suppress further input until we receive // TouchUp try { DidGestureCreateNote = Note.DidDoubleTap(new System.Drawing.PointF(e.GetX( ), e.GetY( ))); // if the gesture did create a note, flag that so we don't show the tutorial anymore. if (DidGestureCreateNote == true) { MobileApp.Shared.Network.RockMobileUser.Instance.UserNoteCreated = true; } } catch (Exception ex) { Springboard.DisplayError("Notes", ex.Message); DidGestureCreateNote = false; } return(true); }