void SetupLearnMoreButton()
        {
            if (AppDelegate.ShouldOperateIn12_5Mode)
            {
                BoxView.Layer.CornerRadius    = 12;
                BoxView.Layer.BackgroundColor = ColorHelper.INFO_BUTTON_BACKGROUND.CGColor;
                BoxView.Layer.BorderWidth     = 1;
                BoxView.Layer.BorderColor     = ColorHelper.PRIMARY_COLOR.CGColor;
            }
            else
            {
                UIView stackView = BoxView.Subviews[0];
                stackView.Layer.CornerRadius    = 12;
                stackView.Layer.MasksToBounds   = true;
                stackView.Layer.BackgroundColor = ColorHelper.INFO_BUTTON_BACKGROUND.CGColor;
                stackView.Layer.BorderWidth     = 1;
                stackView.Layer.BorderColor     = ColorHelper.PRIMARY_COLOR.CGColor;
            }

            _learnMoreViewBtn = new UIButton
            {
                TranslatesAutoresizingMaskIntoConstraints = false,
                AccessibilityTraits = UIAccessibilityTrait.Link
            };
            StyleUtil.EmbedViewInsideButton(BoxView, _learnMoreViewBtn);
        }
        void SetupEncounterAndInfectedButtons()
        {
            MessageView.Subviews[0].Layer.CornerRadius        = 12;
            MessageView.Subviews[0].Layer.BorderWidth         = 1;
            MessageView.Subviews[0].Layer.BorderColor         = ColorHelper.PRIMARY_COLOR.CGColor;
            AreYouInfectetView.Subviews[0].Layer.CornerRadius = 12;
            AreYouInfectetView.Subviews[0].Layer.BorderWidth  = 1;
            AreYouInfectetView.Subviews[0].Layer.BorderColor  = ColorHelper.PRIMARY_COLOR.CGColor;

            MessageLbl.Font         = StyleUtil.Font(StyleUtil.FontType.FontBold, 18, 22);
            MessageLbl.Text         = InfectionStatusViewModel.INFECTION_STATUS_MESSAGE_HEADER_TEXT;
            NewRegistrationLbl.Font = StyleUtil.Font(StyleUtil.FontType.FontRegular, 14, 18);
            NewRegistrationLbl.Text = _viewModel.NewMessageSubheaderTxt;

            AreYouInfectetLbl.Font   = StyleUtil.Font(StyleUtil.FontType.FontBold, 18, 22);
            AreYouInfectetLbl.Text   = InfectionStatusViewModel.INFECTION_STATUS_REGISTRATION_HEADER_TEXT;
            LogInAndRegisterLbl.Font = StyleUtil.Font(StyleUtil.FontType.FontRegular, 14, 18);
            LogInAndRegisterLbl.Text = InfectionStatusViewModel.INFECTION_STATUS_REGISTRATION_SUBHEADER_TEXT;

            // We take the fairly complicated UIViews from the storyboard and embed them into UIButtons
            _messageViewBtn = new UIButton();
            _messageViewBtn.TranslatesAutoresizingMaskIntoConstraints = false;
            StyleUtil.EmbedViewInsideButton(MessageView, _messageViewBtn);

            _areYouInfectedBtn = new UIButton();
            _areYouInfectedBtn.TranslatesAutoresizingMaskIntoConstraints = false;
            StyleUtil.EmbedViewInsideButton(AreYouInfectetView, _areYouInfectedBtn);
        }
Esempio n. 3
0
 void SetupLearnMoreButton()
 {
     BoxView.Subviews[0].Layer.CornerRadius = 12;
     _learnMoreViewBtn = new UIButton();
     _learnMoreViewBtn.TranslatesAutoresizingMaskIntoConstraints = false;
     _learnMoreViewBtn.AccessibilityTraits = UIAccessibilityTrait.Link;
     StyleUtil.EmbedViewInsideButton(LearnMoreView, _learnMoreViewBtn);
 }