Browse Source

Removed the unnecessary event flag too.

BDisp 5 years ago
parent
commit
d788761710

+ 3 - 3
Terminal.Gui/Core/Application.cs

@@ -92,7 +92,7 @@ namespace Terminal.Gui {
 		/// <remarks>
 		///   See also <see cref="Timeout"/>
 		/// </remarks>
-		public static event Action Iteration;
+		public static Action Iteration;
 
 		/// <summary>
 		/// Returns a rectangle that is centered in the screen for the provided size.
@@ -416,7 +416,7 @@ namespace Terminal.Gui {
 		/// This event is fired once when the application is first loaded. The dimensions of the
 		/// terminal are provided.
 		/// </summary>
-		public static event Action<ResizedEventArgs> Loaded;
+		public static Action<ResizedEventArgs> Loaded;
 
 		/// <summary>
 		/// Building block API: Prepares the provided <see cref="Toplevel"/>  for execution.
@@ -678,7 +678,7 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// Invoked when the terminal was resized. The new size of the terminal is provided.
 		/// </summary>
-		public static event Action<ResizedEventArgs> Resized;
+		public static Action<ResizedEventArgs> Resized;
 
 		static void TerminalResized ()
 		{

+ 1 - 1
Terminal.Gui/Core/Toplevel.cs

@@ -53,7 +53,7 @@ namespace Terminal.Gui {
 		/// Subscribe to this event to perform tasks when the <see cref="Toplevel"/> has been laid out and focus has been set.
 		/// changes. A Ready event handler is a good place to finalize initialization after calling `<see cref="Application.Run()"/>(topLevel)`. 
 		/// </summary>
-		public event Action Ready;
+		public Action Ready;
 
 		/// <summary>
 		/// Called from <see cref="Application.RunLoop"/> after the <see cref="Toplevel"/> has entered it's first iteration of the loop. 

+ 10 - 10
Terminal.Gui/Core/View.cs

@@ -124,27 +124,27 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// Event fired when the view gets focus.
 		/// </summary>
-		public event Action<FocusEventArgs> Enter;
+		public Action<FocusEventArgs> Enter;
 
 		/// <summary>
 		/// Event fired when the view looses focus.
 		/// </summary>
-		public event Action<FocusEventArgs> Leave;
+		public Action<FocusEventArgs> Leave;
 
 		/// <summary>
 		/// Event fired when the view receives the mouse event for the first time.
 		/// </summary>
-		public event Action<MouseEventEventArgs> MouseEnter;
+		public Action<MouseEventEventArgs> MouseEnter;
 
 		/// <summary>
 		/// Event fired when the view receives a mouse event for the last time.
 		/// </summary>
-		public event Action<MouseEventEventArgs> MouseLeave;
+		public Action<MouseEventEventArgs> MouseLeave;
 
 		/// <summary>
 		/// Event fired when a mouse event is generated.
 		/// </summary>
-		public event Action<MouseEventEventArgs> MouseClick;
+		public Action<MouseEventEventArgs> MouseClick;
 
 		internal Direction FocusDirection {
 			get => SuperView?.FocusDirection ?? focusDirection;
@@ -988,7 +988,7 @@ namespace Terminal.Gui {
 		/// Rect provides the view-relative rectangle describing the currently visible viewport into the <see cref="View"/>.
 		/// </para>
 		/// </remarks>
-		public event Action<Rect> DrawContent;
+		public Action<Rect> DrawContent;
 
 		/// <summary>
 		/// Enables overrides to draw infinitely scrolled content and/or a background behind added controls. 
@@ -1058,7 +1058,7 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// Invoked when a character key is pressed and occurs after the key up event.
 		/// </summary>
-		public event Action<KeyEventEventArgs> KeyPress;
+		public Action<KeyEventEventArgs> KeyPress;
 
 		/// <inheritdoc/>
 		public override bool ProcessKey (KeyEvent keyEvent)
@@ -1107,7 +1107,7 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// Invoked when a key is pressed
 		/// </summary>
-		public event Action<KeyEventEventArgs> KeyDown;
+		public Action<KeyEventEventArgs> KeyDown;
 
 		/// <param name="keyEvent">Contains the details about the key that produced the event.</param>
 		public override bool OnKeyDown (KeyEvent keyEvent)
@@ -1128,7 +1128,7 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// Invoked when a key is released
 		/// </summary>
-		public event Action<KeyEventEventArgs> KeyUp;
+		public Action<KeyEventEventArgs> KeyUp;
 
 		/// <param name="keyEvent">Contains the details about the key that produced the event.</param>
 		public override bool OnKeyUp (KeyEvent keyEvent)
@@ -1386,7 +1386,7 @@ namespace Terminal.Gui {
 		/// <remarks>
 		/// Subscribe to this event to perform tasks when the <see cref="View"/> has been resized or the layout has otherwise changed.
 		/// </remarks>
-		public event Action<LayoutEventArgs> LayoutComplete;
+		public Action<LayoutEventArgs> LayoutComplete;
 
 		/// <summary>
 		/// Raises the <see cref="LayoutComplete"/> event. Called from  <see cref="LayoutSubviews"/> after all sub-views have been laid out.

+ 1 - 1
Terminal.Gui/Views/Checkbox.cs

@@ -25,7 +25,7 @@ namespace Terminal.Gui {
 		///   raised when the <see cref="CheckBox"/> is activated either with
 		///   the mouse or the keyboard. The passed <c>bool</c> contains the previous state. 
 		/// </remarks>
-		public event Action<bool> Toggled;
+		public Action<bool> Toggled;
 
 		/// <summary>
 		/// Called when the <see cref="Checked"/> property changes. Invokes the <see cref="Toggled"/> event.

+ 1 - 1
Terminal.Gui/Views/ComboBox.cs

@@ -22,7 +22,7 @@ namespace Terminal.Gui {
 		///   Client code can hook up to this event, it is
 		///   raised when the selection has been confirmed.
 		/// </remarks>
-		public event Action<ustring> Changed;
+		public Action<ustring> Changed;
 
 		IList<string> listsource;
 		IList<string> searchset;

+ 1 - 1
Terminal.Gui/Views/DateField.cs

@@ -38,7 +38,7 @@ namespace Terminal.Gui {
 		/// <remarks>
 		///   The passed <see cref="EventArgs"/> is a <see cref="DateTimeEventArgs"/> containing the old, new value and format.
 		/// </remarks>
-		public event Action<DateTimeEventArgs<DateTime>> DateChanged;
+		public Action<DateTimeEventArgs<DateTime>> DateChanged;
 
 		/// <summary>
 		///    Initializes a new instance of <see cref="DateField"/> using <see cref="LayoutStyle.Absolute"/> layout.

+ 2 - 2
Terminal.Gui/Views/ListView.cs

@@ -307,12 +307,12 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// This event is raised when the selected item in the <see cref="ListView"/> has changed.
 		/// </summary>
-		public event Action<ListViewItemEventArgs> SelectedChanged;
+		public Action<ListViewItemEventArgs> SelectedChanged;
 
 		/// <summary>
 		/// This event is raised when the user Double Clicks on an item or presses ENTER to open the selected item.
 		/// </summary>
-		public event Action<ListViewItemEventArgs> OpenSelectedItem;
+		public Action<ListViewItemEventArgs> OpenSelectedItem;
 
 		///<inheritdoc/>
 		public override bool ProcessKey (KeyEvent kb)

+ 2 - 2
Terminal.Gui/Views/Menu.cs

@@ -693,12 +693,12 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// Raised as a menu is opening.
 		/// </summary>
-		public event Action MenuOpening;
+		public Action MenuOpening;
 
 		/// <summary>
 		/// Raised when a menu is closing.
 		/// </summary>
-		public event Action MenuClosing;
+		public Action MenuClosing;
 
 		internal Menu openMenu;
 		Menu openCurrentMenu;

+ 1 - 1
Terminal.Gui/Views/ScrollView.cs

@@ -60,7 +60,7 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// This event is raised when the position on the scrollbar has changed.
 		/// </summary>
-		public event Action ChangedPosition;
+		public Action ChangedPosition;
 
 		/// <summary>
 		/// The position, relative to <see cref="Size"/>, to set the scrollbar at.

+ 1 - 1
Terminal.Gui/Views/TextField.cs

@@ -41,7 +41,7 @@ namespace Terminal.Gui {
 		/// <remarks>
 		///   The passed <see cref="EventArgs"/> is a <see cref="ustring"/> containing the old value. 
 		/// </remarks>
-		public event Action<ustring> Changed;
+		public Action<ustring> Changed;
 
 		/// <summary>
 		/// Initializes a new instance of the <see cref="TextField"/> class using <see cref="LayoutStyle.Computed"/> positioning.

+ 2 - 2
Terminal.Gui/Views/TextView.cs

@@ -285,7 +285,7 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// Raised when the <see cref="Text"/> of the <see cref="TextView"/> changes.
 		/// </summary>
-		public event Action TextChanged;
+		public Action TextChanged;
 
 #if false
 		/// <summary>
@@ -295,7 +295,7 @@ namespace Terminal.Gui {
 		///   Client code can hook up to this event, it is
 		///   raised when the text in the entry changes.
 		/// </remarks>
-		public event Action Changed;
+		public Action Changed;
 #endif
 		/// <summary>
 		///   Initalizes a <see cref="TextView"/> on the specified area, with absolute position and size.

+ 1 - 1
Terminal.Gui/Views/TimeField.cs

@@ -38,7 +38,7 @@ namespace Terminal.Gui {
 		/// <remarks>
 		///   The passed <see cref="EventArgs"/> is a <see cref="DateTimeEventArgs"/> containing the old, new value and format.
 		/// </remarks>
-		public event Action<DateTimeEventArgs<TimeSpan>> TimeChanged;
+		public Action<DateTimeEventArgs<TimeSpan>> TimeChanged;
 
 		/// <summary>
 		///    Initializes a new instance of <see cref="TimeField"/> using <see cref="LayoutStyle.Absolute"/> positioning.