using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp.Menu { /// /// Define a Plain text menu. ///
This menu is a bit special. It display some text, and then, the only action that can be performed is the back return. Usefull for testing. ///
internal class PlainText : IMenu { #region Constructors /// /// Constructor of the Plain text menu. /// /// The text buffer to display. public PlainText(string text) { InputStr = new StringBuilder(text); WriteMode = false; } #endregion #region IMenu implementation public IMenu? Return() { return null; } public void Display() { Console.Clear(); Console.WriteLine(InputStr); } public bool WriteMode { get; set; } public StringBuilder InputStr { get; set; } public void DisableWriteMode() { } public void EnableWriteMode() { } public void SelectNext() { } public void SelectPrevious() { } public void ToggleWriteMode() { } public void Update() { } public void WriteMenuMode(ConsoleKeyInfo cki) { } #endregion } }