C# Класс RoomEditorApp.Util

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
SvgFlip bool

Открытые методы

Метод Описание
AngleString ( double angle ) : string

Return a string representation in degrees for an angle given in radians.

BoundingBoxString ( BoundingBoxUV b ) : string

Return a string for a 2D bounding box formatted to two decimal places.

BoundingBoxString ( BoundingBoxXYZ b ) : string

Return a string for a 3D bounding box formatted to two decimal places.

BrowseDirectory ( string &path, bool allowCreate ) : bool
ConvertDegreesToRadians ( int d ) : double
ConvertFeetToMillimetres ( double d ) : int
ConvertMillimetresToFeet ( int d ) : double
ConvertRadiansToDegrees ( double d ) : int
CurveEndpointString ( Curve c ) : string

Return a string displaying the two XYZ endpoints of a geometry curve element.

CurveEndpointString2d ( Curve c ) : string

Return a string displaying only the XY values of the two XYZ endpoints of a geometry curve element.

DotOrColon ( int n ) : string

Return a dot (full stop) for zero or a colon for more than zero.

ElementDescription ( Element e ) : string

Return a string describing the given element: .NET type name, category name, family and symbol name for a family instance, element id and element name.

ErrorMsg ( string msg ) : void

Display an error message.

GetElementProperties ( Element e ) : string>.Dictionary

Return a dictionary of all the given element parameter names and values.

InfoMsg ( string msg ) : void

Display a short big message.

InfoMsg2 ( string instruction, string msg, bool prompt = true ) : void

Display a longer message in smaller font.

IsEqual ( double a, double b ) : bool
IsModifiable ( Parameter p ) : bool

Return a dictionary of all the given element parameter names and values.

IsSameOrSubclassOf ( Type a, Type b ) : bool

Return true if the type b is either a subclass of OR equal to the base class itself. IsSubclassOf returns false if the two types are the same. It only returns true for true non-equal subclasses.

IsZero ( double a ) : bool
IsZero ( double a, double tolerance ) : bool
Log ( string msg ) : void

Print a debug log message with a time stamp to the Visual Studio debug output window.

OutlineString ( Outline o ) : string

Return a string for an Outline formatted to two decimal places.

PluralString ( int n, string thing ) : string

Return an English pluralised string for the given thing or things. If the thing ends with 'y', the plural is assumes to end with 'ies', e.g. (2, 'chair') -- '2 chairs' (2, 'property') -- '2 properties' (2, 'furniture item') -- '2 furniture items' If in doubt, appending 'item' or 'entry' to the thing description is normally a pretty safe bet. Replaces calls to PluralSuffix and PluralSuffixY.

PluralSuffix ( int n ) : string

Return an English plural suffix for the given number of items, i.e. 's' for zero or more than one, and nothing for exactly one.

PluralSuffixY ( int n ) : string

Return an English plural suffix 'ies' or 'y' for the given number of items.

PointString ( UV p ) : string

Return a string for a UV point or vector with its coordinates formatted to two decimal places.

PointString ( XYZ p ) : string

Return a string for an XYZ point or vector with its coordinates formatted to two decimal places.

PointString2d ( XYZ p ) : string

Return a string for the XY values of an XYZ point or vector with its coordinates formatted to two decimal places.

RealString ( double a ) : string

Return a string for a real number formatted to two decimal places.

SheetDescription ( Element e ) : string

Return a string describing the given sheet: sheet number and name.

SvgFlipY ( int y ) : int

Flip Y coordinate for SVG export.

Uncapitalise ( string s ) : string

Uncapitalise string, i.e. lowercase its first character.

Описание методов

AngleString() публичный статический Метод

Return a string representation in degrees for an angle given in radians.
public static AngleString ( double angle ) : string
angle double
Результат string

BoundingBoxString() публичный статический Метод

Return a string for a 2D bounding box formatted to two decimal places.
public static BoundingBoxString ( BoundingBoxUV b ) : string
b BoundingBoxUV
Результат string

BoundingBoxString() публичный статический Метод

Return a string for a 3D bounding box formatted to two decimal places.
public static BoundingBoxString ( BoundingBoxXYZ b ) : string
b BoundingBoxXYZ
Результат string

BrowseDirectory() публичный статический Метод

public static BrowseDirectory ( string &path, bool allowCreate ) : bool
path string
allowCreate bool
Результат bool

ConvertDegreesToRadians() публичный статический Метод

public static ConvertDegreesToRadians ( int d ) : double
d int
Результат double

ConvertFeetToMillimetres() публичный статический Метод

public static ConvertFeetToMillimetres ( double d ) : int
d double
Результат int

ConvertMillimetresToFeet() публичный статический Метод

public static ConvertMillimetresToFeet ( int d ) : double
d int
Результат double

ConvertRadiansToDegrees() публичный статический Метод

public static ConvertRadiansToDegrees ( double d ) : int
d double
Результат int

CurveEndpointString() публичный статический Метод

Return a string displaying the two XYZ endpoints of a geometry curve element.
public static CurveEndpointString ( Curve c ) : string
c Curve
Результат string

CurveEndpointString2d() публичный статический Метод

Return a string displaying only the XY values of the two XYZ endpoints of a geometry curve element.
public static CurveEndpointString2d ( Curve c ) : string
c Curve
Результат string

DotOrColon() публичный статический Метод

Return a dot (full stop) for zero or a colon for more than zero.
public static DotOrColon ( int n ) : string
n int
Результат string

ElementDescription() публичный статический Метод

Return a string describing the given element: .NET type name, category name, family and symbol name for a family instance, element id and element name.
public static ElementDescription ( Element e ) : string
e Element
Результат string

ErrorMsg() публичный статический Метод

Display an error message.
public static ErrorMsg ( string msg ) : void
msg string
Результат void

GetElementProperties() публичный статический Метод

Return a dictionary of all the given element parameter names and values.
public static GetElementProperties ( Element e ) : string>.Dictionary
e Element
Результат string>.Dictionary

InfoMsg() публичный статический Метод

Display a short big message.
public static InfoMsg ( string msg ) : void
msg string
Результат void

InfoMsg2() публичный статический Метод

Display a longer message in smaller font.
public static InfoMsg2 ( string instruction, string msg, bool prompt = true ) : void
instruction string
msg string
prompt bool
Результат void

IsEqual() публичный статический Метод

public static IsEqual ( double a, double b ) : bool
a double
b double
Результат bool

IsModifiable() публичный статический Метод

Return a dictionary of all the given element parameter names and values.
public static IsModifiable ( Parameter p ) : bool
p Parameter
Результат bool

IsSameOrSubclassOf() публичный статический Метод

Return true if the type b is either a subclass of OR equal to the base class itself. IsSubclassOf returns false if the two types are the same. It only returns true for true non-equal subclasses.
public static IsSameOrSubclassOf ( Type a, Type b ) : bool
a System.Type
b System.Type
Результат bool

IsZero() публичный статический Метод

public static IsZero ( double a ) : bool
a double
Результат bool

IsZero() публичный статический Метод

public static IsZero ( double a, double tolerance ) : bool
a double
tolerance double
Результат bool

Log() публичный статический Метод

Print a debug log message with a time stamp to the Visual Studio debug output window.
public static Log ( string msg ) : void
msg string
Результат void

OutlineString() публичный статический Метод

Return a string for an Outline formatted to two decimal places.
public static OutlineString ( Outline o ) : string
o Outline
Результат string

PluralString() публичный статический Метод

Return an English pluralised string for the given thing or things. If the thing ends with 'y', the plural is assumes to end with 'ies', e.g. (2, 'chair') -- '2 chairs' (2, 'property') -- '2 properties' (2, 'furniture item') -- '2 furniture items' If in doubt, appending 'item' or 'entry' to the thing description is normally a pretty safe bet. Replaces calls to PluralSuffix and PluralSuffixY.
public static PluralString ( int n, string thing ) : string
n int
thing string
Результат string

PluralSuffix() публичный статический Метод

Return an English plural suffix for the given number of items, i.e. 's' for zero or more than one, and nothing for exactly one.
public static PluralSuffix ( int n ) : string
n int
Результат string

PluralSuffixY() публичный статический Метод

Return an English plural suffix 'ies' or 'y' for the given number of items.
public static PluralSuffixY ( int n ) : string
n int
Результат string

PointString() публичный статический Метод

Return a string for a UV point or vector with its coordinates formatted to two decimal places.
public static PointString ( UV p ) : string
p UV
Результат string

PointString() публичный статический Метод

Return a string for an XYZ point or vector with its coordinates formatted to two decimal places.
public static PointString ( XYZ p ) : string
p XYZ
Результат string

PointString2d() публичный статический Метод

Return a string for the XY values of an XYZ point or vector with its coordinates formatted to two decimal places.
public static PointString2d ( XYZ p ) : string
p XYZ
Результат string

RealString() публичный статический Метод

Return a string for a real number formatted to two decimal places.
public static RealString ( double a ) : string
a double
Результат string

SheetDescription() публичный статический Метод

Return a string describing the given sheet: sheet number and name.
public static SheetDescription ( Element e ) : string
e Element
Результат string

SvgFlipY() публичный статический Метод

Flip Y coordinate for SVG export.
public static SvgFlipY ( int y ) : int
y int
Результат int

Uncapitalise() публичный статический Метод

Uncapitalise string, i.e. lowercase its first character.
public static Uncapitalise ( string s ) : string
s string
Результат string

Описание свойств

SvgFlip публичное статическое свойство

public static bool SvgFlip
Результат bool