Пример #1
0
 public void Destroy( )
 {
     // free image resources for Android's sake.
     FamilyImage.Destroy( );
     GroupImage.Destroy( );
 }
Пример #2
0
        public void Create(object masterView, RectangleF frame, OnButtonClick onJoinClicked)
        {
            OnButtonClicked = onJoinClicked;

            View = PlatformView.Create( );
            View.BackgroundColor = ControlStylingConfig.BackgroundColor;
            View.AddAsSubview(masterView);

            // Group Title
            GroupTitle = PlatformLabel.Create( );
            GroupTitle.AddAsSubview(masterView);
            GroupTitle.SetFont(ControlStylingConfig.Font_Bold, ControlStylingConfig.Large_FontSize);
            GroupTitle.TextColor     = ControlStylingConfig.TextField_ActiveTextColor;
            GroupTitle.TextAlignment = TextAlignment.Center;

            // Meeting Time
            MeetingTime = PlatformLabel.Create( );
            MeetingTime.AddAsSubview(masterView);
            MeetingTime.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Medium_FontSize);
            MeetingTime.TextColor     = ControlStylingConfig.TextField_ActiveTextColor;
            MeetingTime.TextAlignment = TextAlignment.Center;

            // Childcare Provided
            ChildcareProvided = PlatformLabel.Create( );
            ChildcareProvided.AddAsSubview(masterView);
            ChildcareProvided.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Medium_FontSize);
            ChildcareProvided.TextColor     = ControlStylingConfig.TextField_ActiveTextColor;
            ChildcareProvided.TextAlignment = TextAlignment.Center;

            // Young Adults
            YoungAdults = PlatformLabel.Create( );
            YoungAdults.AddAsSubview(masterView);
            YoungAdults.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Medium_FontSize);
            YoungAdults.TextColor     = ControlStylingConfig.TextField_ActiveTextColor;
            YoungAdults.TextAlignment = TextAlignment.Center;



            // Family Image and Layer
            FamilyImageLayer = PlatformView.Create( );
            FamilyImageLayer.AddAsSubview(masterView);
            FamilyImageLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            FamilyImageLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            FamilyImageLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            FamilyImage = PlatformImageView.Create( );
            FamilyImage.AddAsSubview(masterView);
            FamilyImage.ImageScaleType  = PlatformImageView.ScaleType.ScaleAspectFit;
            FamilyImage.BackgroundColor = 0;


            // Group Desc
            GroupDescLayer = PlatformView.Create( );
            GroupDescLayer.AddAsSubview(masterView);
            GroupDescLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            GroupDescLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            GroupDescLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            GroupDesc = PlatformLabel.Create( );
            GroupDesc.AddAsSubview(masterView);
            GroupDesc.TextAlignment = TextAlignment.Center;
            GroupDesc.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Medium_FontSize);
            GroupDesc.TextColor = ControlStylingConfig.TextField_ActiveTextColor;

            // Group Desc Header
            GroupDescHeader = PlatformLabel.Create( );
            GroupDescHeader.AddAsSubview(masterView);
            GroupDescHeader.TextAlignment = TextAlignment.Center;
            GroupDescHeader.SetFont(ControlStylingConfig.Font_Bold, ControlStylingConfig.Medium_FontSize);
            GroupDescHeader.TextColor = ControlStylingConfig.TextField_ActiveTextColor;
            GroupDescHeader.Text      = ConnectStrings.GroupInfo_AboutGroup;


            // Childcare Desc
            ChildDescLayer = PlatformView.Create( );
            ChildDescLayer.AddAsSubview(masterView);
            ChildDescLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            ChildDescLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            ChildDescLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            ChildDesc = PlatformLabel.Create( );
            ChildDesc.AddAsSubview(masterView);
            ChildDesc.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Medium_FontSize);
            ChildDesc.TextColor     = ControlStylingConfig.TextField_ActiveTextColor;
            ChildDesc.TextAlignment = TextAlignment.Center;

            // Child Desc Header
            ChildDescHeader = PlatformLabel.Create( );
            ChildDescHeader.AddAsSubview(masterView);
            ChildDescHeader.TextAlignment = TextAlignment.Center;
            ChildDescHeader.SetFont(ControlStylingConfig.Font_Bold, ControlStylingConfig.Medium_FontSize);
            ChildDescHeader.TextColor = ControlStylingConfig.TextField_ActiveTextColor;
            ChildDescHeader.Text      = ConnectStrings.GroupInfo_AboutChildcare;


            // Group Image and Layer
            GroupImageLayer = PlatformView.Create( );
            GroupImageLayer.AddAsSubview(masterView);
            GroupImageLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            GroupImageLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            GroupImageLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            GroupImage = PlatformImageView.Create( );
            GroupImage.AddAsSubview(masterView);
            GroupImage.ImageScaleType  = PlatformImageView.ScaleType.ScaleAspectFit;
            GroupImage.BackgroundColor = 0;


            // Join Button
            JoinButton = PlatformButton.Create( );
            JoinButton.AddAsSubview(masterView);
            JoinButton.ClickEvent      = JoinClicked;
            JoinButton.BackgroundColor = ControlStylingConfig.Button_BGColor;
            JoinButton.TextColor       = ControlStylingConfig.Button_TextColor;
            JoinButton.CornerRadius    = ControlStylingConfig.Button_CornerRadius;
            JoinButton.Text            = ConnectStrings.JoinGroup_JoinButtonLabel;
            JoinButton.SizeToFit( );
            JoinButton.UserInteractionEnabled = true;

            // Create our results view overlay
            ResultView = new UIResultView(masterView, View.Frame, OnResultViewDone);

            // Create our blocker view
            BlockerView = new UIBlockerView(masterView, View.Frame);
        }