Table of Contents

Class PresentAttribute

Namespace
Hi.MillingSteps
Assembly
HiMech.dll

Attribute for presenting property information with localization support.

public class PresentAttribute : Attribute
Inheritance
PresentAttribute
Inherited Members
Extension Methods

Constructors

PresentAttribute()

Initializes a new instance of the PresentAttribute class.

public PresentAttribute()

PresentAttribute(PresentAttribute)

Initializes a new instance of the PresentAttribute class by copying from another instance.

public PresentAttribute(PresentAttribute src)

Parameters

src PresentAttribute

The source attribute to copy from.

PresentAttribute(string, string, PhysicsUnit, string)

Initializes a new instance of the PresentAttribute class with specified parameters.

public PresentAttribute(string name, string shortName, PhysicsUnit unit, string dataFormatString)

Parameters

name string

The display name of the property.

shortName string

The short name of the property.

unit PhysicsUnit

The physics unit of the property.

dataFormatString string

The format string for displaying the property value.

Properties

DataFormatString

Gets or sets the format string for displaying the property value.

public string DataFormatString { get; set; }

Property Value

string

Name

Gets or sets the display name of the property.

public string Name { get; set; }

Property Value

string

ShortName

Gets or sets the short name of the property.

public string ShortName { get; set; }

Property Value

string

TailUnitString

Gets the unit string with parentheses for display purposes.

public string TailUnitString { get; }

Property Value

string

Unit

Gets or sets the physics unit of the property.

public PhysicsUnit Unit { get; set; }

Property Value

PhysicsUnit

Methods

GetPresentName(StringLocalizer)

Gets the localized presentation name with unit string.

public string GetPresentName(StringLocalizer loc)

Parameters

loc StringLocalizer

The string localizer.

Returns

string

The localized name with unit string.

GetPresentName(IStringLocalizer)

Gets the localized presentation name with unit string.

public string GetPresentName(IStringLocalizer loc)

Parameters

loc IStringLocalizer

The string localizer.

Returns

string

The localized name with unit string.