예제 #1
0
        /* ICallMeBackDelegate */

        public void ShowLegalConditions(CallMeBackView CallMeBackView)
        {
            Console.WriteLine("Show Legal Conditions");

            var AlertController = UIAlertController.Create("\n\n\n\n\n\n\n\n\n\n\n\n\n", "", UIAlertControllerStyle.ActionSheet);

            AlertController.View.Layer.CornerRadius = 15;
            AlertController.View.TintColor          = Colors.DarkPurple;
            Colorfull(AlertController);

            var LegalView = LegalConditionsView.Create();

            var Margin = 5;
            var Rect   = new CGRect(Margin, Margin, AlertController.View.Bounds.Size.Width - Margin * 2, AlertController.View.Bounds.Size.Height - Margin * 26);

            LegalView.Frame = Rect;
            AlertController.View.AddSubview(LegalView);

            var LanguageBundle = RetrieveLanguageBundle(LanguageHelper.Language);

            var AlertActionAccept = UIAlertAction.Create(LanguageBundle.LocalizedString("Accept", null), UIAlertActionStyle.Default, (obj) => this.callMeBackView.LegalConditionsChange(CallMeBackView, true));
            var AlertActionCancel = UIAlertAction.Create(LanguageBundle.LocalizedString("Cancel", null), UIAlertActionStyle.Cancel, (obj) => this.callMeBackView.LegalConditionsChange(CallMeBackView, false));

            AlertController.AddAction(AlertActionAccept);
            AlertController.AddAction(AlertActionCancel);

            if (AlertController.PopoverPresentationController != null)
            {
                AlertController.PopoverPresentationController.SourceView = CallMeBackView;
                AlertController.PopoverPresentationController.SourceRect = CallMeBackView.Bounds;
            }

            this.PresentViewController(AlertController, true, null);
        }
예제 #2
0
        public void LoadCallMeBackPopOver()
        {
            CallMeBackView.Delegate = this;

            var CmbView = CallMeBackView.Create();

            CmbView.Frame = callMeBackView.Bounds;
            callMeBackView.AddSubview(CmbView);
        }
예제 #3
0
        public void ShowAlertLegalNotAccepted(CallMeBackView CallMeBackView, string Title, string Message)
        {
            Console.WriteLine("Show Alert Legal Not Accepted");

            var AlertController = UIAlertController.Create(Title, Message, UIAlertControllerStyle.Alert);

            AlertController.View.TintColor = Colors.DarkPurple;
            AlertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Default, null));
            Colorfull(AlertController);
            this.PresentViewController(AlertController, true, null);
        }
 internal void LegalConditionsChange(CallMeBackView View, bool IsAccepted)
 {
     View.LegalSwitch.On = IsAccepted;
 }
 static void ShowAlertLegalNotAccepted(CallMeBackView View, string Title, string Message)
 {
     Delegate.ShowAlertLegalNotAccepted(View, Title, Message);
 }
 static void ShowLegalConditions(CallMeBackView View)
 {
     Delegate.ShowLegalConditions(View);
 }