void ReleaseDesignerOutlets() { if (BackButton != null) { BackButton.Dispose(); BackButton = null; } if (BottomStackView != null) { BottomStackView.Dispose(); BottomStackView = null; } if (DeleteBtnWidthConstraint != null) { DeleteBtnWidthConstraint.Dispose(); DeleteBtnWidthConstraint = null; } if (DeleteConsentBtn != null) { DeleteConsentBtn.Dispose(); DeleteConsentBtn = null; } if (LabelStackView != null) { LabelStackView.Dispose(); LabelStackView = null; } if (PageTitle != null) { PageTitle.Dispose(); PageTitle = null; } if (ScrollView != null) { ScrollView.Dispose(); ScrollView = null; } if (TitleStackView != null) { TitleStackView.Dispose(); TitleStackView = null; } }
void DeleteWarningOKBtnTapped(UIAlertAction obj) { DeleteBtnWidthConstraint.Constant = DeleteConsentBtn.Frame.Width; DeleteBtnWidthConstraint.Active = true; DeleteConsentBtn.SetTitle(string.Empty, UIControlState.Normal); UIActivityIndicatorView spinner = ShowSpinner(); DeviceUtils.StopScanServices(); DeviceUtils.CleanDataFromDevice(); spinner.StopAnimating(); spinner.RemoveFromSuperview(); DeleteConsentBtn.SetTitle(ConsentViewModel.WITHDRAW_CONSENT_BUTTON_TEXT, UIControlState.Normal); DeleteBtnWidthConstraint.Active = false; // Show a dialog without any buttons, that way forcing the user to quit the app. UIAlertController controller = UIAlertController.Create( ConsentViewModel.WITHDRAW_CONSENT_SUCCESS_TITLE, ConsentViewModel.WITHDRAW_CONSENT_SUCCESS_TEXT, UIAlertControllerStyle.Alert); PresentViewController(controller, true, null); }