GH_CursorServer

References
public sealed class GH_CursorServer
Class used to cache and set cursors.

Properties

Count

#
public int Count { get; }
Gets the number of cached cursors.

Methods

AttachCursor

#
public bool AttachCursor(Control control, string name)
Attach a cursor to a control.
control (Control)Control to assign cursor to.
name (string)Name of cursor to assign. This is the filename of the original cursor file minus the extension.
True if cursor was assigned, or false if no matching cursor could be found.

Cursor

#
public Cursor Cursor(string name)
Gets a cursor from the cache.
name (string)Name of cursor to retrieve.
The cursor that is associated with the given name or null if not cursor could be matched.

IsCursor

#
public bool IsCursor(string name)
Test for the existence of a cursor.
name (string)Cursor name to test for.
True if the cursor is cached.

ReferenceCursors

#
public int ReferenceCursors(string folder)
Reference all the cursor files in a given directory.
folder (string)Directory to parse.
The number of cursors referenced. Use the AttachCursor() method to assign a referenced cursor to a control.

ResetCursor

#
public bool ResetCursor(Control control)
Reset the cursor of the given control to default.
control (Control)Control to reset.
True if control was successfully reset, false if iControl is a null reference.