C# Class MCAEmotiv.GUI.GUIUtils

Contains static GUI-related utility methods
Show file Open project: madelson/Emotiv-Experimenter

Public Methods

Method Description
Alert ( string issue, MessageBoxIcon messageType = MessageBoxIcon.Information ) : void

Alerts the user of the issue

CreateButtonTable ( Direction direction, DockStyle dockStyle ) : System.Windows.Forms.TableLayoutPanel

Creates a table of buttons with the specified direction and dock style

CreateFlatButton ( string text, Action

Creates a button which has been properly stylized for the application GUI

CreateTable ( IEnumerable proportions, Direction direction, DockStyle dockStyle = DockStyle.Fill ) : System.Windows.Forms.TableLayoutPanel

Creates a 1 x n (or n x 1) table with the specified proportions, direction, and dock style

CreateTable ( IEnumerable rowProportions, IEnumerable columnProportions, DockStyle dockStyle = DockStyle.Fill ) : System.Windows.Forms.TableLayoutPanel

Creates a table with the specified proportions and dock style

GetSplitModeImageRectangles ( Rectangle clientRectangle, Size maxImageSize, Rectangle &rectangle1, Rectangle &rectangle2 ) : void

Retrieves the rectangles in which images should be placed in side-by-side mode

IsUserSure ( string question ) : bool

Returns true if the user responded to the question in the affirmative

Method Details

Alert() public static method

Alerts the user of the issue
public static Alert ( string issue, MessageBoxIcon messageType = MessageBoxIcon.Information ) : void
issue string
messageType MessageBoxIcon
return void

CreateButtonTable() public static method

Creates a table of buttons with the specified direction and dock style
public static CreateButtonTable ( Direction direction, DockStyle dockStyle ) : System.Windows.Forms.TableLayoutPanel
direction Direction
dockStyle DockStyle
return System.Windows.Forms.TableLayoutPanel

CreateFlatButton() public static method

Creates a button which has been properly stylized for the application GUI
public static CreateFlatButton ( string text, Action
text string
clickHandler Action
toolTip System.Windows.Forms.ToolTip
toolTipText string
return System.Windows.Forms.Button

CreateTable() public static method

Creates a 1 x n (or n x 1) table with the specified proportions, direction, and dock style
public static CreateTable ( IEnumerable proportions, Direction direction, DockStyle dockStyle = DockStyle.Fill ) : System.Windows.Forms.TableLayoutPanel
proportions IEnumerable
direction Direction
dockStyle DockStyle
return System.Windows.Forms.TableLayoutPanel

CreateTable() public static method

Creates a table with the specified proportions and dock style
public static CreateTable ( IEnumerable rowProportions, IEnumerable columnProportions, DockStyle dockStyle = DockStyle.Fill ) : System.Windows.Forms.TableLayoutPanel
rowProportions IEnumerable
columnProportions IEnumerable
dockStyle DockStyle
return System.Windows.Forms.TableLayoutPanel

GetSplitModeImageRectangles() public static method

Retrieves the rectangles in which images should be placed in side-by-side mode
public static GetSplitModeImageRectangles ( Rectangle clientRectangle, Size maxImageSize, Rectangle &rectangle1, Rectangle &rectangle2 ) : void
clientRectangle System.Drawing.Rectangle
maxImageSize System.Drawing.Size
rectangle1 System.Drawing.Rectangle
rectangle2 System.Drawing.Rectangle
return void

IsUserSure() public static method

Returns true if the user responded to the question in the affirmative
public static IsUserSure ( string question ) : bool
question string
return bool