private void RefreshRectangularViewfinderData(ViewfinderTypeRectangular viewfinder) { this.textType.Text = this.Context.GetString(viewfinder.DisplayNameResourceId); this.textColor.Text = this.Context.GetString(viewfinder.Color.DisplayNameResourceId); this.textSizeSpecification.Text = this.Context.GetString((int)viewfinder.SizeSpecification); this.RefreshHeight(viewfinder.Height); this.RefreshWidth(viewfinder.Width); this.RefreshHeightAspect(viewfinder.HeightAspect); this.RefreshWidthAspect(viewfinder.WidthAspect); }
private void SetupForRectangularViewfinder(ViewfinderTypeRectangular viewfinder) { this.textType.Visibility = ViewStates.Visible; this.cardRectangular.Visibility = ViewStates.Visible; this.cardAnimation.Visibility = ViewStates.Visible; this.cardSpecifications.Visibility = ViewStates.Visible; this.cardMeasures.Visibility = ViewStates.Visible; this.cardLaserline.Visibility = ViewStates.Gone; this.cardAimer.Visibility = ViewStates.Gone; SizeSpecification spec = viewfinder.SizeSpecification; switch (spec) { case SizeSpecification.WidthAndHeight: this.containerHeight.Visibility = ViewStates.Visible; this.containerWidth.Visibility = ViewStates.Visible; this.containerHeightAspect.Visibility = ViewStates.Gone; this.containerWidthAspect.Visibility = ViewStates.Gone; this.containerShorterDimension.Visibility = ViewStates.Gone; this.containerShorterDimensionAspect.Visibility = ViewStates.Gone; break; case SizeSpecification.HeightAndWidthAspect: this.containerHeight.Visibility = ViewStates.Visible; this.containerWidth.Visibility = ViewStates.Gone; this.containerHeightAspect.Visibility = ViewStates.Gone; this.containerWidthAspect.Visibility = ViewStates.Visible; this.containerShorterDimension.Visibility = ViewStates.Gone; this.containerShorterDimensionAspect.Visibility = ViewStates.Gone; break; case SizeSpecification.WidthAndHeightAspect: this.containerHeight.Visibility = ViewStates.Gone; this.containerWidth.Visibility = ViewStates.Visible; this.containerHeightAspect.Visibility = ViewStates.Visible; this.containerWidthAspect.Visibility = ViewStates.Gone; this.containerShorterDimension.Visibility = ViewStates.Gone; this.containerShorterDimensionAspect.Visibility = ViewStates.Gone; break; case SizeSpecification.ShorterDimensionAndAspect: this.containerHeight.Visibility = ViewStates.Gone; this.containerWidth.Visibility = ViewStates.Gone; this.containerHeightAspect.Visibility = ViewStates.Gone; this.containerWidthAspect.Visibility = ViewStates.Gone; this.containerShorterDimension.Visibility = ViewStates.Visible; this.containerShorterDimensionAspect.Visibility = ViewStates.Visible; break; } this.RefreshRectangularViewfinderData(viewfinder); }
private void RefreshRectangularViewfinderData(ViewfinderTypeRectangular viewfinder) { this.textType.Text = this.Context.GetString(viewfinder.DisplayNameResourceId); this.textColor.Text = this.Context.GetString(viewfinder.Color.DisplayNameResourceId); this.textRectangularDisabledColor.Text = this.Context.GetString(viewfinder.DisabledColor.DisplayNameResourceId); this.textRectangularStyle.Text = viewfinder.Style.Name(); this.textRectangularLineStyle.Text = viewfinder.LineStyle.Name(); this.textSizeSpecification.Text = this.Context.GetString((int)viewfinder.SizeSpecification); this.RefreshHeight(viewfinder.Height); this.RefreshWidth(viewfinder.Width); this.RefreshHeightAspect(viewfinder.HeightAspect); this.RefreshWidthAspect(viewfinder.WidthAspect); if (viewfinder.ShorterDimension != null) { this.RefreshShorterDimension(viewfinder.ShorterDimension.Value); this.RefreshLongerDimensionAspect(viewfinder.LongerDimensionAspect); } this.RefreshDimming(viewfinder.Dimming); this.RefreshRectangularAnimation(viewfinder.Animation); this.RefreshRectangularLooping(viewfinder.Looping); }