mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-30 01:38:01 +01:00
Grouping HexView events in HexViewEventArgs.cs file.
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
//
|
||||
// HexView.cs: A hexadecimal viewer
|
||||
//
|
||||
// TODO:
|
||||
// - Support searching and highlighting of the search result
|
||||
// - Bug showing the last line
|
||||
//
|
||||
using System;
|
||||
|
||||
namespace Terminal.Gui {
|
||||
/// <summary>
|
||||
/// Defines the event arguments for <see cref="HexView.Edited"/> event.
|
||||
/// </summary>
|
||||
public class HexViewEditEventArgs : EventArgs {
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="HexViewEditEventArgs"/> class.
|
||||
/// </summary>
|
||||
/// <param name="position"></param>
|
||||
/// <param name="newValue"></param>
|
||||
public HexViewEditEventArgs (long position, byte newValue)
|
||||
{
|
||||
Position = position;
|
||||
NewValue = newValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the location of the edit.
|
||||
/// </summary>
|
||||
public long Position { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the new value for that <see cref="Position"/>.
|
||||
/// </summary>
|
||||
public byte NewValue { get; }
|
||||
}
|
||||
}
|
||||
@@ -40,4 +40,31 @@ namespace Terminal.Gui {
|
||||
BytesPerLine = lineLength;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines the event arguments for <see cref="HexView.Edited"/> event.
|
||||
/// </summary>
|
||||
public class HexViewEditEventArgs : EventArgs {
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="HexViewEditEventArgs"/> class.
|
||||
/// </summary>
|
||||
/// <param name="position"></param>
|
||||
/// <param name="newValue"></param>
|
||||
public HexViewEditEventArgs (long position, byte newValue)
|
||||
{
|
||||
Position = position;
|
||||
NewValue = newValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the location of the edit.
|
||||
/// </summary>
|
||||
public long Position { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the new value for that <see cref="Position"/>.
|
||||
/// </summary>
|
||||
public byte NewValue { get; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user