Beispiel #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);
        }
Beispiel #2
0
        /* Private methods */

        static void LoadWebScreenlet(LegalConditionsView View)
        {
            var Url = LanguageHelper.Url(LanguageHelper.Pages.Legal);

            var Configuration = new WebScreenletConfigurationBuilder(Url)
                                .SetWithWebType(WebType.Other)
                                .AddJsWithLocalFile("js/legal_js")
                                .AddCssWithLocalFile("css/legal_css")
                                .Load();

            View.WebScreenlet.ThemeName     = "andorra";
            View.WebScreenlet.Configuration = Configuration;
            View.WebScreenlet.Load();
        }