C# Class Nexus.Client.ModManagement.Scripting.ModScript.ModScriptUIUtil

This class displays UI elements on another thread.
This class is useful for marshalling UI interaction to the UI thread.
Inheritance: UIUtil
ファイルを表示 Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
GetText ( string p_strTitle, string p_strInitialValue ) : string

Displays text editor, and returns the entered text.

ModScriptUIUtil ( IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, SynchronizationContext p_scxSyncContext ) : System.Threading

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

ShowImage ( Image p_imgImage, string p_strTitle ) : void

Displays the given image.

ShowText ( string p_strTitle, string p_strInitialValue ) : void

Displays text.

Private Methods

Method Description
ShowImageViewer ( Image p_imgImage, string p_strTitle ) : void

Displays the given image.

This method is called by the SynchronizationContext so that the image viewer is created and displayed on the UI thread.

Method Details

GetText() public method

Displays text editor, and returns the entered text.
public GetText ( string p_strTitle, string p_strInitialValue ) : string
p_strTitle string The title of the editor.
p_strInitialValue string The initial value of the editor.
return string

ModScriptUIUtil() public method

A simple constructor that initializes the object with the given values.
public ModScriptUIUtil ( IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, SynchronizationContext p_scxSyncContext ) : System.Threading
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.Threading

ShowImage() public method

Displays the given image.
public ShowImage ( Image p_imgImage, string p_strTitle ) : void
p_imgImage Image The image to display.
p_strTitle string The title to display in the image viewer.
return void

ShowText() public method

Displays text.
public ShowText ( string p_strTitle, string p_strInitialValue ) : void
p_strTitle string The title of the editor.
p_strInitialValue string The initial value of the editor.
return void