2017-05-09 18:19:55 +00:00
|
|
|
|
using System.Collections.Generic;
|
2015-11-26 22:05:29 +00:00
|
|
|
|
|
|
|
|
|
namespace BizHawk.Client.Common
|
|
|
|
|
{
|
2015-12-01 21:16:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// This class holds a separator for RamWatch
|
|
|
|
|
/// Use the static property Instance to get it
|
|
|
|
|
/// </summary>
|
2015-11-26 22:05:29 +00:00
|
|
|
|
public sealed class SeparatorWatch : Watch
|
|
|
|
|
{
|
2015-12-01 21:16:28 +00:00
|
|
|
|
/// <summary>
|
2017-05-17 15:46:56 +00:00
|
|
|
|
/// Initializes a new instance of the <see cref="SeparatorWatch"/> class.
|
2015-12-01 21:16:28 +00:00
|
|
|
|
/// </summary>
|
2015-11-28 21:47:16 +00:00
|
|
|
|
internal SeparatorWatch()
|
2017-05-10 11:45:23 +00:00
|
|
|
|
: base(null, 0, WatchSize.Separator, DisplayType.Separator, true, "")
|
2017-05-09 18:19:55 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
2015-11-28 21:47:16 +00:00
|
|
|
|
|
2015-12-01 21:16:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the separator instance
|
|
|
|
|
/// </summary>
|
2017-05-09 18:19:55 +00:00
|
|
|
|
public static SeparatorWatch Instance => new SeparatorWatch();
|
2015-11-26 22:05:29 +00:00
|
|
|
|
|
2018-09-14 05:28:38 +00:00
|
|
|
|
public static SeparatorWatch NewSeparatorWatch(string description)
|
|
|
|
|
{
|
|
|
|
|
return new SeparatorWatch
|
|
|
|
|
{
|
|
|
|
|
Notes = description
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-01 21:16:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get the appropriate DisplayType
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>DisplayType.Separator nothing else</returns>
|
|
|
|
|
public override IEnumerable<DisplayType> AvailableTypes()
|
|
|
|
|
{
|
|
|
|
|
yield return DisplayType.Separator;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ignore that stuff
|
|
|
|
|
/// </summary>
|
2017-05-09 18:19:55 +00:00
|
|
|
|
public override int Value => 0;
|
2015-11-26 22:05:29 +00:00
|
|
|
|
|
2015-12-01 21:16:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ignore that stuff
|
|
|
|
|
/// </summary>
|
2017-05-09 18:19:55 +00:00
|
|
|
|
public override int ValueNoFreeze => 0;
|
2015-11-26 22:05:29 +00:00
|
|
|
|
|
2015-12-01 21:16:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ignore that stuff
|
|
|
|
|
/// </summary>
|
2017-05-09 18:19:55 +00:00
|
|
|
|
public override int Previous => 0;
|
2015-11-26 22:05:29 +00:00
|
|
|
|
|
2018-09-14 05:28:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ignore that stuff
|
|
|
|
|
/// </summary>
|
|
|
|
|
public override string ValueString => Notes; //"";
|
2015-11-26 22:05:29 +00:00
|
|
|
|
|
2015-12-01 21:16:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ignore that stuff
|
|
|
|
|
/// </summary>
|
2017-05-10 11:45:23 +00:00
|
|
|
|
public override string PreviousStr => "";
|
2015-12-24 13:00:08 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// TTransform the current instance into a displayable (short representation) string
|
|
|
|
|
/// It's used by the "Display on screen" option in the RamWatch window
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>A well formatted string representation</returns>
|
2015-12-24 01:18:39 +00:00
|
|
|
|
public override string ToDisplayString()
|
2015-11-26 22:05:29 +00:00
|
|
|
|
{
|
2018-09-14 05:28:38 +00:00
|
|
|
|
if (Notes == null || Notes == "")
|
|
|
|
|
return "----";
|
|
|
|
|
else
|
|
|
|
|
return Notes;
|
2015-12-01 21:16:28 +00:00
|
|
|
|
}
|
2015-11-26 22:05:29 +00:00
|
|
|
|
|
2018-09-14 05:28:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Transforms the current instance into a string
|
2015-12-01 21:16:28 +00:00
|
|
|
|
/// </summary>
|
2018-09-14 05:28:38 +00:00
|
|
|
|
/// <returns>A <see cref="string"/> representation of the current <see cref="Watch"/></returns>
|
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return $"0\tS\t_\t1\t\t{Notes.Trim('\r', '\n')}";
|
|
|
|
|
//return $"{(Domain == null && Address == 0 ? "0" : Address.ToHexString((Domain?.Size ?? 0xFF - 1).NumHexDigits()))}\t{SizeAsChar}\t{TypeAsChar}\t{Convert.ToInt32(BigEndian)}\t{Domain?.Name}\t{Notes.Trim('\r', '\n')}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ignore that stuff
|
|
|
|
|
/// </summary>
|
|
|
|
|
public override bool Poke(string value)
|
2015-11-26 22:05:29 +00:00
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-01 21:16:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ignore that stuff
|
|
|
|
|
/// </summary>
|
2015-11-26 22:05:29 +00:00
|
|
|
|
public override void ResetPrevious()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-01 21:16:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ignore that stuff
|
|
|
|
|
/// </summary>
|
2017-05-10 11:45:23 +00:00
|
|
|
|
public override string Diff => "";
|
2015-11-26 22:05:29 +00:00
|
|
|
|
|
2015-12-01 21:16:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ignore that stuff
|
|
|
|
|
/// </summary>
|
2017-05-09 18:19:55 +00:00
|
|
|
|
public override uint MaxValue => 0;
|
2015-11-26 22:05:29 +00:00
|
|
|
|
|
2015-12-01 21:16:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ignore that stuff
|
|
|
|
|
/// </summary>
|
2017-05-09 18:19:55 +00:00
|
|
|
|
public override void Update()
|
|
|
|
|
{
|
2018-09-14 05:28:38 +00:00
|
|
|
|
//AddressString = (Notes == null || Notes == "") ? "" : Notes;
|
|
|
|
|
|
|
|
|
|
}
|
2015-11-26 22:05:29 +00:00
|
|
|
|
}
|
|
|
|
|
}
|