Undocumented WHS classes: MiscUtils

A new article in the series of undocumented API’s in Windows Home Server.

This new article describes the undocumented functions in the MiscUtils class which is located in HomeServerControls.dll.
This class is a handy little helper.
You can find it here.

The following functions are explained:
string DropSecondsFromTimeFormat(string timeFormat)
string FormatDescriptionToFixedWidth(string description, int maxChars)
uint GetPercentage(long value, long total)
bool IsCorrectLogonName(string name)
bool IsLetterOrDigit(string name)
bool IsValidHelpFile(string helpFileName)
string LastPieceOfThePathName(string name)
string LegibleDateTime(DateTime dateTime)
string LegibleDuration(TimeSpan duration)
string LegibleExcludedFolderName(string name)
string LegibleFolderNameSize(string name, long size)
string LegibleLocalDateTime(DateTime dateTime)
string LegibleSize(long lSizeInBytes)
string LegibleSize(long lSizeInBytes, int decimalPlaces)
string LegibleSize(long lSizeInBytes, int decimalPlaces, int maxLength)
string LegibleVolumeName(string volumeName, string mountPoint)
DateTime LocalTime(DateTime timeUTC)
string NameFromFriendlyPieces(string volumeFriendlyName, string folderName)
string PathNameWithoutLastPiece(string name)
bool SafeCharacters(string name)
bool SafeCharactersSafeEnding(string name)
bool SafeNameCharacters(string name)
void SetEnabled(Control control, bool enabled)
void SetImage(PictureBox control, System.Drawing.Image image)
void SetText(Control control, string text)
void SetValue(ProgressBar control, int value)
void SetVisible(Control control, bool visible)
void AddLineToTextbox(TextBox control, string line)
string StripDriveLetter(string s)
string StripMnemonicChar(string text)

Advertisements

Tags: , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: