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); } }
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; }
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; }
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( ); }
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( ); }
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); }
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; }
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; }