public void PresentAnimated( int workingFamilyId, string workingFamilyLastName, Rock.Client.Person workingPerson, bool isChild, Dictionary<string, Rock.Client.AttributeValue> attributeValues, NSData profilePicBuffer, List<Rock.Client.Family> allowedCheckinList, FamilyInfoViewController.OnPersonInfoCompleteDelegate onComplete ) { OnCompleteDelegate = onComplete; WorkingFamilyId = workingFamilyId; KeyboardAdjustManager.Activate( ); // take the provided person as our working person if ( workingPerson == null ) { IsNewPerson = true; WorkingPerson = new Rock.Client.Person( ); // since it's a new person, put the last name of the family in there. WorkingPerson.LastName = workingFamilyLastName; } else { IsNewPerson = false; WorkingPerson = workingPerson; } // we need to know now what values AREN'T set, so we don't inadvertantly set them to defaults. WorkingPhoneNumber = RockActions.TryGetPhoneNumber( WorkingPerson, RockActions.CellPhoneValueId ); if ( WorkingPhoneNumber == null ) { IsNewPhoneNumber = true; WorkingPhoneNumber = new Rock.Client.PhoneNumber(); } else { IsNewPhoneNumber = false; } PersonInfoToUI( WorkingPerson, WorkingPhoneNumber, isChild, attributeValues, allowedCheckinList ); // set their profile picture UpdateProfilePic( profilePicBuffer ); View.Hidden = false; // animate the background to dark BackgroundPanel.Layer.Opacity = 0; SimpleAnimator_Float alphaAnim = new SimpleAnimator_Float( BackgroundPanel.Layer.Opacity, Settings.DarkenOpacity, .33f, delegate(float percent, object value ) { BackgroundPanel.Layer.Opacity = (float)value; }, null ); alphaAnim.Start( SimpleAnimator.Style.CurveEaseOut ); // update the main panel MainPanel.Layer.Position = new CoreGraphics.CGPoint( ( View.Bounds.Width - MainPanel.Bounds.Width ) / 2, View.Bounds.Height ); // animate UP the main panel nfloat visibleHeight = Parent.GetVisibleHeight( ); PointF endPos = new PointF( (float)( View.Bounds.Width - MainPanel.Bounds.Width ) / 2, (float)( visibleHeight - MainPanel.Bounds.Height ) / 2 ); SimpleAnimator_PointF posAnim = new SimpleAnimator_PointF( MainPanel.Layer.Position.ToPointF( ), endPos, .33f, delegate(float percent, object value ) { MainPanel.Layer.Position = (PointF)value; }, null); posAnim.Start( SimpleAnimator.Style.CurveEaseOut ); ViewDidLayoutSubviews( ); }
void PresentFamilyPage_Internal( Rock.Client.Family family ) { // display the view controller. Ignore requests to re-view the same family (which we key off the ID to know) if ( CurrentFamilyInfoViewController == null || CurrentFamilyInfoViewController.Family.Id != family.Id ) { // first, clear out whatever our current is, because that's changing CurrentFamilyInfoViewController = null; // now, see if this family is already in a controller within the stack foreach ( UIViewController controller in SubNavigationController.ChildViewControllers ) { // is it a match? FamilyInfoViewController currController = controller as FamilyInfoViewController; if ( currController != null && currController.Family == family ) { // then pop to it, and take it as our current reference SubNavigationController.PopToViewController( currController, true ); CurrentFamilyInfoViewController = currController; break; } } // if this is still null, it isn't in our stack, so we can go ahead and push a new one. if ( CurrentFamilyInfoViewController == null ) { CurrentFamilyInfoViewController = new FamilyInfoViewController( this, family ); SubNavigationController.PushViewController( CurrentFamilyInfoViewController, true ); } HomeButton.Enabled = true; AddFamilyButton.Enabled = true; } }
/// <summary> /// Definition for the source table that backs the tableView /// </summary> public TableSource( FamilyInfoViewController parent ) { Parent = parent; // create a list for the guest family cell heights, since they're variable GuestFamilyCellHeight = new List<nfloat>( ); }