public override void Copy( BaseMemberPanel rhs ) { base.Copy( rhs ); // there's no way to copy this value, so simply clear it out. // This could cause an adult that's loaded, switched to a child, // and BACK to an adult to then have a blank marital status, but that // is ok, because that results in it simply not being set to the person // on Submission. MaritalStatusToggle.SetCurrentValue( "" ); }
public override void Copy( BaseMemberPanel rhs ) { base.Copy( rhs ); // there's no way to copy this value, so simply clear it out. // If they loaded a child, switched to an adult, and went back to the child, // the grade will be empty, but it's ok because that will simply // cause the value to not be set when syncing with the person. GradeDropDown.SetCurrentValue( string.Empty ); }
void SwitchActiveMemberView( BaseMemberPanel memberPanel ) { // don't change if the panel is already active if ( ActivePanel != memberPanel ) { // and don't do it if we're animating if ( Animating == false ) { // disable the toggle button until we're done animating AdultChildToggle.Enabled = false; Animating = true; // animate out the current, bring in the new SimpleAnimator_PointF activeOutAnim = new SimpleAnimator_PointF( ScrollView.Layer.Position.ToPointF( ), new PointF( (float)ScrollView.Layer.Position.X, (float)ScrollView.Bounds.Height * .95f ), .33f, delegate(float percent, object value ) { ScrollView.Layer.Position = (PointF)value; }, delegate { // set the new panel as active, and position it off screen. ActivePanel.GetRootView( ).Hidden = true; // copy the data from the currently active panel to the new one memberPanel.Copy( ActivePanel ); // now switch it ActivePanel = memberPanel; ActivePanel.GetRootView( ).Hidden = false; ViewDidLayoutSubviews( ); // now kick off the animate IN for the new panel SimpleAnimator_PointF activeInAnim = new SimpleAnimator_PointF( ScrollView.Layer.Position.ToPointF( ), new PointF( (float)ScrollView.Layer.Position.X, 0 ), .33f, delegate(float percent, object value ) { ScrollView.Layer.Position = (PointF)value; }, delegate { // and finally we're done animating. // re-enable the toggle button, and flag that we're no longer animating AdultChildToggle.Enabled = true; Animating = false; }); activeInAnim.Start( SimpleAnimator.Style.CurveEaseIn ); } ); activeOutAnim.Start( SimpleAnimator.Style.CurveEaseOut ); } } }
public virtual void Copy( BaseMemberPanel rhs ) { FirstName.SetCurrentValue( rhs.FirstName.GetCurrentValue( ).ToUpperWords( ) ); MiddleName.SetCurrentValue( rhs.MiddleName.GetCurrentValue( ).ToUpperWords( ) ); LastName.SetCurrentValue( rhs.LastName.GetCurrentValue( ).ToUpperWords( ) ); BirthdatePicker.SetCurrentValue( rhs.BirthdatePicker.GetCurrentValue( ) ); GenderToggle.SetCurrentValue( rhs.GenderToggle.GetCurrentValue( ) ); PhoneNumber.SetCurrentValue( rhs.PhoneNumber.GetCurrentValue( ) ); EmailAddress.SetCurrentValue( rhs.EmailAddress.GetCurrentValue( ) ); // copy the checkin buttons. First remove existing ones RemoveAllowedCheckinList( ); // then add the new ones if( rhs.AllowedCheckinFamilies != null ) { AllowedCheckinFamilies = new List<Rock.Client.Family>( rhs.AllowedCheckinFamilies ); foreach( Rock.Client.Family family in AllowedCheckinFamilies ) { CreateAllowedCheckinEntry( family ); } } else { AllowedCheckinFamilies = null; } }