コード例 #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
        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;
        }
コード例 #4
0
ファイル: UISpecial.cs プロジェクト: Higherbound/HBMobileApp
        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;
        }
コード例 #5
0
ファイル: UISpecial.cs プロジェクト: Higherbound/HBMobileApp
        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;
        }