Class AdminWindow<T>
Base of the admin lists: a header, a list of rows, details of the selected row, and action buttons.
Inherited Members
Dialog.OnActivating(CommandEventArgs)
Dialog.OnAccepting(CommandEventArgs)
Dialog.OnAccepted(ICommandContext)
Dialog.DefaultBorderStyle
Dialog.DefaultButtonAlignment
Dialog.DefaultButtonAlignmentModes
Dialog.DefaultShadow
Dialog.Canceled
Dialog.Result
Dialog<int>._buttonContainer
Dialog<int>.EndInit()
Dialog<int>.OnSubViewLayout(LayoutEventArgs)
Dialog<int>.OnSubViewsLaidOut(LayoutEventArgs)
Dialog<int>.OnViewportChanged(DrawEventArgs)
Dialog<int>.AddButton(Button)
Dialog<int>.OnDrawingText()
Dialog<int>.OnDrewText()
Dialog<int>.OnGettingAttributeForRole(in VisualRole, ref Attribute)
Dialog<int>.ButtonAlignment
Dialog<int>.ButtonAlignmentModes
Dialog<int>.Buttons
Runnable.SetApp(IApplication)
Runnable.RequestStop()
Runnable.IsRunning
Runnable.IsModal
Runnable.StopRequested
Runnable.IsRunningChanging
Runnable.IsRunningChanged
Runnable.IsModalChanged
View.OnMouseLeave()
View.OnMouseHoldRepeatChanging(ValueChangingEventArgs<MouseFlags?>)
View.OnMouseHoldRepeatChanged(ValueChangedEventArgs<MouseFlags?>)
View.NewMouseEvent(Mouse)
View.RaiseMouseEvent(Mouse)
View.OnMouseEvent(Mouse)
View.RaiseCommandsBoundToButtonFlags(Mouse)
View.RaiseCommandsBoundToWheelFlags(Mouse)
View.InvokeCommandsBoundToMouse(Mouse)
View.OnMouseStateChanged(EventArgs<MouseState>)
View.OnShadowStyleChanged()
View.OnBorderStyleChanged()
View.GetAdornmentsThickness()
View.AddCommand(Command, View.CommandImplementation)
View.GetSupportedCommands()
View.InvokeCommands(Command[], ICommandBinding)
View.InvokeCommand(Command, ICommandBinding)
View.InvokeCommand(Command, ICommandContext)
View.InvokeCommand(Command)
View.RaiseCommandNotBound(ICommandContext)
View.OnCommandNotBound(CommandEventArgs)
View.DefaultAcceptHandler(ICommandContext)
View.RaiseAccepting(ICommandContext)
View.RaiseAccepted(ICommandContext)
View.DefaultActivateHandler(ICommandContext)
View.RaiseActivating(ICommandContext)
View.RaiseActivated(ICommandContext)
View.OnActivated(ICommandContext)
View.DefaultHotKeyHandler(ICommandContext)
View.RaiseHandlingHotKey(ICommandContext)
View.OnHandlingHotKey(CommandEventArgs)
View.RaiseHotKeyCommand(ICommandContext)
View.OnHotKeyCommand(ICommandContext)
View.GetDispatchTarget(ICommandContext)
View.DispatchDown(View, ICommandContext)
View.GetContentWidth()
View.GetContentHeight()
View.GetContentSize()
View.GetWidthRequiredForSubViews()
View.GetAutoWidth()
View.GetAutoHeight()
View.GetHeightRequiredForSubViews()
View.ViewportToScreen()
View.GetViewportOffsetFromFrame()
View.Dispose()
View.ToString()
View.ToDebugString()
View.GetApp()
View.GetDriver()
View.BeginInit()
View.OnEnabledChanged()
View.OnVisibleChanging()
View.OnVisibleChanged()
View.OnTitleChanged()
View.SetCursorNeedsUpdate()
View.DrawAdornments()
View.OnDrawingAdornments()
View.GetCurrentAttribute()
View.GetAttributeForRole(VisualRole)
View.SetAttribute(Attribute)
View.SetAttributeForRole(VisualRole)
View.GetClip()
View.SetClip(Region)
View.SetClipToScreen()
View.ExcludeFromClip(Region)
View.AddViewportToClip()
View.Draw(DrawContext)
View.OnClearingViewport()
View.OnClearedViewport()
View.ClearViewport(DrawContext)
View.OnDrawingText(DrawContext)
View.DrawText(DrawContext)
View.OnDrawingContent(DrawContext)
View.OnDrawingSubViews(DrawContext)
View.OnDrawingSubViews()
View.DrawSubViews(DrawContext)
View.OnDrawComplete(DrawContext)
View.OnRenderingLineCanvas()
View.RenderLineCanvas(DrawContext)
View.GetScheme()
View.OnGettingScheme(out Scheme)
View.SetScheme(Scheme)
View.OnSettingScheme(ValueChangingEventArgs<Scheme>)
View.OnSchemeChanged(ValueChangedEventArgs<Scheme>)
View.OnSuperViewChanging(ValueChangingEventArgs<View>)
View.OnSuperViewChanged(ValueChangedEventArgs<View>)
View.Add(View)
View.Add(params View[])
View.OnSubViewAdding(EventArgs<View>)
View.OnSubViewAdded(View)
View.Remove(View)
View.OnSubViewRemoved(View)
View.RemoveAll()
View.RemoveAll<TView>()
View.GetTopSuperView(View, View)
View.MoveSubViewTowardsEnd(View)
View.MoveSubViewToEnd(View)
View.MoveSubViewTowardsStart(View)
View.MoveSubViewToStart(View)
View.AssignHotKeysToSubViews()
View.AssignHotKeyToView(View)
View.NewKeyDownEvent(Key)
View.OnKeyDown(Key)
View.OnKeyDownNotHandled(Key)
View.NewKeyUpEvent(Key)
View.OnKeyUp(Key)
View.FrameToScreen()
View.OnHeightChanging(ValueChangingEventArgs<Dim>)
View.OnHeightChanged(ValueChangedEventArgs<Dim>)
View.OnWidthChanging(ValueChangingEventArgs<Dim>)
View.OnWidthChanged(ValueChangedEventArgs<Dim>)
View.Layout()
View.SetNeedsLayout()
View.GetContainerSize()
View.AdvanceFocus(NavigationDirection, TabBehavior?)
View.OnAdvancingFocus(NavigationDirection, TabBehavior?)
View.FocusDeepest(NavigationDirection, TabBehavior?)
View.OnFocusedChanged(View, View)
View.OnCanFocusChanged()
View.ClearFocus()
View.SetFocus()
View.SetNeedsDraw()
View.OnTextChanged()
View.RaiseTextChanged()
View.UpdateTextFormatterText()
View.MouseBindings
View.DefaultMouseBindings
View.ViewMouseBindings
View.MouseHoldRepeat
View.MousePositionTracking
View.MouseState
View.MouseHighlightStates
View.Margin
View.ShadowStyle
View.Border
View.BorderStyle
View.Padding
View.Arrangement
View.ConsumeDispatch
View.DefaultAcceptView
View.CommandsToBubbleUp
View.ContentSizeTracksViewport
View.ViewportSettings
View.Viewport
View.Data
View.Id
View.App
View.ScreenContents
View.IsInitialized
View.Enabled
View.Visible
View.Title
View.Cursor
View.Diagnostics
View.LineCanvas
View.SuperViewRendersLineCanvas
View.SchemeName
View.HasScheme
View.SubViews
View.SuperView
View.HotKey
View.HotKeySpecifier
View.AssignHotKeys
View.UsedHotKeys
View.KeyBindings
View.HotKeyBindings
View.DefaultKeyBindings
View.ViewKeyBindings
View.Frame
View.X
View.Y
View.Height
View.Width
View.NeedsLayout
View.ValidatePosDim
View.CanFocus
View.Focused
View.IsCurrentTop
View.MostFocused
View.HasFocus
View.PreviouslyFocused
View.TabStop
View.NeedsDraw
View.HorizontalScrollBar
View.VerticalScrollBar
View.PreserveTrailingSpaces
View.Text
View.TextAlignment
View.TextDirection
View.TextFormatter
View.VerticalTextAlignment
View.MouseEnter
View.MouseLeave
View.MouseHoldRepeatChanging
View.MouseHoldRepeatChanged
View.MouseEvent
View.MouseStateChanged
View.ShadowStyleChanged
View.BorderStyleChanged
View.CommandNotBound
View.Accepting
View.Accepted
View.Activating
View.Activated
View.HandlingHotKey
View.HotKeyCommand
View.ContentSizeChanging
View.ContentSizeChanged
View.ViewportChanged
View.Disposing
View.Initialized
View.EnabledChanged
View.VisibleChanging
View.VisibleChanged
View.TitleChanging
View.TitleChanged
View.GettingAttributeForRole
View.ClearingViewport
View.ClearedViewport
View.DrawingText
View.DrewText
View.DrawingContent
View.DrawingSubViews
View.DrawComplete
View.SchemeNameChanging
View.SchemeNameChanged
View.GettingScheme
View.SchemeChanging
View.SchemeChanged
View.SuperViewChanging
View.SuperViewChanged
View.SubViewAdding
View.SubViewAdded
View.SubViewRemoved
View.Removed
View.HotKeyChanged
View.KeyDown
View.KeyDownNotHandled
View.KeyUp
View.FrameChanged
View.HeightChanging
View.HeightChanged
View.WidthChanging
View.WidthChanged
View.SubViewLayout
View.SubViewsLaidOut
View.AdvancingFocus
View.CanFocusChanged
View.FocusedChanged
View.HasFocusChanging
View.HasFocusChanged
View.Pasting
View.Pasted
View.TextChanging
View.TextChanged
Namespace: Uniform.Chat.Server.Ui
Assembly: uniform-chat-server.dll
Syntax
public abstract class AdminWindow<T> : Dialog, IDisposable, ISupportInitializeNotification, ISupportInitialize, IRunnable<int>, IRunnable, IDesignable
Type Parameters
| Name | Description |
|---|---|
| T | Type of the listed items. |
Constructors
| Edit this page View SourceAdminWindow(IApplication, string, string)
Build the window; subclasses add buttons with AddAction(string, Action), then call Reload().
Declaration
protected AdminWindow(IApplication app, string title, string header)
Parameters
| Type | Name | Description |
|---|---|---|
| IApplication | app | |
| string | title | |
| string | header |
Properties
| Edit this page View SourceSelected
Selected item, if any.
Declaration
protected T? Selected { get; }
Property Value
| Type | Description |
|---|---|
| T |
Tui
Application the window runs in.
Declaration
protected IApplication Tui { get; }
Property Value
| Type | Description |
|---|---|
| IApplication |
Methods
| Edit this page View SourceAddAction(string, Action)
Add an action button after the previous ones.
Declaration
protected void AddAction(string text, Action action)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | |
| Action | action |
Clip(string?, int)
Clip text to a column width, with an ellipsis.
Declaration
protected static string Clip(string? text, int width)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | |
| int | width |
Returns
| Type | Description |
|---|---|
| string |
Describe(T)
Describe an item below the list.
Declaration
protected abstract string Describe(T item)
Parameters
| Type | Name | Description |
|---|---|---|
| T | item |
Returns
| Type | Description |
|---|---|
| string |
FormatRow(T)
Format an item as one row under the header.
Declaration
protected abstract string FormatRow(T item)
Parameters
| Type | Name | Description |
|---|---|---|
| T | item |
Returns
| Type | Description |
|---|---|
| string |
LoadAsync()
Load the items.
Declaration
protected abstract Task<IReadOnlyList<T>> LoadAsync()
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyList<T>> |
Reload()
Reload the items, keeping the selection where possible.
Declaration
protected void Reload()
Run(string, Func<Task>)
Run an action on the server off the UI thread and wait for it; show Matrix errors and lost connections, and return false for them.
Declaration
protected bool Run(string title, Func<Task> action)
Parameters
| Type | Name | Description |
|---|---|---|
| string | title | |
| Func<Task> | action |
Returns
| Type | Description |
|---|---|
| bool |
Implements
Terminal.Gui.App.IRunnable<TResult>
Terminal.Gui.App.IRunnable
Terminal.Gui.ViewBase.IDesignable