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
Afficher le fichier Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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.
Résultat string

ModScriptUIUtil() public méthode

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.
Résultat System.Threading

ShowImage() public méthode

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.
Résultat void

ShowText() public méthode

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.
Résultat void