using System.Collections.Generic; namespace BizHawk.Client.Common { /// /// This class holds a separator for RamWatch /// Use the static property Instance to get it /// public sealed class SeparatorWatch : Watch { /// /// Initializes a new instance of the class. /// internal SeparatorWatch() : base(null, 0, WatchSize.Separator, DisplayType.Separator, true, "") { } /// /// Gets the separator instance /// public static SeparatorWatch Instance => new SeparatorWatch(); public static SeparatorWatch NewSeparatorWatch(string description) { return new SeparatorWatch { Notes = description }; } /// /// Get the appropriate DisplayType /// /// DisplayType.Separator nothing else public override IEnumerable AvailableTypes() { yield return DisplayType.Separator; } /// /// Ignore that stuff /// public override int Value => 0; /// /// Ignore that stuff /// public override int ValueNoFreeze => 0; /// /// Ignore that stuff /// public override int Previous => 0; /// /// Ignore that stuff /// public override string ValueString => Notes; //""; /// /// Ignore that stuff /// public override string PreviousStr => ""; /// /// TTransform the current instance into a displayable (short representation) string /// It's used by the "Display on screen" option in the RamWatch window /// /// A well formatted string representation public override string ToDisplayString() { return string.IsNullOrEmpty(Notes) ? "----" : Notes; } /// /// Transforms the current instance into a string /// /// A representation of the current public override string ToString() { return $"0\tS\t_\t1\t\t{Notes.Trim('\r', '\n')}"; } /// /// Ignore that stuff /// public override bool Poke(string value) { return false; } /// /// Ignore that stuff /// public override void ResetPrevious() { } /// /// Ignore that stuff /// public override string Diff => ""; /// /// Ignore that stuff /// public override uint MaxValue => 0; /// /// Ignore that stuff /// public override void Update() { } } }