Browse Source

Grouping Toplevel events in ToplevelEventArgs.

BDisp 2 years ago
parent
commit
1154eebc75
2 changed files with 23 additions and 26 deletions
  1. 0 26
      Terminal.Gui/Core/ToplevelClosingEventArgs.cs
  2. 23 0
      Terminal.Gui/Core/ToplevelEventArgs.cs

+ 0 - 26
Terminal.Gui/Core/ToplevelClosingEventArgs.cs

@@ -1,26 +0,0 @@
-using System;
-
-namespace Terminal.Gui {
-	/// <summary>
-	/// <see cref="EventArgs"/> implementation for the <see cref="Toplevel.Closing"/> event.
-	/// </summary>
-	public class ToplevelClosingEventArgs : EventArgs {
-		/// <summary>
-		/// The toplevel requesting stop.
-		/// </summary>
-		public View RequestingTop { get; }
-		/// <summary>
-		/// Provides an event cancellation option.
-		/// </summary>
-		public bool Cancel { get; set; }
-
-		/// <summary>
-		/// Initializes the event arguments with the requesting toplevel.
-		/// </summary>
-		/// <param name="requestingTop">The <see cref="RequestingTop"/>.</param>
-		public ToplevelClosingEventArgs (Toplevel requestingTop)
-		{
-			RequestingTop = requestingTop;
-		}
-	}
-}

+ 23 - 0
Terminal.Gui/Core/ToplevelEventArgs.cs

@@ -25,4 +25,27 @@ namespace Terminal.Gui {
 		/// </remarks>
 		public Toplevel Toplevel { get; }
 	}
+
+	/// <summary>
+	/// <see cref="EventArgs"/> implementation for the <see cref="Toplevel.Closing"/> event.
+	/// </summary>
+	public class ToplevelClosingEventArgs : EventArgs {
+		/// <summary>
+		/// The toplevel requesting stop.
+		/// </summary>
+		public View RequestingTop { get; }
+		/// <summary>
+		/// Provides an event cancellation option.
+		/// </summary>
+		public bool Cancel { get; set; }
+
+		/// <summary>
+		/// Initializes the event arguments with the requesting toplevel.
+		/// </summary>
+		/// <param name="requestingTop">The <see cref="RequestingTop"/>.</param>
+		public ToplevelClosingEventArgs (Toplevel requestingTop)
+		{
+			RequestingTop = requestingTop;
+		}
+	}
 }