public FloatWithUnitChooserViewController(string title, FloatWithUnit value, Action <FloatWithUnit> onChooseValue) : base(UITableViewStyle.Grouped) { this.floatWithUnit = value; this.onChooseValue = onChooseValue; this.Title = title; }
public static PointWithUnit NewWithY(this PointWithUnit pointWithUnit, FloatWithUnit y) { return(new PointWithUnit() { X = pointWithUnit.X, Y = y }); }
public void SetScanAreaTopMargin(FloatWithUnit topMargin) { this.ScanAreaMargins = new MarginsWithUnit( this.ScanAreaMargins.Left, topMargin, this.ScanAreaMargins.Right, this.ScanAreaMargins.Bottom); }
public void SetScanAreaRightMargin(FloatWithUnit rightMargin) { this.ScanAreaMargins = new MarginsWithUnit( this.ScanAreaMargins.Left, this.ScanAreaMargins.Top, rightMargin, this.ScanAreaMargins.Bottom); }
public void SetScanAreaBottomMargin(FloatWithUnit bottomMargin) { this.ScanAreaMargins = new MarginsWithUnit( this.ScanAreaMargins.Left, this.ScanAreaMargins.Top, this.ScanAreaMargins.Right, bottomMargin); }
public void SetScanAreaLeftMargin(FloatWithUnit leftMargin) { this.ScanAreaMargins = new MarginsWithUnit( leftMargin, this.ScanAreaMargins.Top, this.ScanAreaMargins.Right, this.ScanAreaMargins.Bottom); }
public static PointWithUnit NewWithX(this PointWithUnit pointWithUnit, FloatWithUnit x) { return(new PointWithUnit() { X = x, Y = pointWithUnit.Y }); }
private void RefreshWidth(FloatWithUnit width) { switch (SettingsManager.Instance.CurrentViewfinder) { case RectangularViewfinder _: this.textWidth.Text = width.GetStringWithUnit(this.Context); break; } }
private void RefreshHeight(FloatWithUnit height) { switch (SettingsManager.Instance.CurrentViewfinder) { case RectangularViewfinder _: this.textHeight.Text = height.GetStringWithUnit(this.Context); break; } }
public async Task SetLocationSelectionRadiusMeasureUnitAsync(MeasureUnit value) { if (this.LocationSelection is RadiusLocationSelection) { float currentValue = ((RadiusLocationSelection)this.LocationSelection).Radius.Value; FloatWithUnit newRadius = new FloatWithUnit(currentValue, value); this.LocationSelectionRadiusMeasureUnit = value; await this.SetLocationSelectionAsync(RadiusLocationSelection.Create(newRadius)); } }
public async Task SetLocationSelectionRadiusValueAsync(float value) { if (this.LocationSelection is RadiusLocationSelection) { MeasureUnit currentUnit = ((RadiusLocationSelection)this.LocationSelection).Radius.Unit; FloatWithUnit newRadius = new FloatWithUnit(value, currentUnit); this.LocationSelectionRadiusValue = value; await this.SetLocationSelectionAsync(RadiusLocationSelection.Create(newRadius)); } }
public static MarginsWithUnit NewWithTop(this MarginsWithUnit margins, FloatWithUnit topMargin) { return(new MarginsWithUnit() { Left = margins.Left, Top = topMargin, Right = margins.Right, Bottom = margins.Bottom }); }
public static MarginsWithUnit NewWithRight(this MarginsWithUnit margins, FloatWithUnit rightMargin) { return(new MarginsWithUnit() { Left = margins.Left, Top = margins.Top, Right = rightMargin, Bottom = margins.Bottom }); }
public static MarginsWithUnit NewWithBottom(this MarginsWithUnit margins, FloatWithUnit bottomMargin) { return(new MarginsWithUnit() { Left = margins.Left, Top = margins.Top, Right = margins.Right, Bottom = bottomMargin }); }
public static MarginsWithUnit NewWithLeft(this MarginsWithUnit margins, FloatWithUnit leftMargin) { return(new MarginsWithUnit() { Left = leftMargin, Top = margins.Top, Right = margins.Right, Bottom = margins.Bottom }); }
private LocationTypeRectangular( int displayNameResourceId, bool enabled, SizeSpecification sizeSpecification, FloatWithUnit width, FloatWithUnit height, float heightAspectRatio, float widthAspectRatio) : base(displayNameResourceId, enabled) { this.SizeSpecification = sizeSpecification; this.Width = width; this.Height = height; this.HeightAspectRatio = heightAspectRatio; this.WidthAspectRatio = widthAspectRatio; }
public static string GetStringWithoutUnit(this FloatWithUnit floatWithUnit, Android.Content.Context context) { var textFormat = context?.GetString(Resource.String.size_no_unit); return(string.IsNullOrEmpty(textFormat) ? string.Empty : string.Format(textFormat, floatWithUnit.Value)); }
private void RefreshWidth(FloatWithUnit width) { this.textWidth.Text = width.GetStringWithUnit(this.Context); }
public void GetFloatWithUnit(string title, FloatWithUnit currentValue, Action <FloatWithUnit> actionHandler) { this.NavigationController.PushViewController(new FloatWithUnitChooserViewController(title, currentValue, actionHandler), true); }
private void RefreshHeight(FloatWithUnit height) { this.textHeight.Text = height.GetStringWithUnit(this.Context); }