예제 #1
0
        void CreateCampusButtons( )
        {
            // we wait to call this later, once we know we have campuses downloaded.

            // TODO: We need to support scrolling for the eventual day we have too many campuses for a single screen.
            // Setup campuses
            CampusButtons = new List <PlatformButton>( );
            foreach (Rock.Client.Campus campus in MobileApp.Shared.Network.RockLaunchData.Instance.Data.Campuses)
            {
                PlatformButton campusButton = PlatformButton.Create( );
                campusButton.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Large_FontSize);
                campusButton.TextColor = 0xCCCCCCFF;
                campusButton.Text      = campus.Name;
                campusButton.Opacity   = 0;
                campusButton.SizeToFit( );
                campusButton.ClickEvent = (PlatformButton button ) =>
                {
                    // do not allow multiple campus button taps
                    if (State == OOBE_State.WaitForCampus)
                    {
                        OnClick(campus.Id, true);

                        EnterNextState(OOBE_State.AccountChoice);
                        PerformAccountChoice( );
                    }
                };
                campusButton.AddAsSubview(View.PlatformNativeObject);

                CampusButtons.Add(campusButton);
            }
        }
예제 #2
0
        public void Create(object masterView, bool scaleImage, RectangleF frame, OnCompletion onCompletion)
        {
            View = PlatformView.Create( );
            View.BackgroundColor = ControlStylingConfig.BackgroundColor;
            View.Frame           = frame;
            View.AddAsSubview(masterView);

            Credits = new List <Credit>();
            Credits.Add(new Credit("Hey you found me! I'm Jered, the mobile app developer here at CCV. Making this app was a ton of work, and couldn't have happened without the support of a ton of people!\n\nThanks so much to:\n" +
                                   "Jenni, my beautiful wife and very patient app tester!\n\n" +
                                   "Jon & David, for developing this app's backbone, Rock.\n\n" +
                                   "Mason & Mike for testing, end points, and endless puns! (See what I did there?)\n\n" +
                                   "Nick & Kyle for all the great artwork and design you see in this app.\n\n" +
                                   "Dan & Kris Simpson for HUGE feedback, testing, and movie nights!!\n\n" +
                                   "The IT boyz: Jim, `Stopher and Chris, for being extremely willing Android guinea pigs.\n\n" +
                                   "Matt, Emily, Robin, Jill and Bree, for their testing and feedback.\n\n\n" +
                                   "And thanks of course to all of you out there using the app and making CCV the awesome church that it is!",
                                   "me.png", scaleImage, frame, View));


            CloseButton = PlatformButton.Create( );
            CloseButton.AddAsSubview(View.PlatformNativeObject);
            CloseButton.Text            = "Got It!";
            CloseButton.BackgroundColor = PrayerConfig.PrayedForColor;
            CloseButton.TextColor       = ControlStylingConfig.Button_TextColor;
            CloseButton.CornerRadius    = ControlStylingConfig.Button_CornerRadius;
            CloseButton.SizeToFit( );
            CloseButton.ClickEvent = delegate(PlatformButton button)
            {
                OnCompletionCallback( );
            };

            OnCompletionCallback = onCompletion;
        }
예제 #3
0
        void JoinClicked(PlatformButton button)
        {
            if (ValidateInput( ))
            {
                //hack - Can't figure out WHY the join button isn't in the proper Z order on the Nexus 7.
                // but I just don't care right now. So hide it and unhide it.
                JoinButton.Hidden = true;
                EnableControls(false);

                BlockerView.Show( );

                MobileAppApi.JoinGroup(GroupID, FirstName.Text, LastName.Text, SpouseName.Text, Email.Text, CellPhone.Text.AsNumeric( ),
                                       delegate(System.Net.HttpStatusCode statusCode, string statusDescription)
                {
                    BlockerView.Hide( );

                    if (Rock.Mobile.Network.Util.StatusInSuccessRange(statusCode) == true)
                    {
                        ResultView.Show(RegisterStrings.RegisterStatus_Success,
                                        PrivateControlStylingConfig.Result_Symbol_Success,
                                        string.Format(ConnectStrings.JoinGroup_RegisterSuccess, GroupTitle.Text),
                                        GeneralStrings.Done);
                    }
                    else
                    {
                        ResultView.Show(RegisterStrings.RegisterStatus_Failed,
                                        PrivateControlStylingConfig.Result_Symbol_Failed,
                                        ConnectStrings.JoinGroup_RegisterFailed,
                                        GeneralStrings.Done);
                    }
                });
            }
        }
예제 #4
0
        public void Create(object masterView, bool scaleImage, string imageName, RectangleF frame, OnCompletion onCompletion)
        {
            View = PlatformView.Create( );
            View.BackgroundColor = ControlStylingConfig.BackgroundColor;
            View.Frame           = frame;
            View.AddAsSubview(masterView);

            MemoryStream logoStream = Rock.Mobile.IO.AssetConvert.AssetToStream(imageName);

            logoStream.Position = 0;
            PonyImage           = PlatformImageView.Create( );
            PonyImage.AddAsSubview(View.PlatformNativeObject);
            PonyImage.Image          = logoStream;
            PonyImage.ImageScaleType = PlatformImageView.ScaleType.ScaleAspectFit;
            logoStream.Dispose( );

            CloseButton = PlatformButton.Create( );
            CloseButton.AddAsSubview(View.PlatformNativeObject);
            CloseButton.Text            = "Prance! Dance! It's Magic Pony Time!";
            CloseButton.BackgroundColor = PrayerConfig.PrayedForColor;
            CloseButton.TextColor       = ControlStylingConfig.Button_TextColor;
            CloseButton.CornerRadius    = ControlStylingConfig.Button_CornerRadius;
            CloseButton.SizeToFit( );
            CloseButton.ClickEvent = delegate(PlatformButton button)
            {
                OnCompletionCallback( );
            };

            OnCompletionCallback = onCompletion;
        }
예제 #5
0
        public UIResultView(object parentView, RectangleF frame, DoneClickDelegate onClick)
        {
            View = PlatformView.Create( );
            View.AddAsSubview(parentView);
            View.UserInteractionEnabled = false;

            StatusLabel = PlatformLabel.Create( );
            //StatusBackground = PlatformView.Create( );

            ResultSymbol = PlatformLabel.Create( );
            ResultLabel  = PlatformLabel.Create( );
            //ResultBackground = PlatformView.Create( );


            ResultCircle = PlatformCircleView.Create( );
            ResultCircle.AddAsSubview(parentView);


            // setup our UI hierarchy
            //StatusBackground.AddAsSubview( parentView );
            //StatusBackground.UserInteractionEnabled = false;
            //StatusBackground.BorderWidth = .5f;

            StatusLabel.AddAsSubview(parentView);
            StatusLabel.UserInteractionEnabled = false;


            //ResultBackground.AddAsSubview( parentView );
            //ResultBackground.UserInteractionEnabled = false;
            //ResultBackground.BorderWidth = .5f;

            ResultSymbol.AddAsSubview(parentView);
            ResultSymbol.UserInteractionEnabled = false;

            ResultLabel.AddAsSubview(parentView);
            ResultLabel.UserInteractionEnabled = false;

            DoneButton = PlatformButton.Create( );
            DoneButton.AddAsSubview(parentView);
            DoneButton.ClickEvent = ( PlatformButton button ) =>
            {
                if (onClick != null)
                {
                    onClick( );
                }
            };


            // default the view size and opacity
            SetOpacity(0.00f);

            SetBounds(frame);

            // give it a default style
            SetStyle( );
        }
예제 #6
0
        public UIResultView( object parentView, RectangleF frame, DoneClickDelegate onClick )
        {
            View = PlatformView.Create( );
            View.AddAsSubview( parentView );
            View.UserInteractionEnabled = false;

            StatusLabel = PlatformLabel.Create( );
            //StatusBackground = PlatformView.Create( );

            ResultSymbol = PlatformLabel.Create( );
            ResultLabel = PlatformLabel.Create( );
            //ResultBackground = PlatformView.Create( );


            ResultCircle = PlatformCircleView.Create( );
            ResultCircle.AddAsSubview( parentView );


            // setup our UI hierarchy
            //StatusBackground.AddAsSubview( parentView );
            //StatusBackground.UserInteractionEnabled = false;
            //StatusBackground.BorderWidth = .5f;

            StatusLabel.AddAsSubview( parentView );
            StatusLabel.UserInteractionEnabled = false;


            //ResultBackground.AddAsSubview( parentView );
            //ResultBackground.UserInteractionEnabled = false;
            //ResultBackground.BorderWidth = .5f;

            ResultSymbol.AddAsSubview( parentView );
            ResultSymbol.UserInteractionEnabled = false;

            ResultLabel.AddAsSubview( parentView );
            ResultLabel.UserInteractionEnabled = false;

            DoneButton = PlatformButton.Create( );
            DoneButton.AddAsSubview( parentView );
            DoneButton.ClickEvent = ( PlatformButton button ) =>
            {
                if( onClick != null )
                {
                    onClick( );
                }
            };


            // default the view size and opacity
            SetOpacity( 0.00f );

            SetBounds( frame );

            // give it a default style
            SetStyle( );
        }
예제 #7
0
        public UINoteDiscGuideView(object parentView, RectangleF frame, DoneClickDelegate onClick)
        {
            View = PlatformView.Create( );
            View.AddAsSubview(parentView);
            View.BackgroundColor        = ControlStylingConfig.BackgroundColor;
            View.UserInteractionEnabled = false;

            // Guide Desc Header
            GuideDescHeader = PlatformLabel.Create( );
            GuideDescHeader.AddAsSubview(parentView);
            GuideDescHeader.TextAlignment = TextAlignment.Center;
            GuideDescHeader.SetFont(ControlStylingConfig.Font_Bold, ControlStylingConfig.Large_FontSize);
            GuideDescHeader.TextColor = ControlStylingConfig.TextField_ActiveTextColor;
            GuideDescHeader.Text      = Strings.MessagesStrings.DiscussionGuide_Header;

            // Guide Desc
            GuideDescLayer = PlatformView.Create( );
            GuideDescLayer.AddAsSubview(parentView);
            GuideDescLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            GuideDescLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            GuideDescLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            GuideDesc = PlatformLabel.Create( );
            GuideDesc.AddAsSubview(parentView);
            GuideDesc.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Medium_FontSize);
            GuideDesc.TextColor     = ControlStylingConfig.TextField_ActiveTextColor;
            GuideDesc.TextAlignment = TextAlignment.Center;
            GuideDesc.Text          = Strings.MessagesStrings.DiscussionGuide_Desc;

            // View Guide Button
            ViewGuideButton = PlatformButton.Create( );
            ViewGuideButton.CornerRadius           = 4;
            ViewGuideButton.BackgroundColor        = ControlStylingConfig.Button_BGColor;
            ViewGuideButton.TextColor              = ControlStylingConfig.Button_TextColor;
            ViewGuideButton.UserInteractionEnabled = true;
            ViewGuideButton.AddAsSubview(parentView);
            ViewGuideButton.ClickEvent = ( PlatformButton button ) =>
            {
                if (onClick != null)
                {
                    onClick( );
                }
            };
            ViewGuideButton.Text = "View Guide";

            SetBounds(frame);
        }
예제 #8
0
        public void Create(object masterView, string bgLayerImageName, string logoImageName, RectangleF frame, OnButtonClick onClick)
        {
            // take the handler
            OnClick = onClick;

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

            ImageBG = PlatformImageView.Create( );
            ImageBG.AddAsSubview(View.PlatformNativeObject);
            MemoryStream stream = Rock.Mobile.IO.AssetConvert.AssetToStream(bgLayerImageName);

            if (stream != null)
            {
                stream.Position        = 0;
                ImageBG.Opacity        = 0;
                ImageBG.Image          = stream;
                ImageBG.ImageScaleType = PlatformImageView.ScaleType.ScaleAspectFill;
                stream.Dispose( );
            }

            NetworkErrorLabel = PlatformLabel.Create( );
            NetworkErrorLabel.SetFont(ControlStylingConfig.Font_Light, 18);
            NetworkErrorLabel.TextColor     = 0xCCCCCCFF;
            NetworkErrorLabel.Text          = OOBEStrings.NetworkError;
            NetworkErrorLabel.TextAlignment = TextAlignment.Center;
            NetworkErrorLabel.Opacity       = 0;
            NetworkErrorLabel.SizeToFit( );
            NetworkErrorLabel.AddAsSubview(View.PlatformNativeObject);


            NetworkRetryButton = PlatformButton.Create( );
            NetworkRetryButton.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Medium_FontSize);
            NetworkRetryButton.TextColor = 0xCCCCCCFF;
            NetworkRetryButton.Text      = OOBEStrings.NetworRetry;
            NetworkRetryButton.Opacity   = 0;
            NetworkRetryButton.SizeToFit( );
            NetworkRetryButton.ClickEvent = (PlatformButton button ) =>
            {
                OnClick(-1, false);
            };
            NetworkRetryButton.AddAsSubview(View.PlatformNativeObject);


            WelcomeLabel = PlatformLabel.Create( );
            WelcomeLabel.SetFont(ControlStylingConfig.Font_Bold, 85);
            WelcomeLabel.TextColor = 0xCCCCCCFF;
            WelcomeLabel.Text      = OOBEStrings.Welcome;
            WelcomeLabel.Opacity   = 0;
            WelcomeLabel.SizeToFit( );
            WelcomeLabel.AddAsSubview(View.PlatformNativeObject);

            CampusHeader = PlatformLabel.Create( );
            CampusHeader.SetFont(ControlStylingConfig.Font_Light, 18);
            CampusHeader.TextColor     = 0xCCCCCCFF;
            CampusHeader.Text          = OOBEStrings.CampusIntro;
            CampusHeader.TextAlignment = TextAlignment.Center;
            CampusHeader.Opacity       = 0;
            CampusHeader.SizeToFit( );
            CampusHeader.AddAsSubview(View.PlatformNativeObject);

            // we'll wait to setup campuses until after a successful download
            CampusButtons = new List <PlatformButton>( );

            RegisterButton = PlatformButton.Create( );
            RegisterButton.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Large_FontSize);
            RegisterButton.TextColor = 0xCCCCCCFF;
            RegisterButton.Text      = string.Format(OOBEStrings.WantAccount, GeneralConfig.OrganizationShortName);
            RegisterButton.Opacity   = 0;
            RegisterButton.SizeToFit( );
            RegisterButton.ClickEvent = (PlatformButton button ) =>
            {
                // do not allow multiple register taps
                if (State == OOBE_State.WaitForAccountChoice)
                {
                    OnClick(0, false);

                    EnterNextState(OOBE_State.Done);
                }
            };
            RegisterButton.AddAsSubview(View.PlatformNativeObject);


            RegisterSeperator = PlatformView.Create( );
            RegisterSeperator.BackgroundColor = ControlStylingConfig.BG_Layer_BorderColor;
            RegisterSeperator.Bounds          = new RectangleF(0, 0, 0, 1);
            RegisterSeperator.AddAsSubview(View.PlatformNativeObject);


            LoginButton = PlatformButton.Create( );
            LoginButton.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Large_FontSize);
            LoginButton.TextColor = 0xCCCCCCFF;
            LoginButton.Text      = string.Format(OOBEStrings.HaveAccount, GeneralConfig.OrganizationShortName);
            LoginButton.Opacity   = 0;
            LoginButton.SizeToFit( );
            LoginButton.ClickEvent = (PlatformButton button ) =>
            {
                // do not allow multiple register taps
                if (State == OOBE_State.WaitForAccountChoice)
                {
                    OnClick(1, false);

                    EnterNextState(OOBE_State.Done);
                }
            };
            LoginButton.AddAsSubview(View.PlatformNativeObject);

            LoginSeperator = PlatformView.Create( );
            LoginSeperator.BackgroundColor = ControlStylingConfig.BG_Layer_BorderColor;
            LoginSeperator.Bounds          = new RectangleF(0, 0, 0, 1);
            LoginSeperator.AddAsSubview(View.PlatformNativeObject);


            SkipButton = PlatformButton.Create( );
            SkipButton.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Large_FontSize);
            SkipButton.TextColor = 0xCCCCCCFF;
            SkipButton.Text      = OOBEStrings.SkipAccount;
            SkipButton.Opacity   = 0;
            SkipButton.SizeToFit( );
            SkipButton.ClickEvent = (PlatformButton button ) =>
            {
                // do not allow multiple register taps
                if (State == OOBE_State.WaitForAccountChoice)
                {
                    OnClick(2, false);

                    EnterNextState(OOBE_State.Done);
                }
            };
            SkipButton.AddAsSubview(View.PlatformNativeObject);

            stream          = Rock.Mobile.IO.AssetConvert.AssetToStream(logoImageName);
            stream.Position = 0;
            ImageLogo       = PlatformImageView.Create( );
            ImageLogo.AddAsSubview(View.PlatformNativeObject);
            ImageLogo.Image          = stream;
            ImageLogo.ImageScaleType = PlatformImageView.ScaleType.ScaleAspectFit;
            stream.Dispose( );

            State = OOBE_State.Startup;
        }
예제 #9
0
        public void Create(object masterView, RectangleF frame)
        {
            View = PlatformView.Create( );
            View.BackgroundColor = ControlStylingConfig.BackgroundColor;
            View.AddAsSubview(masterView);

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

            /*GroupDetailsLayer = PlatformView.Create( );
             * GroupDetailsLayer.AddAsSubview( masterView );
             * GroupDetailsLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
             * GroupDetailsLayer.BorderColor = ControlStylingConfig.BG_Layer_BorderColor;
             * GroupDetailsLayer.BorderWidth = ControlStylingConfig.BG_Layer_BorderWidth;*/

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


            // Name Info
            FirstNameLayer = PlatformView.Create( );
            FirstNameLayer.AddAsSubview(masterView);
            FirstNameLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            FirstNameLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            FirstNameLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            FirstName = PlatformTextField.Create( );
            FirstName.AddAsSubview(masterView);
            FirstName.SetFont(ControlStylingConfig.Font_Regular, ControlStylingConfig.Medium_FontSize);
            FirstName.PlaceholderTextColor   = ControlStylingConfig.TextField_PlaceholderTextColor;
            FirstName.Placeholder            = ConnectStrings.JoinGroup_FirstNamePlaceholder;
            FirstName.TextColor              = ControlStylingConfig.TextField_ActiveTextColor;
            FirstName.KeyboardAppearance     = KeyboardAppearanceStyle.Dark;
            FirstName.AutoCapitalizationType = AutoCapitalizationType.Words;
            FirstName.AutoCorrectionType     = AutoCorrectionType.No;


            LastNameLayer = PlatformView.Create( );
            LastNameLayer.AddAsSubview(masterView);
            LastNameLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            LastNameLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            LastNameLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            LastName = PlatformTextField.Create( );
            LastName.AddAsSubview(masterView);
            LastName.SetFont(ControlStylingConfig.Font_Regular, ControlStylingConfig.Medium_FontSize);
            LastName.PlaceholderTextColor   = ControlStylingConfig.TextField_PlaceholderTextColor;
            LastName.Placeholder            = ConnectStrings.JoinGroup_LastNamePlaceholder;
            LastName.TextColor              = ControlStylingConfig.TextField_ActiveTextColor;
            LastName.KeyboardAppearance     = KeyboardAppearanceStyle.Dark;
            LastName.AutoCapitalizationType = AutoCapitalizationType.Words;
            LastName.AutoCorrectionType     = AutoCorrectionType.No;

            SpouseNameLayer = PlatformView.Create( );
            SpouseNameLayer.AddAsSubview(masterView);
            SpouseNameLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            SpouseNameLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            SpouseNameLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            SpouseName = PlatformTextField.Create( );
            SpouseName.AddAsSubview(masterView);
            SpouseName.SetFont(ControlStylingConfig.Font_Regular, ControlStylingConfig.Medium_FontSize);
            SpouseName.PlaceholderTextColor   = ControlStylingConfig.TextField_PlaceholderTextColor;
            SpouseName.Placeholder            = ConnectStrings.JoinGroup_SpouseNamePlaceholder;
            SpouseName.TextColor              = ControlStylingConfig.TextField_ActiveTextColor;
            SpouseName.KeyboardAppearance     = KeyboardAppearanceStyle.Dark;
            SpouseName.AutoCapitalizationType = AutoCapitalizationType.Words;
            SpouseName.AutoCorrectionType     = AutoCorrectionType.No;

            // Contact Info
            EmailLayer = PlatformView.Create( );
            EmailLayer.AddAsSubview(masterView);
            EmailLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            EmailLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            EmailLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            Email = PlatformTextField.Create( );
            Email.AddAsSubview(masterView);
            Email.SetFont(ControlStylingConfig.Font_Regular, ControlStylingConfig.Medium_FontSize);
            Email.PlaceholderTextColor   = ControlStylingConfig.TextField_PlaceholderTextColor;
            Email.Placeholder            = ConnectStrings.JoinGroup_EmailPlaceholder;
            Email.TextColor              = ControlStylingConfig.TextField_ActiveTextColor;
            Email.KeyboardAppearance     = KeyboardAppearanceStyle.Dark;
            Email.AutoCapitalizationType = AutoCapitalizationType.None;
            Email.AutoCorrectionType     = AutoCorrectionType.No;

            CellPhoneLayer = PlatformView.Create( );
            CellPhoneLayer.AddAsSubview(masterView);
            CellPhoneLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            CellPhoneLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            CellPhoneLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            CellPhone = PlatformTextField.Create( );
            CellPhone.AddAsSubview(masterView);
            CellPhone.SetFont(ControlStylingConfig.Font_Regular, ControlStylingConfig.Medium_FontSize);
            CellPhone.PlaceholderTextColor   = ControlStylingConfig.TextField_PlaceholderTextColor;
            CellPhone.Placeholder            = ConnectStrings.JoinGroup_CellPhonePlaceholder;
            CellPhone.TextColor              = ControlStylingConfig.TextField_ActiveTextColor;
            CellPhone.KeyboardAppearance     = KeyboardAppearanceStyle.Dark;
            CellPhone.AutoCapitalizationType = AutoCapitalizationType.None;
            CellPhone.AutoCorrectionType     = AutoCorrectionType.No;


            // 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);
        }
예제 #10
0
 void JoinClicked(PlatformButton button)
 {
     // forward to our parent
     OnButtonClicked( );
 }
예제 #11
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);
        }
예제 #12
0
        static float sModalOffset   = 0;//15;

        public void Create(object masterView, RectangleF frame, Rock.Mobile.UI.PlatformButton.OnClick searchNeighborhoodsClicked,
                           Rock.Mobile.UI.PlatformButton.OnClick searchShortTermClicked,
                           Rock.Mobile.UI.PlatformButton.OnClick searchYoungAdultsClicked)
        {
            Backer = PlatformView.Create( );
            Backer.BackgroundColor = 0x000000FF;
            Backer.Opacity         = sBackerOpacity;
            Backer.AddAsSubview(masterView);
            Backer.Frame = frame;

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

            Title = PlatformLabel.Create( );
            Title.AddAsSubview(View.PlatformNativeObject);
            Title.SetFont(ControlStylingConfig.Font_Bold, ControlStylingConfig.Large_FontSize);
            Title.TextColor     = ControlStylingConfig.TextField_ActiveTextColor;
            Title.TextAlignment = TextAlignment.Center;

            Details = PlatformLabel.Create( );
            Details.AddAsSubview(View.PlatformNativeObject);
            Details.SetFont(ControlStylingConfig.Font_Light, ControlStylingConfig.Small_FontSize);
            Details.TextColor = ControlStylingConfig.TextField_ActiveTextColor;


            // Name Info
            StreetLayer = PlatformView.Create( );
            StreetLayer.AddAsSubview(View.PlatformNativeObject);
            StreetLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            StreetLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            StreetLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            Street = PlatformTextField.Create( );
            Street.AddAsSubview(View.PlatformNativeObject);
            Street.SetFont(ControlStylingConfig.Font_Regular, ControlStylingConfig.Medium_FontSize);
            Street.PlaceholderTextColor   = ControlStylingConfig.TextField_PlaceholderTextColor;
            Street.Placeholder            = ConnectStrings.GroupFinder_StreetPlaceholder;
            Street.TextColor              = ControlStylingConfig.TextField_ActiveTextColor;
            Street.KeyboardAppearance     = KeyboardAppearanceStyle.Dark;
            Street.AutoCapitalizationType = AutoCapitalizationType.Words;
            Street.AutoCorrectionType     = AutoCorrectionType.No;


            CityLayer = PlatformView.Create( );
            CityLayer.AddAsSubview(View.PlatformNativeObject);
            CityLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            CityLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            CityLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            City = PlatformTextField.Create( );
            City.AddAsSubview(View.PlatformNativeObject);
            City.SetFont(ControlStylingConfig.Font_Regular, ControlStylingConfig.Medium_FontSize);
            City.PlaceholderTextColor   = ControlStylingConfig.TextField_PlaceholderTextColor;
            City.Placeholder            = ConnectStrings.GroupFinder_CityPlaceholder;
            City.TextColor              = ControlStylingConfig.TextField_ActiveTextColor;
            City.KeyboardAppearance     = KeyboardAppearanceStyle.Dark;
            City.AutoCapitalizationType = AutoCapitalizationType.Words;
            City.AutoCorrectionType     = AutoCorrectionType.No;


            StateLayer = PlatformView.Create( );
            StateLayer.AddAsSubview(View.PlatformNativeObject);
            StateLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            StateLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            StateLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            State = PlatformTextField.Create( );
            State.AddAsSubview(View.PlatformNativeObject);
            State.SetFont(ControlStylingConfig.Font_Regular, ControlStylingConfig.Medium_FontSize);
            State.PlaceholderTextColor   = ControlStylingConfig.TextField_PlaceholderTextColor;
            State.Placeholder            = ConnectStrings.GroupFinder_StatePlaceholder;
            State.TextColor              = ControlStylingConfig.TextField_ActiveTextColor;
            State.KeyboardAppearance     = KeyboardAppearanceStyle.Dark;
            State.AutoCapitalizationType = AutoCapitalizationType.Words;
            State.AutoCorrectionType     = AutoCorrectionType.No;

            ZipCodeLayer = PlatformView.Create( );
            ZipCodeLayer.AddAsSubview(View.PlatformNativeObject);
            ZipCodeLayer.BackgroundColor = ControlStylingConfig.BG_Layer_Color;
            ZipCodeLayer.BorderColor     = ControlStylingConfig.BG_Layer_BorderColor;
            ZipCodeLayer.BorderWidth     = ControlStylingConfig.BG_Layer_BorderWidth;

            ZipCode = PlatformTextField.Create( );
            ZipCode.AddAsSubview(View.PlatformNativeObject);
            ZipCode.SetFont(ControlStylingConfig.Font_Regular, ControlStylingConfig.Medium_FontSize);
            ZipCode.PlaceholderTextColor   = ControlStylingConfig.TextField_PlaceholderTextColor;
            ZipCode.Placeholder            = ConnectStrings.GroupFinder_ZipPlaceholder;
            ZipCode.TextColor              = ControlStylingConfig.TextField_ActiveTextColor;
            ZipCode.KeyboardAppearance     = KeyboardAppearanceStyle.Dark;
            ZipCode.AutoCapitalizationType = AutoCapitalizationType.None;
            ZipCode.AutoCorrectionType     = AutoCorrectionType.No;


            // Search Neighborhoods Button
            SearchNeighborhoodsClicked = searchNeighborhoodsClicked;
            SearchNeighborhoodsButton  = PlatformButton.Create( );
            SearchNeighborhoodsButton.AddAsSubview(View.PlatformNativeObject);
            SearchNeighborhoodsButton.BackgroundColor = ControlStylingConfig.Button_BGColor;
            SearchNeighborhoodsButton.TextColor       = ControlStylingConfig.Button_TextColor;
            SearchNeighborhoodsButton.CornerRadius    = ControlStylingConfig.Button_CornerRadius;
            SearchNeighborhoodsButton.Text            = ConnectStrings.GroupFinder_Search_NeighborhoodGroups;
            SearchNeighborhoodsButton.SetFont(ControlStylingConfig.Font_Regular, 14);
            SearchNeighborhoodsButton.SizeToFit( );
            SearchNeighborhoodsButton.ClickEvent = ( PlatformButton b ) =>
            {
                // treat the search button as if Return was pressed
                if (ShouldReturn( ))
                {
                    SearchNeighborhoodsClicked(null);
                }
            };


            // Search ShortTerm Button
            SearchShortTermClicked = searchShortTermClicked;
            SearchShortTermButton  = PlatformButton.Create( );
            SearchShortTermButton.AddAsSubview(View.PlatformNativeObject);
            SearchShortTermButton.BackgroundColor = ControlStylingConfig.Button_BGColor;
            SearchShortTermButton.TextColor       = ControlStylingConfig.Button_TextColor;
            SearchShortTermButton.CornerRadius    = ControlStylingConfig.Button_CornerRadius;
            SearchShortTermButton.Text            = ConnectStrings.GroupFinder_Search_ShortTermGroups;
            SearchShortTermButton.SetFont(ControlStylingConfig.Font_Regular, 14);
            SearchShortTermButton.SizeToFit( );
            SearchShortTermButton.ClickEvent = ( PlatformButton b ) =>
            {
                // treat the search button as if Return was pressed
                if (ShouldReturn( ))
                {
                    SearchShortTermClicked(null);
                }
            };

            // Search Young Adults Button
            SearchYoungAdultsClicked = searchYoungAdultsClicked;
            SearchYoungAdultsButton  = PlatformButton.Create( );
            SearchYoungAdultsButton.AddAsSubview(View.PlatformNativeObject);
            SearchYoungAdultsButton.BackgroundColor = ControlStylingConfig.Button_BGColor;
            SearchYoungAdultsButton.TextColor       = ControlStylingConfig.Button_TextColor;
            SearchYoungAdultsButton.CornerRadius    = ControlStylingConfig.Button_CornerRadius;
            SearchYoungAdultsButton.Text            = ConnectStrings.GroupFinder_Search_YoungAdultGroups;
            SearchYoungAdultsButton.SetFont(ControlStylingConfig.Font_Regular, 14);
            SearchYoungAdultsButton.SizeToFit( );
            SearchYoungAdultsButton.ClickEvent = ( PlatformButton b ) =>
            {
                // treat the search button as if Return was pressed
                if (ShouldReturn( ))
                {
                    SearchYoungAdultsClicked(null);
                }
            };


            SearchShortTermButton.Hidden   = true;
            SearchYoungAdultsButton.Hidden = true;

            LayoutChanged(frame);
        }
예제 #13
0
        void JoinClicked( PlatformButton button )
        {
            if ( ValidateInput( ) )
            {
                //hack - Can't figure out WHY the join button isn't in the proper Z order on the Nexus 7.
                // but I just don't care right now. So hide it and unhide it.
                JoinButton.Hidden = true;
                EnableControls( false );

                BlockerView.Show( );

                MobileAppApi.JoinGroup( App.Shared.Network.RockMobileUser.Instance.Person, FirstName.Text, LastName.Text, SpouseName.Text, Email.Text, CellPhone.Text.AsNumeric( ), GroupID, GroupTitle.Text,
                    delegate(System.Net.HttpStatusCode statusCode, string statusDescription )
                    {
                        BlockerView.Hide( );

                        if ( Rock.Mobile.Network.Util.StatusInSuccessRange( statusCode ) == true )
                        {
                            ResultView.Show( RegisterStrings.RegisterStatus_Success, 
                                PrivateControlStylingConfig.Result_Symbol_Success, 
                                string.Format( ConnectStrings.JoinGroup_RegisterSuccess, GroupTitle.Text ),
                                GeneralStrings.Done );
                        }
                        else
                        {
                            ResultView.Show( RegisterStrings.RegisterStatus_Failed, 
                                PrivateControlStylingConfig.Result_Symbol_Failed, 
                                string.Format( ConnectStrings.JoinGroup_RegisterFailed, GroupTitle.Text ),
                                GeneralStrings.Done );
                        }
                    } );
            }
        }
예제 #14
0
        public void Create( object masterView, bool scaleImage, RectangleF frame, OnCompletion onCompletion )
        {
            View = PlatformView.Create( );
            View.BackgroundColor = ControlStylingConfig.BackgroundColor;
            View.Frame = frame;
            View.AddAsSubview( masterView );

            Credits = new List<Credit>();
            Credits.Add( new Credit( "Hey you found me! I'm Jered, the mobile app developer here at CCV. Making this app was a ton of work, and couldn't have happened without the support of a ton of people!\n\nThanks so much to:\n" +
                "Jenni, my beautiful wife and very patient app tester!\n\n" +
                "Jon & David, for developing this app's backbone, Rock.\n\n" + 
                "Mason & Mike for testing, end points, and endless puns! (See what I did there?)\n\n" + 
                "Nick & Kyle for all the great artwork and design you see in this app.\n\n" +
                "Dan & Kris Simpson for HUGE feedback, testing, and movie nights!!\n\n" +
                "The IT boyz: Jim, `Stopher and Chris, for being extremely willing Android guinea pigs.\n\n" +
                "Matt, Emily, Robin, Jill and Bree, for their testing and feedback.\n\n\n" +
                "And thanks of course to all of you out there using the app and making CCV the awesome church that it is!", 
                "me.png", scaleImage, frame, View ) );


            CloseButton = PlatformButton.Create( );
            CloseButton.AddAsSubview( View.PlatformNativeObject );
            CloseButton.Text = "Got It!";
            CloseButton.BackgroundColor = PrayerConfig.PrayedForColor;
            CloseButton.TextColor = ControlStylingConfig.Button_TextColor;
            CloseButton.CornerRadius = ControlStylingConfig.Button_CornerRadius;
            CloseButton.SizeToFit( );
            CloseButton.ClickEvent = delegate(PlatformButton button) 
                {
                    OnCompletionCallback( );
                };

            OnCompletionCallback = onCompletion;
        }
예제 #15
0
        public void Create( object masterView, bool scaleImage, string imageName, RectangleF frame, OnCompletion onCompletion )
        {
            View = PlatformView.Create( );
            View.BackgroundColor = ControlStylingConfig.BackgroundColor;
            View.Frame = frame;
            View.AddAsSubview( masterView );

            MemoryStream logoStream = Rock.Mobile.IO.AssetConvert.AssetToStream( imageName );
            logoStream.Position = 0;
            PonyImage = PlatformImageView.Create( scaleImage );
            PonyImage.AddAsSubview( View.PlatformNativeObject );
            PonyImage.Image = logoStream;
            PonyImage.SizeToFit( );
            PonyImage.ImageScaleType = PlatformImageView.ScaleType.ScaleAspectFit;
            logoStream.Dispose( );

            CloseButton = PlatformButton.Create( );
            CloseButton.AddAsSubview( View.PlatformNativeObject );
            CloseButton.Text = "Prance! Dance! It's Magic Pony Time!";
            CloseButton.BackgroundColor = PrayerConfig.PrayedForColor;
            CloseButton.TextColor = ControlStylingConfig.Button_TextColor;
            CloseButton.CornerRadius = ControlStylingConfig.Button_CornerRadius;
            CloseButton.SizeToFit( );
            CloseButton.ClickEvent = delegate(PlatformButton button) 
                {
                    OnCompletionCallback( );
                };

            OnCompletionCallback = onCompletion;
        }