C# Class Nexus.Client.ModManagement.Scripting.UIUtil

This class displays UI elements on another thread.
This class is useful for marshalling UI interaction to the UI thread.
Show file Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
Select ( IList p_lstOptions, string p_strTitle, bool p_booSelectMany ) : string[]

Displays a selection form to the user.

ShowExtendedMessageBox ( string p_strMessage, string p_strCaption, string p_strDetails, MessageBoxButtons p_mbbButtons, MessageBoxIcon p_mbiIcon ) : DialogResult

Displays an extended message box.

ShowMessageBox ( string p_strMessage ) : DialogResult

Displays a message box.

ShowMessageBox ( string p_strMessage, string p_strCaption ) : DialogResult

Displays a message box.

ShowMessageBox ( string p_strMessage, string p_strCaption, MessageBoxButtons p_mbbButtons ) : DialogResult

Displays a message box.

ShowMessageBox ( string p_strMessage, string p_strCaption, MessageBoxButtons p_mbbButtons, MessageBoxIcon p_mbiIcon ) : DialogResult

Displays a message box.

UIUtil ( IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, SynchronizationContext p_scxSyncContext ) : System.Collections.Generic

A simple constructor that initializes the object with the given values.

Private Methods

Method Description
ShowSelect ( IList p_lstOptions, string p_strTitle, bool p_booSelectMany ) : string[]

Displays a selection form to the user.

This method is called by the SynchronizationContext in order to create and execute the form on the appropriate thread.

Method Details

Select() public method

Displays a selection form to the user.
public Select ( IList p_lstOptions, string p_strTitle, bool p_booSelectMany ) : string[]
p_lstOptions IList The options from which to select.
p_strTitle string The title of the selection form.
p_booSelectMany bool Whether more than one items can be selected.
return string[]

ShowExtendedMessageBox() public method

Displays an extended message box.
public ShowExtendedMessageBox ( string p_strMessage, string p_strCaption, string p_strDetails, MessageBoxButtons p_mbbButtons, MessageBoxIcon p_mbiIcon ) : DialogResult
p_strMessage string The message to display.
p_strCaption string The caption of the message box.
p_strDetails string The details to display.
p_mbbButtons MessageBoxButtons The buttons to show on the message box.
p_mbiIcon MessageBoxIcon The icon to show on the message box.
return DialogResult

ShowMessageBox() public method

Displays a message box.
public ShowMessageBox ( string p_strMessage ) : DialogResult
p_strMessage string The message to display.
return DialogResult

ShowMessageBox() public method

Displays a message box.
public ShowMessageBox ( string p_strMessage, string p_strCaption ) : DialogResult
p_strMessage string The message to display.
p_strCaption string The caption of the message box.
return DialogResult

ShowMessageBox() public method

Displays a message box.
public ShowMessageBox ( string p_strMessage, string p_strCaption, MessageBoxButtons p_mbbButtons ) : DialogResult
p_strMessage string The message to display.
p_strCaption string The caption of the message box.
p_mbbButtons MessageBoxButtons The buttons to show on the message box.
return DialogResult

ShowMessageBox() public method

Displays a message box.
public ShowMessageBox ( string p_strMessage, string p_strCaption, MessageBoxButtons p_mbbButtons, MessageBoxIcon p_mbiIcon ) : DialogResult
p_strMessage string The message to display.
p_strCaption string The caption of the message box.
p_mbbButtons MessageBoxButtons The buttons to show on the message box.
p_mbiIcon MessageBoxIcon The icon to show on the message box.
return DialogResult

UIUtil() public method

A simple constructor that initializes the object with the given values.
public UIUtil ( IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, SynchronizationContext p_scxSyncContext ) : System.Collections.Generic
p_gmdGameMode IGameMode The current game mode.
p_eifEnvironmentInfo IEnvironmentInfo The application's envrionment info.
p_scxSyncContext System.Threading.SynchronizationContext The synchronization context to use to marshall calls to the UI thread.
return System.Collections.Generic