Class BaseInteractiveTui<TPrimary, TSecondary>
A base class for your interactive user interface for terminal apps
Inheritance
Implements
Namespace
Syntax
public class BaseInteractiveTui<TPrimary, TSecondary> : IInteractiveTui<TPrimary, TSecondary>
Type Parameters
| Name | Description |
|---|---|
| TPrimary | |
| TSecondary |
Properties
AcceptsEmptyData
Whether empty data is accepted
Property Value
Declaration
public virtual bool AcceptsEmptyData { get; }
Bindings
All key bindings for your interactive user interface
Property Value
Declaration
public List<InteractiveTuiBinding<TPrimary, TSecondary>> Bindings { get; }
BindingsFirstPane
All key bindings for your interactive user interface (first pane)
Property Value
Declaration
public List<InteractiveTuiBinding<TPrimary, TSecondary>> BindingsFirstPane { get; }
BindingsSecondPane
All key bindings for your interactive user interface (first pane)
Property Value
Declaration
public List<InteractiveTuiBinding<TPrimary, TSecondary>> BindingsSecondPane { get; }
CurrentInfoLine
Current info line index
Property Value
Declaration
public int CurrentInfoLine { get; }
CurrentPane
Current pane
Property Value
Declaration
public int CurrentPane { get; }
FirstPaneCurrentSelection
Current selection for the first pane
Property Value
Declaration
public int FirstPaneCurrentSelection { get; }
HelpPages
A list of help pages
Property Value
Declaration
public virtual InteractiveTuiHelpPage[] HelpPages { get; }
PrimaryDataSource
An array, a dictionary, a list, or an enumerable that holds data (pane one)
Property Value
Declaration
public virtual IEnumerable<TPrimary> PrimaryDataSource { get; }
RefreshInterval
How many milliseconds to wait before refreshing? Only applies to single-pane interactive TUI instances. 0 to disable.
Property Value
Declaration
public virtual int RefreshInterval { get; }
SecondPaneCurrentSelection
Current selection for the second pane
Property Value
Declaration
public int SecondPaneCurrentSelection { get; }
SecondPaneInteractable
Whether the user can switch to the second path
Property Value
Declaration
public virtual bool SecondPaneInteractable { get; }
SecondaryDataSource
An array, a dictionary, a list, or an enumerable that holds data (pane two)
Property Value
Declaration
public virtual IEnumerable<TSecondary> SecondaryDataSource { get; }
Settings
Interactive TUI settings
Property Value
Declaration
public InteractiveTuiSettings Settings { get; set; }
Status
Current status
Property Value
Declaration
public string Status { get; }
Methods
GetEntryFromItem(TPrimary)
Gets an entry string from a specified item for listing
Returns
Declaration
public virtual string GetEntryFromItem(TPrimary item)
Parameters
| Name | Type | Description |
|---|---|---|
| item | TPrimary | Target item |
GetEntryFromItemSecondary(TSecondary)
Gets an entry string from a specified item for listing
Returns
Declaration
public virtual string GetEntryFromItemSecondary(TSecondary item)
Parameters
| Name | Type | Description |
|---|---|---|
| item | TSecondary | Target item |
GetInfoFromItem(TPrimary)
Gets the info from the item
Returns
The rendered info so that InteractiveTuiTools can handle its rendering
Declaration
public virtual string GetInfoFromItem(TPrimary item)
Parameters
| Name | Type | Description |
|---|---|---|
| item | TPrimary | Target item |
GetInfoFromItemSecondary(TSecondary)
Gets the info from the item
Returns
The rendered info so that InteractiveTuiTools can handle its rendering
Declaration
public virtual string GetInfoFromItemSecondary(TSecondary item)
Parameters
| Name | Type | Description |
|---|---|---|
| item | TSecondary | Target item |
GetStatusFromItem(TPrimary)
Gets the status from the item
Returns
Declaration
public virtual string GetStatusFromItem(TPrimary item)
Parameters
| Name | Type | Description |
|---|---|---|
| item | TPrimary | Target item |
GetStatusFromItemSecondary(TSecondary)
Gets the status from the item
Returns
Declaration
public virtual string GetStatusFromItemSecondary(TSecondary item)
Parameters
| Name | Type | Description |
|---|---|---|
| item | TSecondary | Target item |
HandleExit()
Handles exiting the interactive TUI
Declaration
public virtual void HandleExit()