mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Merge pull request #4240 from tig/v2_4239-Charmap
This commit is contained in:
@@ -44,15 +44,16 @@ public class RunState : IDisposable
|
||||
}
|
||||
|
||||
#if DEBUG_IDISPOSABLE
|
||||
#pragma warning disable CS0419 // Ambiguous reference in cref attribute
|
||||
/// <summary>
|
||||
/// Gets whether <see cref="Dispose"/> was called on this RunState or not.
|
||||
/// Gets whether <see cref="RunState.Dispose"/> was called on this RunState or not.
|
||||
/// For debug purposes to verify objects are being disposed properly.
|
||||
/// Only valid when DEBUG_IDISPOSABLE is defined.
|
||||
/// </summary>
|
||||
public bool WasDisposed { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of times <see cref="Dispose"/> was called on this object.
|
||||
/// Gets the number of times <see cref="RunState.Dispose"/> was called on this object.
|
||||
/// For debug purposes to verify objects are being disposed properly.
|
||||
/// Only valid when DEBUG_IDISPOSABLE is defined.
|
||||
/// </summary>
|
||||
@@ -71,5 +72,6 @@ public class RunState : IDisposable
|
||||
{
|
||||
Instances.Add (this);
|
||||
}
|
||||
#pragma warning restore CS0419 // Ambiguous reference in cref attribute
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -520,6 +520,7 @@ public partial class View : IDisposable, ISupportInitializeNotification
|
||||
#endregion
|
||||
|
||||
#if DEBUG_IDISPOSABLE
|
||||
#pragma warning disable CS0419 // Ambiguous reference in cref attribute
|
||||
/// <summary>
|
||||
/// Gets or sets whether failure to appropriately call Dispose() on a View will result in an Assert.
|
||||
/// The default is <see langword="true"/>.
|
||||
@@ -529,15 +530,16 @@ public partial class View : IDisposable, ISupportInitializeNotification
|
||||
/// </summary>
|
||||
public static bool EnableDebugIDisposableAsserts { get; set; } = true;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether <see cref="Dispose"/> was called on this view or not.
|
||||
/// Gets whether <see cref="View.Dispose"/> was called on this view or not.
|
||||
/// For debug purposes to verify objects are being disposed properly.
|
||||
/// Only valid when DEBUG_IDISPOSABLE is defined.
|
||||
/// </summary>
|
||||
public bool WasDisposed { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of times <see cref="Dispose"/> was called on this view.
|
||||
/// Gets the number of times <see cref="View.Dispose"/> was called on this view.
|
||||
/// For debug purposes to verify objects are being disposed properly.
|
||||
/// Only valid when DEBUG_IDISPOSABLE is defined.
|
||||
/// </summary>
|
||||
@@ -550,5 +552,6 @@ public partial class View : IDisposable, ISupportInitializeNotification
|
||||
/// Only valid when DEBUG_IDISPOSABLE is defined.
|
||||
/// </summary>
|
||||
public static ConcurrentBag<View> Instances { get; private set; } = [];
|
||||
#pragma warning restore CS0419 // Ambiguous reference in cref attribute
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -681,14 +681,20 @@ public class CharMap : View, IDesignable
|
||||
{
|
||||
CopyGlyph ();
|
||||
dlg!.RequestStop ();
|
||||
a.Handled = true;
|
||||
};
|
||||
|
||||
copyCodepoint.Accepting += (s, a) =>
|
||||
{
|
||||
CopyCodePoint ();
|
||||
dlg!.RequestStop ();
|
||||
a.Handled = true;
|
||||
};
|
||||
cancel.Accepting += (s, a) => dlg!.RequestStop ();
|
||||
cancel.Accepting += (s, a) =>
|
||||
{
|
||||
dlg!.RequestStop ();
|
||||
a.Handled = true;
|
||||
};
|
||||
|
||||
var rune = (Rune)SelectedCodePoint;
|
||||
var label = new Label { Text = "IsAscii: ", X = 0, Y = 0 };
|
||||
@@ -765,9 +771,6 @@ public class CharMap : View, IDesignable
|
||||
Strings.btnOk
|
||||
);
|
||||
}
|
||||
|
||||
// BUGBUG: This is a workaround for some weird ScrollView related mouse grab bug
|
||||
Application.MouseGrabHandler.GrabMouse (this);
|
||||
}
|
||||
|
||||
#endregion Details Dialog
|
||||
|
||||
Reference in New Issue
Block a user