Browse Source

Change Action to EventHandler for more events

tznind 2 years ago
parent
commit
3bec36ac47
68 changed files with 225 additions and 225 deletions
  1. 1 1
      Example/Example.cs
  2. 1 1
      README.md
  3. 4 4
      Terminal.Gui/Core/Window.cs
  4. 2 2
      Terminal.Gui/Views/Button.cs
  5. 2 2
      Terminal.Gui/Views/ColorPicker.cs
  6. 10 10
      Terminal.Gui/Views/ComboBox.cs
  7. 2 2
      Terminal.Gui/Views/ContextMenu.cs
  8. 2 2
      Terminal.Gui/Views/Label.cs
  9. 6 6
      Terminal.Gui/Views/ListView.cs
  10. 2 2
      Terminal.Gui/Views/Menu.cs
  11. 2 2
      Terminal.Gui/Views/TextField.cs
  12. 2 2
      Terminal.Gui/Views/TextView.cs
  13. 3 3
      Terminal.Gui/Windows/FileDialog.cs
  14. 1 1
      Terminal.Gui/Windows/MessageBox.cs
  15. 2 2
      Terminal.Gui/Windows/Wizard.cs
  16. 4 4
      UICatalog/KeyBindingsDialog.cs
  17. 1 1
      UICatalog/Scenarios/ASCIICustomButton.cs
  18. 2 2
      UICatalog/Scenarios/AllViewsTester.cs
  19. 4 4
      UICatalog/Scenarios/BackgroundWorkerCollection.cs
  20. 2 2
      UICatalog/Scenarios/Borders.cs
  21. 3 3
      UICatalog/Scenarios/BordersComparisons.cs
  22. 3 3
      UICatalog/Scenarios/BordersOnContainers.cs
  23. 12 12
      UICatalog/Scenarios/Buttons.cs
  24. 1 1
      UICatalog/Scenarios/CharacterMap.cs
  25. 1 1
      UICatalog/Scenarios/Clipping.cs
  26. 2 2
      UICatalog/Scenarios/ColorPicker.cs
  27. 4 4
      UICatalog/Scenarios/ComboBoxIteration.cs
  28. 4 4
      UICatalog/Scenarios/ComputedLayout.cs
  29. 2 2
      UICatalog/Scenarios/CsvEditor.cs
  30. 5 5
      UICatalog/Scenarios/Dialogs.cs
  31. 18 18
      UICatalog/Scenarios/DynamicMenuBar.cs
  32. 12 12
      UICatalog/Scenarios/DynamicStatusBar.cs
  33. 7 7
      UICatalog/Scenarios/Editor.cs
  34. 1 1
      UICatalog/Scenarios/Generic.cs
  35. 2 2
      UICatalog/Scenarios/InteractiveTree.cs
  36. 1 1
      UICatalog/Scenarios/InvertColors.cs
  37. 12 12
      UICatalog/Scenarios/LabelsAsButtons.cs
  38. 1 1
      UICatalog/Scenarios/ListViewWithSelection.cs
  39. 4 4
      UICatalog/Scenarios/ListsAndCombos.cs
  40. 1 1
      UICatalog/Scenarios/MessageBoxes.cs
  41. 2 2
      UICatalog/Scenarios/MultiColouredTable.cs
  42. 4 4
      UICatalog/Scenarios/Progress.cs
  43. 1 1
      UICatalog/Scenarios/ProgressBarStyles.cs
  44. 1 1
      UICatalog/Scenarios/RunTExample.cs
  45. 3 3
      UICatalog/Scenarios/RuneWidthGreaterThanOne.cs
  46. 3 3
      UICatalog/Scenarios/Scrolling.cs
  47. 1 1
      UICatalog/Scenarios/SendKeys.cs
  48. 1 1
      UICatalog/Scenarios/SingleBackgroundWorker.cs
  49. 4 4
      UICatalog/Scenarios/TableEditor.cs
  50. 2 2
      UICatalog/Scenarios/TextAlignments.cs
  51. 8 8
      UICatalog/Scenarios/Threading.cs
  52. 1 1
      UICatalog/Scenarios/TimeAndDate.cs
  53. 2 2
      UICatalog/Scenarios/VkeyPacketSimulator.cs
  54. 2 2
      UICatalog/Scenarios/WindowsAndFrameViews.cs
  55. 1 1
      UICatalog/Scenarios/WizardAsView.cs
  56. 3 3
      UICatalog/Scenarios/Wizards.cs
  57. 3 3
      UICatalog/UICatalog.cs
  58. 3 3
      UnitTests/Application/MainLoopTests.cs
  59. 2 2
      UnitTests/Core/ViewTests.cs
  60. 1 1
      UnitTests/Menus/ContextMenuTests.cs
  61. 2 2
      UnitTests/Menus/MenuTests.cs
  62. 2 2
      UnitTests/TopLevels/WindowTests.cs
  63. 2 2
      UnitTests/TopLevels/WizardTests.cs
  64. 2 2
      UnitTests/UICatalog/ScenarioTests.cs
  65. 3 3
      UnitTests/Views/ButtonTests.cs
  66. 12 12
      UnitTests/Views/ComboBoxTests.cs
  67. 2 2
      UnitTests/Views/ListViewTests.cs
  68. 1 1
      UnitTests/Views/ScrollBarViewTests.cs

+ 1 - 1
Example/Example.cs

@@ -57,7 +57,7 @@ public class ExampleWindow : Window {
 		};
 		};
 
 
 		// When login button is clicked display a message popup
 		// When login button is clicked display a message popup
-		btnLogin.Clicked += () => {
+		btnLogin.Clicked += (s,e) => {
 			if (usernameText.Text == "admin" && passwordText.Text == "password") {
 			if (usernameText.Text == "admin" && passwordText.Text == "password") {
 				MessageBox.Query ("Logging In", "Login Successful", "Ok");
 				MessageBox.Query ("Logging In", "Login Successful", "Ok");
 				Application.RequestStop ();
 				Application.RequestStop ();

+ 1 - 1
README.md

@@ -121,7 +121,7 @@ public class ExampleWindow : Window {
 		};
 		};
 
 
 		// When login button is clicked display a message popup
 		// When login button is clicked display a message popup
-		btnLogin.Clicked += () => {
+		btnLogin.Clicked += (s,e) => {
 			if (usernameText.Text == "admin" && passwordText.Text == "password") {
 			if (usernameText.Text == "admin" && passwordText.Text == "password") {
 				MessageBox.Query ("Logging In", "Login Successful", "Ok");
 				MessageBox.Query ("Logging In", "Login Successful", "Ok");
 				Application.RequestStop ();
 				Application.RequestStop ();

+ 4 - 4
Terminal.Gui/Core/Window.cs

@@ -383,7 +383,7 @@ namespace Terminal.Gui {
 		public virtual bool OnTitleChanging (ustring oldTitle, ustring newTitle)
 		public virtual bool OnTitleChanging (ustring oldTitle, ustring newTitle)
 		{
 		{
 			var args = new TitleEventArgs (oldTitle, newTitle);
 			var args = new TitleEventArgs (oldTitle, newTitle);
-			TitleChanging?.Invoke (args);
+			TitleChanging?.Invoke (this, args);
 			return args.Cancel;
 			return args.Cancel;
 		}
 		}
 
 
@@ -391,7 +391,7 @@ namespace Terminal.Gui {
 		/// Event fired when the <see cref="Window.Title"/> is changing. Set <see cref="TitleEventArgs.Cancel"/> to 
 		/// Event fired when the <see cref="Window.Title"/> is changing. Set <see cref="TitleEventArgs.Cancel"/> to 
 		/// `true` to cancel the Title change.
 		/// `true` to cancel the Title change.
 		/// </summary>
 		/// </summary>
-		public event Action<TitleEventArgs> TitleChanging;
+		public event EventHandler<TitleEventArgs> TitleChanging;
 
 
 		/// <summary>
 		/// <summary>
 		/// Called when the <see cref="Window.Title"/> has been changed. Invokes the <see cref="TitleChanged"/> event.
 		/// Called when the <see cref="Window.Title"/> has been changed. Invokes the <see cref="TitleChanged"/> event.
@@ -401,12 +401,12 @@ namespace Terminal.Gui {
 		public virtual void OnTitleChanged (ustring oldTitle, ustring newTitle)
 		public virtual void OnTitleChanged (ustring oldTitle, ustring newTitle)
 		{
 		{
 			var args = new TitleEventArgs (oldTitle, newTitle);
 			var args = new TitleEventArgs (oldTitle, newTitle);
-			TitleChanged?.Invoke (args);
+			TitleChanged?.Invoke (this, args);
 		}
 		}
 
 
 		/// <summary>
 		/// <summary>
 		/// Event fired after the <see cref="Window.Title"/> has been changed. 
 		/// Event fired after the <see cref="Window.Title"/> has been changed. 
 		/// </summary>
 		/// </summary>
-		public event Action<TitleEventArgs> TitleChanged;
+		public event EventHandler<TitleEventArgs> TitleChanged;
 	}
 	}
 }
 }

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

@@ -231,7 +231,7 @@ namespace Terminal.Gui {
 		/// </summary>
 		/// </summary>
 		public virtual void OnClicked ()
 		public virtual void OnClicked ()
 		{
 		{
-			Clicked?.Invoke ();
+			Clicked?.Invoke (this, EventArgs.Empty);
 		}
 		}
 
 
 		/// <summary>
 		/// <summary>
@@ -243,7 +243,7 @@ namespace Terminal.Gui {
 		///   raised when the button is activated either with
 		///   raised when the button is activated either with
 		///   the mouse or the keyboard.
 		///   the mouse or the keyboard.
 		/// </remarks>
 		/// </remarks>
-		public event Action Clicked;
+		public event EventHandler Clicked;
 
 
 		///<inheritdoc/>
 		///<inheritdoc/>
 		public override bool MouseEvent (MouseEvent me)
 		public override bool MouseEvent (MouseEvent me)

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

@@ -51,7 +51,7 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// <summary>
 		/// Fired when a color is picked.
 		/// Fired when a color is picked.
 		/// </summary>
 		/// </summary>
-		public event Action ColorChanged;
+		public event EventHandler ColorChanged;
 
 
 		private int selectColorIndex = (int)Color.Black;
 		private int selectColorIndex = (int)Color.Black;
 
 
@@ -65,7 +65,7 @@ namespace Terminal.Gui {
 
 
 			set {
 			set {
 				selectColorIndex = (int)value;
 				selectColorIndex = (int)value;
-				ColorChanged?.Invoke ();
+				ColorChanged?.Invoke (this, EventArgs.Empty);
 				SetNeedsDisplay ();
 				SetNeedsDisplay ();
 			}
 			}
 		}
 		}

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

@@ -214,22 +214,22 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// <summary>
 		/// This event is raised when the selected item in the <see cref="ComboBox"/> has changed.
 		/// This event is raised when the selected item in the <see cref="ComboBox"/> has changed.
 		/// </summary>
 		/// </summary>
-		public event Action<ListViewItemEventArgs> SelectedItemChanged;
+		public event EventHandler<ListViewItemEventArgs> SelectedItemChanged;
 
 
 		/// <summary>
 		/// <summary>
 		/// This event is raised when the drop-down list is expanded.
 		/// This event is raised when the drop-down list is expanded.
 		/// </summary>
 		/// </summary>
-		public event Action Expanded;
+		public event EventHandler Expanded;
 
 
 		/// <summary>
 		/// <summary>
 		/// This event is raised when the drop-down list is collapsed.
 		/// This event is raised when the drop-down list is collapsed.
 		/// </summary>
 		/// </summary>
-		public event Action Collapsed;
+		public event EventHandler Collapsed;
 
 
 		/// <summary>
 		/// <summary>
 		/// This event is raised when the user Double Clicks on an item or presses ENTER to open the selected item.
 		/// This event is raised when the user Double Clicks on an item or presses ENTER to open the selected item.
 		/// </summary>
 		/// </summary>
-		public event Action<ListViewItemEventArgs> OpenSelectedItem;
+		public event EventHandler<ListViewItemEventArgs> OpenSelectedItem;
 
 
 		readonly IList searchset = new List<object> ();
 		readonly IList searchset = new List<object> ();
 		ustring text = "";
 		ustring text = "";
@@ -294,7 +294,7 @@ namespace Terminal.Gui {
 			search.TextChanged += Search_Changed;
 			search.TextChanged += Search_Changed;
 
 
 			listview.Y = Pos.Bottom (search);
 			listview.Y = Pos.Bottom (search);
-			listview.OpenSelectedItem += (ListViewItemEventArgs a) => Selected ();
+			listview.OpenSelectedItem += (object sender, ListViewItemEventArgs a) => Selected ();
 
 
 			this.Add (search, listview);
 			this.Add (search, listview);
 
 
@@ -309,7 +309,7 @@ namespace Terminal.Gui {
 				}
 				}
 			};
 			};
 
 
-			listview.SelectedItemChanged += (ListViewItemEventArgs e) => {
+			listview.SelectedItemChanged += (object sender, ListViewItemEventArgs e) => {
 
 
 				if (!HideDropdownListOnClick && searchset.Count > 0) {
 				if (!HideDropdownListOnClick && searchset.Count > 0) {
 					SetValue (searchset [listview.SelectedItem]);
 					SetValue (searchset [listview.SelectedItem]);
@@ -466,7 +466,7 @@ namespace Terminal.Gui {
 		/// </summary>
 		/// </summary>
 		public virtual void OnExpanded ()
 		public virtual void OnExpanded ()
 		{
 		{
-			Expanded?.Invoke ();
+			Expanded?.Invoke (this, EventArgs.Empty);
 		}
 		}
 
 
 		/// <summary>
 		/// <summary>
@@ -474,7 +474,7 @@ namespace Terminal.Gui {
 		/// </summary>
 		/// </summary>
 		public virtual void OnCollapsed ()
 		public virtual void OnCollapsed ()
 		{
 		{
-			Collapsed?.Invoke ();
+			Collapsed?.Invoke (this, EventArgs.Empty);
 		}
 		}
 
 
 		///<inheritdoc/>
 		///<inheritdoc/>
@@ -515,7 +515,7 @@ namespace Terminal.Gui {
 		{
 		{
 			// Note: Cannot rely on "listview.SelectedItem != lastSelectedItem" because the list is dynamic. 
 			// Note: Cannot rely on "listview.SelectedItem != lastSelectedItem" because the list is dynamic. 
 			// So we cannot optimize. Ie: Don't call if not changed
 			// So we cannot optimize. Ie: Don't call if not changed
-			SelectedItemChanged?.Invoke (new ListViewItemEventArgs (SelectedItem, search.Text));
+			SelectedItemChanged?.Invoke (this, new ListViewItemEventArgs (SelectedItem, search.Text));
 
 
 			return true;
 			return true;
 		}
 		}
@@ -528,7 +528,7 @@ namespace Terminal.Gui {
 		{
 		{
 			var value = search.Text;
 			var value = search.Text;
 			lastSelectedItem = SelectedItem;
 			lastSelectedItem = SelectedItem;
-			OpenSelectedItem?.Invoke (new ListViewItemEventArgs (SelectedItem, value));
+			OpenSelectedItem?.Invoke (this, new ListViewItemEventArgs (SelectedItem, value));
 
 
 			return true;
 			return true;
 		}
 		}

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

@@ -169,7 +169,7 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// <summary>
 		/// Event invoked when the <see cref="ContextMenu.Key"/> is changed.
 		/// Event invoked when the <see cref="ContextMenu.Key"/> is changed.
 		/// </summary>
 		/// </summary>
-		public event Action<Key> KeyChanged;
+		public event EventHandler<KeyChangedEventArgs> KeyChanged;
 
 
 		/// <summary>
 		/// <summary>
 		/// Event invoked when the <see cref="ContextMenu.MouseFlags"/> is changed.
 		/// Event invoked when the <see cref="ContextMenu.MouseFlags"/> is changed.
@@ -194,7 +194,7 @@ namespace Terminal.Gui {
 			set {
 			set {
 				var oldKey = key;
 				var oldKey = key;
 				key = value;
 				key = value;
-				KeyChanged?.Invoke (oldKey);
+				KeyChanged?.Invoke (this, new KeyChangedEventArgs(oldKey,key));
 			}
 			}
 		}
 		}
 
 

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

@@ -68,7 +68,7 @@ namespace Terminal.Gui {
 		///   raised when the button is activated either with
 		///   raised when the button is activated either with
 		///   the mouse or the keyboard.
 		///   the mouse or the keyboard.
 		/// </remarks>
 		/// </remarks>
-		public event Action Clicked;
+		public event EventHandler Clicked;
 
 
 		///// <inheritdoc/>
 		///// <inheritdoc/>
 		//public new ustring Text {
 		//public new ustring Text {
@@ -139,7 +139,7 @@ namespace Terminal.Gui {
 		/// </summary>
 		/// </summary>
 		public virtual void OnClicked ()
 		public virtual void OnClicked ()
 		{
 		{
-			Clicked?.Invoke ();
+			Clicked?.Invoke (this, EventArgs.Empty);
 		}
 		}
 	}
 	}
 }
 }

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

@@ -395,17 +395,17 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// <summary>
 		/// This event is raised when the selected item in the <see cref="ListView"/> has changed.
 		/// This event is raised when the selected item in the <see cref="ListView"/> has changed.
 		/// </summary>
 		/// </summary>
-		public event Action<ListViewItemEventArgs> SelectedItemChanged;
+		public event EventHandler<ListViewItemEventArgs> SelectedItemChanged;
 
 
 		/// <summary>
 		/// <summary>
 		/// This event is raised when the user Double Clicks on an item or presses ENTER to open the selected item.
 		/// This event is raised when the user Double Clicks on an item or presses ENTER to open the selected item.
 		/// </summary>
 		/// </summary>
-		public event Action<ListViewItemEventArgs> OpenSelectedItem;
+		public event EventHandler<ListViewItemEventArgs> OpenSelectedItem;
 
 
 		/// <summary>
 		/// <summary>
 		/// This event is invoked when this <see cref="ListView"/> is being drawn before rendering.
 		/// This event is invoked when this <see cref="ListView"/> is being drawn before rendering.
 		/// </summary>
 		/// </summary>
-		public event Action<ListViewRowEventArgs> RowRender;
+		public event EventHandler<ListViewRowEventArgs> RowRender;
 
 
 		/// <summary>
 		/// <summary>
 		/// Gets the <see cref="CollectionNavigator"/> that searches the <see cref="ListView.Source"/> collection as
 		/// Gets the <see cref="CollectionNavigator"/> that searches the <see cref="ListView.Source"/> collection as
@@ -685,7 +685,7 @@ namespace Terminal.Gui {
 		{
 		{
 			if (selected != lastSelectedItem) {
 			if (selected != lastSelectedItem) {
 				var value = source?.Count > 0 ? source.ToList () [selected] : null;
 				var value = source?.Count > 0 ? source.ToList () [selected] : null;
-				SelectedItemChanged?.Invoke (new ListViewItemEventArgs (selected, value));
+				SelectedItemChanged?.Invoke (this, new ListViewItemEventArgs (selected, value));
 				if (HasFocus) {
 				if (HasFocus) {
 					lastSelectedItem = selected;
 					lastSelectedItem = selected;
 				}
 				}
@@ -707,7 +707,7 @@ namespace Terminal.Gui {
 
 
 			var value = source.ToList () [selected];
 			var value = source.ToList () [selected];
 
 
-			OpenSelectedItem?.Invoke (new ListViewItemEventArgs (selected, value));
+			OpenSelectedItem?.Invoke (this, new ListViewItemEventArgs (selected, value));
 
 
 			return true;
 			return true;
 		}
 		}
@@ -718,7 +718,7 @@ namespace Terminal.Gui {
 		/// <param name="rowEventArgs"></param>
 		/// <param name="rowEventArgs"></param>
 		public virtual void OnRowRender (ListViewRowEventArgs rowEventArgs)
 		public virtual void OnRowRender (ListViewRowEventArgs rowEventArgs)
 		{
 		{
-			RowRender?.Invoke (rowEventArgs);
+			RowRender?.Invoke (this, rowEventArgs);
 		}
 		}
 
 
 		///<inheritdoc/>
 		///<inheritdoc/>

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

@@ -1196,7 +1196,7 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// <summary>
 		/// Raised as a menu is opening.
 		/// Raised as a menu is opening.
 		/// </summary>
 		/// </summary>
-		public event Action<MenuOpeningEventArgs> MenuOpening;
+		public event EventHandler<MenuOpeningEventArgs> MenuOpening;
 
 
 		/// <summary>
 		/// <summary>
 		/// Raised when a menu is opened.
 		/// Raised when a menu is opened.
@@ -1244,7 +1244,7 @@ namespace Terminal.Gui {
 		public virtual MenuOpeningEventArgs OnMenuOpening (MenuBarItem currentMenu)
 		public virtual MenuOpeningEventArgs OnMenuOpening (MenuBarItem currentMenu)
 		{
 		{
 			var ev = new MenuOpeningEventArgs (currentMenu);
 			var ev = new MenuOpeningEventArgs (currentMenu);
-			MenuOpening?.Invoke (ev);
+			MenuOpening?.Invoke (this, ev);
 			return ev;
 			return ev;
 		}
 		}
 
 

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

@@ -228,9 +228,9 @@ namespace Terminal.Gui {
 				});
 				});
 		}
 		}
 
 
-		private void ContextMenu_KeyChanged (Key obj)
+		private void ContextMenu_KeyChanged (object sender, KeyChangedEventArgs e)
 		{
 		{
-			ReplaceKeyBinding (obj, ContextMenu.Key);
+			ReplaceKeyBinding (e.OldKey, e.NewKey);
 		}
 		}
 
 
 		private void HistoryText_ChangeText (HistoryText.HistoryTextItem obj)
 		private void HistoryText_ChangeText (HistoryText.HistoryTextItem obj)

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

@@ -1378,9 +1378,9 @@ namespace Terminal.Gui {
 				});
 				});
 		}
 		}
 
 
-		private void ContextMenu_KeyChanged (Key obj)
+		private void ContextMenu_KeyChanged (object sender, KeyChangedEventArgs e)
 		{
 		{
-			ReplaceKeyBinding (obj, ContextMenu.Key);
+			ReplaceKeyBinding (e.OldKey, e.NewKey);
 		}
 		}
 
 
 		private void Model_LinesLoaded ()
 		private void Model_LinesLoaded ()

+ 3 - 3
Terminal.Gui/Windows/FileDialog.cs

@@ -678,7 +678,7 @@ namespace Terminal.Gui {
 				HideDropdownListOnClick = true
 				HideDropdownListOnClick = true
 			};
 			};
 			cmbAllowedTypes.SetSource (allowedTypes ?? new List<string> ());
 			cmbAllowedTypes.SetSource (allowedTypes ?? new List<string> ());
-			cmbAllowedTypes.OpenSelectedItem += (e) => {
+			cmbAllowedTypes.OpenSelectedItem += (s, e) => {
 				dirListView.AllowedFileTypes = cmbAllowedTypes.Text.ToString ().Split (';');
 				dirListView.AllowedFileTypes = cmbAllowedTypes.Text.ToString ().Split (';');
 				dirListView.Reload ();
 				dirListView.Reload ();
 			};
 			};
@@ -698,7 +698,7 @@ namespace Terminal.Gui {
 			dirListView.FileChanged = (file) => nameEntry.Text = file == ".." ? "" : file;
 			dirListView.FileChanged = (file) => nameEntry.Text = file == ".." ? "" : file;
 			dirListView.SelectedChanged = (file) => nameEntry.Text = file.Item1 == ".." ? "" : file.Item1;
 			dirListView.SelectedChanged = (file) => nameEntry.Text = file.Item1 == ".." ? "" : file.Item1;
 			this.cancel = new Button ("Cancel");
 			this.cancel = new Button ("Cancel");
-			this.cancel.Clicked += () => {
+			this.cancel.Clicked += (s,e) => {
 				Cancel ();
 				Cancel ();
 			};
 			};
 			AddButton (cancel);
 			AddButton (cancel);
@@ -707,7 +707,7 @@ namespace Terminal.Gui {
 				IsDefault = true,
 				IsDefault = true,
 				Enabled = nameEntry.Text.IsEmpty ? false : true
 				Enabled = nameEntry.Text.IsEmpty ? false : true
 			};
 			};
-			this.prompt.Clicked += () => {
+			this.prompt.Clicked += (s,e) => {
 				if (this is OpenDialog) {
 				if (this is OpenDialog) {
 					if (!dirListView.GetValidFilesName (nameEntry.Text.ToString (), out string res)) {
 					if (!dirListView.GetValidFilesName (nameEntry.Text.ToString (), out string res)) {
 						nameEntry.Text = res;
 						nameEntry.Text = res;

+ 1 - 1
Terminal.Gui/Windows/MessageBox.cs

@@ -311,7 +311,7 @@ namespace Terminal.Gui {
 			for (int n = 0; n < buttonList.Count; n++) {
 			for (int n = 0; n < buttonList.Count; n++) {
 				int buttonId = n;
 				int buttonId = n;
 				var b = buttonList [n];
 				var b = buttonList [n];
-				b.Clicked += () => {
+				b.Clicked += (s,e) => {
 					Clicked = buttonId;
 					Clicked = buttonId;
 					Application.RequestStop ();
 					Application.RequestStop ();
 				};
 				};

+ 2 - 2
Terminal.Gui/Windows/Wizard.cs

@@ -400,7 +400,7 @@ namespace Terminal.Gui {
 			}
 			}
 		}
 		}
 
 
-		private void NextfinishBtn_Clicked ()
+		private void NextfinishBtn_Clicked (object sender, EventArgs e)
 		{
 		{
 			if (CurrentStep == GetLastStep ()) {
 			if (CurrentStep == GetLastStep ()) {
 				var args = new WizardButtonEventArgs ();
 				var args = new WizardButtonEventArgs ();
@@ -486,7 +486,7 @@ namespace Terminal.Gui {
 			return null;
 			return null;
 		}
 		}
 
 
-		private void BackBtn_Clicked ()
+		private void BackBtn_Clicked (object sender, EventArgs e)
 		{
 		{
 			var args = new WizardButtonEventArgs ();
 			var args = new WizardButtonEventArgs ();
 			MovingBack?.Invoke (args);
 			MovingBack?.Invoke (args);

+ 4 - 4
UICatalog/KeyBindingsDialog.cs

@@ -154,14 +154,14 @@ namespace UICatalog {
 			btnChange.Clicked += RemapKey;
 			btnChange.Clicked += RemapKey;
 
 
 			var close = new Button ("Ok");
 			var close = new Button ("Ok");
-			close.Clicked += () => {
+			close.Clicked += (s,e) => {
 				Application.RequestStop ();
 				Application.RequestStop ();
 				ViewTracker.Instance.StartUsingNewKeyMap (CurrentBindings);
 				ViewTracker.Instance.StartUsingNewKeyMap (CurrentBindings);
 			};
 			};
 			AddButton (close);
 			AddButton (close);
 
 
 			var cancel = new Button ("Cancel");
 			var cancel = new Button ("Cancel");
-			cancel.Clicked += ()=>Application.RequestStop();
+			cancel.Clicked += (s,e)=>Application.RequestStop();
 			AddButton (cancel);
 			AddButton (cancel);
 
 
 			// Register event handler as the last thing in constructor to prevent early calls
 			// Register event handler as the last thing in constructor to prevent early calls
@@ -172,7 +172,7 @@ namespace UICatalog {
 			SetTextBoxToShowBinding (commands.First());
 			SetTextBoxToShowBinding (commands.First());
 		}
 		}
 
 
-		private void RemapKey ()
+		private void RemapKey (object sender, EventArgs e)
 		{
 		{
 			var cmd = commands [commandsListView.SelectedItem];
 			var cmd = commands [commandsListView.SelectedItem];
 			Key? key = null;
 			Key? key = null;
@@ -201,7 +201,7 @@ namespace UICatalog {
 			SetNeedsDisplay ();
 			SetNeedsDisplay ();
 		}
 		}
 
 
-		private void CommandsListView_SelectedItemChanged (ListViewItemEventArgs obj)
+		private void CommandsListView_SelectedItemChanged (object sender, ListViewItemEventArgs obj)
 		{
 		{
 			SetTextBoxToShowBinding ((Command)obj.Value);
 			SetTextBoxToShowBinding ((Command)obj.Value);
 		}
 		}

+ 1 - 1
UICatalog/Scenarios/ASCIICustomButton.cs

@@ -271,7 +271,7 @@ namespace UICatalog.Scenarios {
 				}
 				}
 			}
 			}
 
 
-			private void Button_Clicked ()
+			private void Button_Clicked (object sender, EventArgs e)
 			{
 			{
 				MessageBox.Query ("Button clicked.", $"'{selected.Text}' clicked!", "Ok");
 				MessageBox.Query ("Button clicked.", $"'{selected.Text}' clicked!", "Ok");
 				if (selected.Text == "Close") {
 				if (selected.Text == "Close") {

+ 2 - 2
UICatalog/Scenarios/AllViewsTester.cs

@@ -83,10 +83,10 @@ namespace UICatalog.Scenarios {
 				AllowsMarking = false,
 				AllowsMarking = false,
 				ColorScheme = Colors.TopLevel,
 				ColorScheme = Colors.TopLevel,
 			};
 			};
-			_classListView.OpenSelectedItem += (a) => {
+			_classListView.OpenSelectedItem += (s, a) => {
 				_settingsPane.SetFocus ();
 				_settingsPane.SetFocus ();
 			};
 			};
-			_classListView.SelectedItemChanged += (args) => {
+			_classListView.SelectedItemChanged += (s,args) => {
 				ClearClass (_curView);
 				ClearClass (_curView);
 				_curView = CreateClass (_viewClasses.Values.ToArray () [_classListView.SelectedItem]);
 				_curView = CreateClass (_viewClasses.Values.ToArray () [_classListView.SelectedItem]);
 			};
 			};

+ 4 - 4
UICatalog/Scenarios/BackgroundWorkerCollection.cs

@@ -69,7 +69,7 @@ namespace UICatalog.Scenarios {
 				Dispose ();
 				Dispose ();
 			}
 			}
 
 
-			private void Menu_MenuOpening (MenuOpeningEventArgs menu)
+			private void Menu_MenuOpening (object sender, MenuOpeningEventArgs menu)
 			{
 			{
 				if (!canOpenWorkerApp) {
 				if (!canOpenWorkerApp) {
 					canOpenWorkerApp = true;
 					canOpenWorkerApp = true;
@@ -328,7 +328,7 @@ namespace UICatalog.Scenarios {
 				Add (listView);
 				Add (listView);
 
 
 				start = new Button ("Start") { IsDefault = true };
 				start = new Button ("Start") { IsDefault = true };
-				start.Clicked += () => {
+				start.Clicked += (s,e) => {
 					Staging = new Staging (DateTime.Now);
 					Staging = new Staging (DateTime.Now);
 					RequestStop ();
 					RequestStop ();
 				};
 				};
@@ -340,7 +340,7 @@ namespace UICatalog.Scenarios {
 
 
 				KeyPress += (s, e) => {
 				KeyPress += (s, e) => {
 					if (e.KeyEvent.Key == Key.Esc) {
 					if (e.KeyEvent.Key == Key.Esc) {
-						OnReportClosed ();
+						OnReportClosed (this, EventArgs.Empty);
 					}
 					}
 				};
 				};
 
 
@@ -358,7 +358,7 @@ namespace UICatalog.Scenarios {
 				};
 				};
 			}
 			}
 
 
-			private void OnReportClosed ()
+			private void OnReportClosed (object sender, EventArgs e)
 			{
 			{
 				if (Staging?.StartStaging != null) {
 				if (Staging?.StartStaging != null) {
 					ReportClosed?.Invoke (this);
 					ReportClosed?.Invoke (this);

+ 2 - 2
UICatalog/Scenarios/Borders.cs

@@ -191,7 +191,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Left (paddingLeftEdit),
 				X = Pos.Left (paddingLeftEdit),
 				Y = 5
 				Y = 5
 			};
 			};
-			replacePadding.Clicked += () => {
+			replacePadding.Clicked += (s,e) => {
 				smartPanel.Child.Border.Padding = new Thickness (smartPanel.Child.Border.Padding.Top);
 				smartPanel.Child.Border.Padding = new Thickness (smartPanel.Child.Border.Padding.Top);
 				smartLabel.Border.Padding = new Thickness (smartLabel.Border.Padding.Top);
 				smartLabel.Border.Padding = new Thickness (smartLabel.Border.Padding.Top);
 				if (paddingTopEdit.Text.IsEmpty) {
 				if (paddingTopEdit.Text.IsEmpty) {
@@ -310,7 +310,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Left (borderLeftEdit),
 				X = Pos.Left (borderLeftEdit),
 				Y = 5
 				Y = 5
 			};
 			};
-			replaceBorder.Clicked += () => {
+			replaceBorder.Clicked += (s,e) => {
 				smartPanel.Child.Border.BorderThickness = new Thickness (smartPanel.Child.Border.BorderThickness.Top);
 				smartPanel.Child.Border.BorderThickness = new Thickness (smartPanel.Child.Border.BorderThickness.Top);
 				smartLabel.Border.BorderThickness = new Thickness (smartLabel.Border.BorderThickness.Top);
 				smartLabel.Border.BorderThickness = new Thickness (smartLabel.Border.BorderThickness.Top);
 				if (borderTopEdit.Text.IsEmpty) {
 				if (borderTopEdit.Text.IsEmpty) {

+ 3 - 3
UICatalog/Scenarios/BordersComparisons.cs

@@ -35,7 +35,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = Pos.Center (),
 				Y = Pos.Center (),
 			};
 			};
-			button.Clicked += () => MessageBox.Query (20, 7, "Hi", "I'm a Window?", "Yes", "No");
+			button.Clicked += (s,e) => MessageBox.Query (20, 7, "Hi", "I'm a Window?", "Yes", "No");
 			var label = new Label ("I'm a Window") {
 			var label = new Label ("I'm a Window") {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = Pos.Center () - 1,
 				Y = Pos.Center () - 1,
@@ -74,7 +74,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = Pos.Center (),
 				Y = Pos.Center (),
 			};
 			};
-			button2.Clicked += () => MessageBox.Query (20, 7, "Hi", "I'm a Toplevel?", "Yes", "No");
+			button2.Clicked += (s,e) => MessageBox.Query (20, 7, "Hi", "I'm a Toplevel?", "Yes", "No");
 			var label2 = new Label ("I'm a Toplevel") {
 			var label2 = new Label ("I'm a Toplevel") {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = Pos.Center () - 1,
 				Y = Pos.Center () - 1,
@@ -110,7 +110,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = Pos.Center (),
 				Y = Pos.Center (),
 			};
 			};
-			button3.Clicked += () => MessageBox.Query (20, 7, "Hi", "I'm a FrameView?", "Yes", "No");
+			button3.Clicked += (s,e) => MessageBox.Query (20, 7, "Hi", "I'm a FrameView?", "Yes", "No");
 			var label3 = new Label ("I'm a FrameView") {
 			var label3 = new Label ("I'm a FrameView") {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = Pos.Center () - 1,
 				Y = Pos.Center () - 1,

+ 3 - 3
UICatalog/Scenarios/BordersOnContainers.cs

@@ -37,7 +37,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = Pos.Center (),
 				Y = Pos.Center (),
 			};
 			};
-			button.Clicked += () => MessageBox.Query (20, 7, "Hi", $"I'm a {typeName}?", "Yes", "No");
+			button.Clicked += (s,e) => MessageBox.Query (20, 7, "Hi", $"I'm a {typeName}?", "Yes", "No");
 			var label = new Label ($"I'm a {typeName}") {
 			var label = new Label ($"I'm a {typeName}") {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = Pos.Center () - 1,
 				Y = Pos.Center () - 1,
@@ -140,7 +140,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Left (paddingLeftEdit),
 				X = Pos.Left (paddingLeftEdit),
 				Y = 5
 				Y = 5
 			};
 			};
-			replacePadding.Clicked += () => {
+			replacePadding.Clicked += (s,e) => {
 				smartView.Border.Padding = new Thickness (smartView.Border.Padding.Top);
 				smartView.Border.Padding = new Thickness (smartView.Border.Padding.Top);
 				if (paddingTopEdit.Text.IsEmpty) {
 				if (paddingTopEdit.Text.IsEmpty) {
 					paddingTopEdit.Text = "0";
 					paddingTopEdit.Text = "0";
@@ -234,7 +234,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Left (borderLeftEdit),
 				X = Pos.Left (borderLeftEdit),
 				Y = 5
 				Y = 5
 			};
 			};
-			replaceBorder.Clicked += () => {
+			replaceBorder.Clicked += (s,e) => {
 				smartView.Border.BorderThickness = new Thickness (smartView.Border.BorderThickness.Top);
 				smartView.Border.BorderThickness = new Thickness (smartView.Border.BorderThickness.Top);
 				if (borderTopEdit.Text.IsEmpty) {
 				if (borderTopEdit.Text.IsEmpty) {
 					borderTopEdit.Text = "0";
 					borderTopEdit.Text = "0";

+ 12 - 12
UICatalog/Scenarios/Buttons.cs

@@ -30,11 +30,11 @@ namespace UICatalog.Scenarios {
 				Y = Pos.Bottom (Win) - 3,
 				Y = Pos.Bottom (Win) - 3,
 				IsDefault = true,
 				IsDefault = true,
 			};
 			};
-			defaultButton.Clicked += () => Application.RequestStop ();
+			defaultButton.Clicked += (s,e) => Application.RequestStop ();
 			Win.Add (defaultButton);
 			Win.Add (defaultButton);
 
 
 			var swapButton = new Button (50, 0, "Swap Default (Absolute Layout)");
 			var swapButton = new Button (50, 0, "Swap Default (Absolute Layout)");
-			swapButton.Clicked += () => {
+			swapButton.Clicked += (s,e) => {
 				defaultButton.IsDefault = !defaultButton.IsDefault;
 				defaultButton.IsDefault = !defaultButton.IsDefault;
 				swapButton.IsDefault = !swapButton.IsDefault;
 				swapButton.IsDefault = !swapButton.IsDefault;
 			};
 			};
@@ -42,7 +42,7 @@ namespace UICatalog.Scenarios {
 
 
 			static void DoMessage (Button button, ustring txt)
 			static void DoMessage (Button button, ustring txt)
 			{
 			{
-				button.Clicked += () => {
+				button.Clicked += (s,e) => {
 					var btnText = button.Text.ToString ();
 					var btnText = button.Text.ToString ();
 					MessageBox.Query ("Message", $"Did you click {txt}?", "Yes", "No");
 					MessageBox.Query ("Message", $"Did you click {txt}?", "Yes", "No");
 				};
 				};
@@ -83,14 +83,14 @@ namespace UICatalog.Scenarios {
 				X = 2,
 				X = 2,
 				Y = Pos.Bottom (button) + 1,
 				Y = Pos.Bottom (button) + 1,
 			});
 			});
-			button.Clicked += () => MessageBox.Query ("Message", "Question?", "Yes", "No");
+			button.Clicked += (s,e) => MessageBox.Query ("Message", "Question?", "Yes", "No");
 
 
 			var textChanger = new Button ("Te_xt Changer") {
 			var textChanger = new Button ("Te_xt Changer") {
 				X = 2,
 				X = 2,
 				Y = Pos.Bottom (button) + 1,
 				Y = Pos.Bottom (button) + 1,
 			};
 			};
 			Win.Add (textChanger);
 			Win.Add (textChanger);
-			textChanger.Clicked += () => textChanger.Text += "!";
+			textChanger.Clicked += (s,e) => textChanger.Text += "!";
 
 
 			Win.Add (button = new Button ("Lets see if this will move as \"Text Changer\" grows") {
 			Win.Add (button = new Button ("Lets see if this will move as \"Text Changer\" grows") {
 				X = Pos.Right (textChanger) + 2,
 				X = Pos.Right (textChanger) + 2,
@@ -104,7 +104,7 @@ namespace UICatalog.Scenarios {
 			};
 			};
 			Win.Add (removeButton);
 			Win.Add (removeButton);
 			// This in interesting test case because `moveBtn` and below are laid out relative to this one!
 			// This in interesting test case because `moveBtn` and below are laid out relative to this one!
-			removeButton.Clicked += () => {
+			removeButton.Clicked += (s,e) => {
 				// Now this throw a InvalidOperationException on the TopologicalSort method as is expected.
 				// Now this throw a InvalidOperationException on the TopologicalSort method as is expected.
 				//Win.Remove (removeButton);
 				//Win.Remove (removeButton);
 
 
@@ -126,7 +126,7 @@ namespace UICatalog.Scenarios {
 				Width = 30,
 				Width = 30,
 				ColorScheme = Colors.Error,
 				ColorScheme = Colors.Error,
 			};
 			};
-			moveBtn.Clicked += () => {
+			moveBtn.Clicked += (s,e) => {
 				moveBtn.X = moveBtn.Frame.X + 5;
 				moveBtn.X = moveBtn.Frame.X + 5;
 				// This is already fixed with the call to SetNeedDisplay() in the Pos Dim.
 				// This is already fixed with the call to SetNeedDisplay() in the Pos Dim.
 				//computedFrame.LayoutSubviews (); // BUGBUG: This call should not be needed. View.X is not causing relayout correctly
 				//computedFrame.LayoutSubviews (); // BUGBUG: This call should not be needed. View.X is not causing relayout correctly
@@ -140,7 +140,7 @@ namespace UICatalog.Scenarios {
 				Width = 30,
 				Width = 30,
 				ColorScheme = Colors.Error,
 				ColorScheme = Colors.Error,
 			};
 			};
-			sizeBtn.Clicked += () => {
+			sizeBtn.Clicked += (s,e) => {
 				sizeBtn.Width = sizeBtn.Frame.Width + 5;
 				sizeBtn.Width = sizeBtn.Frame.Width + 5;
 				//computedFrame.LayoutSubviews (); // FIXED: This call should not be needed. View.X is not causing relayout correctly
 				//computedFrame.LayoutSubviews (); // FIXED: This call should not be needed. View.X is not causing relayout correctly
 			};
 			};
@@ -158,7 +158,7 @@ namespace UICatalog.Scenarios {
 			var moveBtnA = new Button (0, 0, "Move This Button via Frame") {
 			var moveBtnA = new Button (0, 0, "Move This Button via Frame") {
 				ColorScheme = Colors.Error,
 				ColorScheme = Colors.Error,
 			};
 			};
-			moveBtnA.Clicked += () => {
+			moveBtnA.Clicked += (s,e) => {
 				moveBtnA.Frame = new Rect (moveBtnA.Frame.X + 5, moveBtnA.Frame.Y, moveBtnA.Frame.Width, moveBtnA.Frame.Height);
 				moveBtnA.Frame = new Rect (moveBtnA.Frame.X + 5, moveBtnA.Frame.Y, moveBtnA.Frame.Width, moveBtnA.Frame.Height);
 			};
 			};
 			absoluteFrame.Add (moveBtnA);
 			absoluteFrame.Add (moveBtnA);
@@ -167,7 +167,7 @@ namespace UICatalog.Scenarios {
 			var sizeBtnA = new Button (0, 2, " ~  s  gui.cs   master ↑10 = Со_хранить") {
 			var sizeBtnA = new Button (0, 2, " ~  s  gui.cs   master ↑10 = Со_хранить") {
 				ColorScheme = Colors.Error,
 				ColorScheme = Colors.Error,
 			};
 			};
-			sizeBtnA.Clicked += () => {
+			sizeBtnA.Clicked += (s,e) => {
 				sizeBtnA.Frame = new Rect (sizeBtnA.Frame.X, sizeBtnA.Frame.Y, sizeBtnA.Frame.Width + 5, sizeBtnA.Frame.Height);
 				sizeBtnA.Frame = new Rect (sizeBtnA.Frame.X, sizeBtnA.Frame.Y, sizeBtnA.Frame.Width + 5, sizeBtnA.Frame.Height);
 			};
 			};
 			absoluteFrame.Add (sizeBtnA);
 			absoluteFrame.Add (sizeBtnA);
@@ -218,7 +218,7 @@ namespace UICatalog.Scenarios {
 				Width = Dim.Width (computedFrame) - 2,
 				Width = Dim.Width (computedFrame) - 2,
 				ColorScheme = Colors.TopLevel,
 				ColorScheme = Colors.TopLevel,
 			};
 			};
-			moveHotKeyBtn.Clicked += () => {
+			moveHotKeyBtn.Clicked += (s,e) => {
 				moveHotKeyBtn.Text = MoveHotkey (moveHotKeyBtn.Text);
 				moveHotKeyBtn.Text = MoveHotkey (moveHotKeyBtn.Text);
 			};
 			};
 			Win.Add (moveHotKeyBtn);
 			Win.Add (moveHotKeyBtn);
@@ -230,7 +230,7 @@ namespace UICatalog.Scenarios {
 				Width = Dim.Width (absoluteFrame) - 2, // BUGBUG: Not always the width isn't calculated correctly.
 				Width = Dim.Width (absoluteFrame) - 2, // BUGBUG: Not always the width isn't calculated correctly.
 				ColorScheme = Colors.TopLevel,
 				ColorScheme = Colors.TopLevel,
 			};
 			};
-			moveUnicodeHotKeyBtn.Clicked += () => {
+			moveUnicodeHotKeyBtn.Clicked += (s,e) => {
 				moveUnicodeHotKeyBtn.Text = MoveHotkey (moveUnicodeHotKeyBtn.Text);
 				moveUnicodeHotKeyBtn.Text = MoveHotkey (moveUnicodeHotKeyBtn.Text);
 			};
 			};
 			Win.Add (moveUnicodeHotKeyBtn);
 			Win.Add (moveUnicodeHotKeyBtn);

+ 1 - 1
UICatalog/Scenarios/CharacterMap.cs

@@ -84,7 +84,7 @@ namespace UICatalog.Scenarios {
 				Height = Dim.Fill(1),
 				Height = Dim.Fill(1),
 				SelectedItem = 0
 				SelectedItem = 0
 			};
 			};
-			jumpList.SelectedItemChanged += (args) => {
+			jumpList.SelectedItemChanged += (s, args) => {
 				_charMap.StartGlyph = radioItems [jumpList.SelectedItem].start;
 				_charMap.StartGlyph = radioItems [jumpList.SelectedItem].start;
 			};
 			};
 
 

+ 1 - 1
UICatalog/Scenarios/Clipping.cs

@@ -58,7 +58,7 @@ namespace UICatalog.Scenarios {
 			};
 			};
 
 
 			var testButton = new Button (2, 2, "click me");
 			var testButton = new Button (2, 2, "click me");
-			testButton.Clicked += () => {
+			testButton.Clicked += (s,e) => {
 				MessageBox.Query (10, 5, "Test", "test message", "Ok");
 				MessageBox.Query (10, 5, "Test", "test message", "Ok");
 			};
 			};
 			embedded3.Add (testButton);
 			embedded3.Add (testButton);

+ 2 - 2
UICatalog/Scenarios/ColorPicker.cs

@@ -78,7 +78,7 @@ namespace UICatalog.Scenarios {
 		/// <summary>
 		/// <summary>
 		/// Fired when foreground color is changed.
 		/// Fired when foreground color is changed.
 		/// </summary>
 		/// </summary>
-		private void ForegroundColor_ColorChanged ()
+		private void ForegroundColor_ColorChanged (object sender, EventArgs e)
 		{
 		{
 			UpdateColorLabel (foregroundColorLabel, foregroundColorPicker);
 			UpdateColorLabel (foregroundColorLabel, foregroundColorPicker);
 			UpdateDemoLabel ();
 			UpdateDemoLabel ();
@@ -87,7 +87,7 @@ namespace UICatalog.Scenarios {
 		/// <summary>
 		/// <summary>
 		/// Fired when background color is changed.
 		/// Fired when background color is changed.
 		/// </summary>
 		/// </summary>
-		private void BackgroundColor_ColorChanged ()
+		private void BackgroundColor_ColorChanged (object sender, EventArgs e)
 		{
 		{
 			UpdateColorLabel (backgroundColorLabel, backgroundColorPicker);
 			UpdateColorLabel (backgroundColorLabel, backgroundColorPicker);
 			UpdateDemoLabel ();
 			UpdateDemoLabel ();

+ 4 - 4
UICatalog/Scenarios/ComboBoxIteration.cs

@@ -38,12 +38,12 @@ namespace UICatalog.Scenarios {
 			};
 			};
 			comboBox.SetSource (items);
 			comboBox.SetSource (items);
 
 
-			listview.SelectedItemChanged += (e) => {
+			listview.SelectedItemChanged += (s,e) => {
 				lbListView.Text = items [e.Item];
 				lbListView.Text = items [e.Item];
 				comboBox.SelectedItem = e.Item;
 				comboBox.SelectedItem = e.Item;
 			};
 			};
 
 
-			comboBox.SelectedItemChanged += (ListViewItemEventArgs text) => {
+			comboBox.SelectedItemChanged += (object sender, ListViewItemEventArgs text) => {
 				if (text.Item != -1) {
 				if (text.Item != -1) {
 					lbComboBox.Text = text.Value.ToString ();
 					lbComboBox.Text = text.Value.ToString ();
 					listview.SelectedItem = text.Item;
 					listview.SelectedItem = text.Item;
@@ -55,7 +55,7 @@ namespace UICatalog.Scenarios {
 			var btnTwo = new Button ("Two") {
 			var btnTwo = new Button ("Two") {
 				X = Pos.Right (comboBox) + 1,
 				X = Pos.Right (comboBox) + 1,
 			};
 			};
-			btnTwo.Clicked += () => {
+			btnTwo.Clicked += (s,e) => {
 				items = new List<string> () { "one", "two" };
 				items = new List<string> () { "one", "two" };
 				comboBox.SetSource (items);
 				comboBox.SetSource (items);
 				listview.SetSource (items);
 				listview.SetSource (items);
@@ -67,7 +67,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Right (comboBox) + 1,
 				X = Pos.Right (comboBox) + 1,
 				Y = Pos.Top (comboBox)
 				Y = Pos.Top (comboBox)
 			};
 			};
-			btnThree.Clicked += () => {
+			btnThree.Clicked += (s,e) => {
 				items = new List<string> () { "one", "two", "three" };
 				items = new List<string> () { "one", "two", "three" };
 				comboBox.SetSource (items);
 				comboBox.SetSource (items);
 				listview.SetSource (items);
 				listview.SetSource (items);

+ 4 - 4
UICatalog/Scenarios/ComputedLayout.cs

@@ -207,7 +207,7 @@ namespace UICatalog.Scenarios {
 				Y = Pos.AnchorEnd () - 1,
 				Y = Pos.AnchorEnd () - 1,
 			};
 			};
 			anchorButton.X = Pos.AnchorEnd () - (Pos.Right (anchorButton) - Pos.Left (anchorButton));
 			anchorButton.X = Pos.AnchorEnd () - (Pos.Right (anchorButton) - Pos.Left (anchorButton));
-			anchorButton.Clicked += () => {
+			anchorButton.Clicked += (s,e) => {
 				// Ths demonstrates how to have a dynamically sized button
 				// Ths demonstrates how to have a dynamically sized button
 				// Each time the button is clicked the button's text gets longer
 				// Each time the button is clicked the button's text gets longer
 				// The call to Application.Top.LayoutSubviews causes the Computed layout to
 				// The call to Application.Top.LayoutSubviews causes the Computed layout to
@@ -243,7 +243,7 @@ namespace UICatalog.Scenarios {
 			var leftButton = new Button ("Left") {
 			var leftButton = new Button ("Left") {
 				Y = Pos.AnchorEnd () - 1 // Pos.Combine
 				Y = Pos.AnchorEnd () - 1 // Pos.Combine
 			};
 			};
-			leftButton.Clicked += () => {
+			leftButton.Clicked += (s,e) => {
 				// Ths demonstrates how to have a dynamically sized button
 				// Ths demonstrates how to have a dynamically sized button
 				// Each time the button is clicked the button's text gets longer
 				// Each time the button is clicked the button's text gets longer
 				// The call to Application.Top.LayoutSubviews causes the Computed layout to
 				// The call to Application.Top.LayoutSubviews causes the Computed layout to
@@ -258,7 +258,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = Pos.AnchorEnd (1)  // Pos.AnchorEnd(1)
 				Y = Pos.AnchorEnd (1)  // Pos.AnchorEnd(1)
 			};
 			};
-			centerButton.Clicked += () => {
+			centerButton.Clicked += (s,e) => {
 				// Ths demonstrates how to have a dynamically sized button
 				// Ths demonstrates how to have a dynamically sized button
 				// Each time the button is clicked the button's text gets longer
 				// Each time the button is clicked the button's text gets longer
 				// The call to Application.Top.LayoutSubviews causes the Computed layout to
 				// The call to Application.Top.LayoutSubviews causes the Computed layout to
@@ -271,7 +271,7 @@ namespace UICatalog.Scenarios {
 			var rightButton = new Button ("Right") {
 			var rightButton = new Button ("Right") {
 				Y = Pos.Y (centerButton)
 				Y = Pos.Y (centerButton)
 			};
 			};
-			rightButton.Clicked += () => {
+			rightButton.Clicked += (s,e) => {
 				// Ths demonstrates how to have a dynamically sized button
 				// Ths demonstrates how to have a dynamically sized button
 				// Each time the button is clicked the button's text gets longer
 				// Each time the button is clicked the button's text gets longer
 				// The call to Application.Top.LayoutSubviews causes the Computed layout to
 				// The call to Application.Top.LayoutSubviews causes the Computed layout to

+ 2 - 2
UICatalog/Scenarios/CsvEditor.cs

@@ -514,9 +514,9 @@ namespace UICatalog.Scenarios {
 			bool okPressed = false;
 			bool okPressed = false;
 
 
 			var ok = new Button ("Ok", is_default: true);
 			var ok = new Button ("Ok", is_default: true);
-			ok.Clicked += () => { okPressed = true; Application.RequestStop (); };
+			ok.Clicked += (s,e) => { okPressed = true; Application.RequestStop (); };
 			var cancel = new Button ("Cancel");
 			var cancel = new Button ("Cancel");
-			cancel.Clicked += () => { Application.RequestStop (); };
+			cancel.Clicked += (s,e) => { Application.RequestStop (); };
 			var d = new Dialog (title, 60, 20, ok, cancel);
 			var d = new Dialog (title, 60, 20, ok, cancel);
 
 
 			var lbl = new Label () {
 			var lbl = new Label () {

+ 5 - 5
UICatalog/Scenarios/Dialogs.cs

@@ -144,7 +144,7 @@ namespace UICatalog.Scenarios {
 				Y = Pos.Bottom (frame) + 2,
 				Y = Pos.Bottom (frame) + 2,
 				IsDefault = true,
 				IsDefault = true,
 			};
 			};
-			showDialogButton.Clicked += () => {
+			showDialogButton.Clicked += (s,e) => {
 				try {
 				try {
 					Dialog dialog = null;
 					Dialog dialog = null;
 
 
@@ -168,7 +168,7 @@ namespace UICatalog.Scenarios {
 							button = new Button (NumberToWords.Convert (buttonId),
 							button = new Button (NumberToWords.Convert (buttonId),
 							       is_default: buttonId == 0);
 							       is_default: buttonId == 0);
 						}
 						}
-						button.Clicked += () => {
+						button.Clicked += (s,e) => {
 							clicked = buttonId;
 							clicked = buttonId;
 							Application.RequestStop ();
 							Application.RequestStop ();
 						};
 						};
@@ -193,7 +193,7 @@ namespace UICatalog.Scenarios {
 						X = Pos.Center (),
 						X = Pos.Center (),
 						Y = Pos.Center ()
 						Y = Pos.Center ()
 					};
 					};
-					add.Clicked += () => {
+					add.Clicked += (s,e) => {
 						var buttonId = buttons.Count;
 						var buttonId = buttons.Count;
 						Button button;
 						Button button;
 						if (glyphsNotWords.Checked == true) {
 						if (glyphsNotWords.Checked == true) {
@@ -203,7 +203,7 @@ namespace UICatalog.Scenarios {
 							button = new Button (NumberToWords.Convert (buttonId),
 							button = new Button (NumberToWords.Convert (buttonId),
 								is_default: buttonId == 0);
 								is_default: buttonId == 0);
 						}
 						}
-						button.Clicked += () => {
+						button.Clicked += (s,e) => {
 							clicked = buttonId;
 							clicked = buttonId;
 							Application.RequestStop ();
 							Application.RequestStop ();
 
 
@@ -220,7 +220,7 @@ namespace UICatalog.Scenarios {
 						X = Pos.Center (),
 						X = Pos.Center (),
 						Y = Pos.Center () + 1
 						Y = Pos.Center () + 1
 					};
 					};
-					addChar.Clicked += () => {
+					addChar.Clicked += (s,e) => {
 						foreach (var button in buttons) {
 						foreach (var button in buttons) {
 							button.Text += Char.ConvertFromUtf32 (CODE_POINT);
 							button.Text += Char.ConvertFromUtf32 (CODE_POINT);
 						}
 						}

+ 18 - 18
UICatalog/Scenarios/DynamicMenuBar.cs

@@ -209,7 +209,7 @@ namespace UICatalog.Scenarios {
 				};
 				};
 				Add (_frmMenuDetails);
 				Add (_frmMenuDetails);
 
 
-				_btnMenuBarUp.Clicked += () => {
+				_btnMenuBarUp.Clicked += (s,e) => {
 					var i = _currentSelectedMenuBar;
 					var i = _currentSelectedMenuBar;
 					var menuItem = _menuBar != null && _menuBar.Menus.Length > 0 ? _menuBar.Menus [i] : null;
 					var menuItem = _menuBar != null && _menuBar.Menus.Length > 0 ? _menuBar.Menus [i] : null;
 					if (menuItem != null) {
 					if (menuItem != null) {
@@ -223,7 +223,7 @@ namespace UICatalog.Scenarios {
 					}
 					}
 				};
 				};
 
 
-				_btnMenuBarDown.Clicked += () => {
+				_btnMenuBarDown.Clicked += (s,e) => {
 					var i = _currentSelectedMenuBar;
 					var i = _currentSelectedMenuBar;
 					var menuItem = _menuBar != null && _menuBar.Menus.Length > 0 ? _menuBar.Menus [i] : null;
 					var menuItem = _menuBar != null && _menuBar.Menus.Length > 0 ? _menuBar.Menus [i] : null;
 					if (menuItem != null) {
 					if (menuItem != null) {
@@ -237,7 +237,7 @@ namespace UICatalog.Scenarios {
 					}
 					}
 				};
 				};
 
 
-				_btnUp.Clicked += () => {
+				_btnUp.Clicked += (s,e) => {
 					var i = _lstMenus.SelectedItem;
 					var i = _lstMenus.SelectedItem;
 					var menuItem = DataContext.Menus.Count > 0 ? DataContext.Menus [i].MenuItem : null;
 					var menuItem = DataContext.Menus.Count > 0 ? DataContext.Menus [i].MenuItem : null;
 					if (menuItem != null) {
 					if (menuItem != null) {
@@ -252,7 +252,7 @@ namespace UICatalog.Scenarios {
 					}
 					}
 				};
 				};
 
 
-				_btnDown.Clicked += () => {
+				_btnDown.Clicked += (s,e) => {
 					var i = _lstMenus.SelectedItem;
 					var i = _lstMenus.SelectedItem;
 					var menuItem = DataContext.Menus.Count > 0 ? DataContext.Menus [i].MenuItem : null;
 					var menuItem = DataContext.Menus.Count > 0 ? DataContext.Menus [i].MenuItem : null;
 					if (menuItem != null) {
 					if (menuItem != null) {
@@ -267,7 +267,7 @@ namespace UICatalog.Scenarios {
 					}
 					}
 				};
 				};
 
 
-				_btnPreviowsParent.Clicked += () => {
+				_btnPreviowsParent.Clicked += (s,e) => {
 					if (_currentMenuBarItem != null && _currentMenuBarItem.Parent != null) {
 					if (_currentMenuBarItem != null && _currentMenuBarItem.Parent != null) {
 						var mi = _currentMenuBarItem;
 						var mi = _currentMenuBarItem;
 						_currentMenuBarItem = _currentMenuBarItem.Parent as MenuBarItem;
 						_currentMenuBarItem = _currentMenuBarItem.Parent as MenuBarItem;
@@ -297,16 +297,16 @@ namespace UICatalog.Scenarios {
 					X = Pos.Right (_btnOk) + 3,
 					X = Pos.Right (_btnOk) + 3,
 					Y = Pos.Top (_btnOk),
 					Y = Pos.Top (_btnOk),
 				};
 				};
-				_btnCancel.Clicked += () => {
+				_btnCancel.Clicked += (s,e) => {
 					SetFrameDetails (_currentEditMenuBarItem);
 					SetFrameDetails (_currentEditMenuBarItem);
 				};
 				};
 				Add (_btnCancel);
 				Add (_btnCancel);
 
 
-				_lstMenus.SelectedItemChanged += (e) => {
+				_lstMenus.SelectedItemChanged += (s,e) => {
 					SetFrameDetails ();
 					SetFrameDetails ();
 				};
 				};
 
 
-				_btnOk.Clicked += () => {
+				_btnOk.Clicked += (s,e) => {
 					if (ustring.IsNullOrEmpty (_frmMenuDetails._txtTitle.Text) && _currentEditMenuBarItem != null) {
 					if (ustring.IsNullOrEmpty (_frmMenuDetails._txtTitle.Text) && _currentEditMenuBarItem != null) {
 						MessageBox.ErrorQuery ("Invalid title", "Must enter a valid title!.", "Ok");
 						MessageBox.ErrorQuery ("Invalid title", "Must enter a valid title!.", "Ok");
 					} else if (_currentEditMenuBarItem != null) {
 					} else if (_currentEditMenuBarItem != null) {
@@ -322,7 +322,7 @@ namespace UICatalog.Scenarios {
 					}
 					}
 				};
 				};
 
 
-				_btnAdd.Clicked += () => {
+				_btnAdd.Clicked += (s,e) => {
 					if (MenuBar == null) {
 					if (MenuBar == null) {
 						MessageBox.ErrorQuery ("Menu Bar Error", "Must add a MenuBar first!", "Ok");
 						MessageBox.ErrorQuery ("Menu Bar Error", "Must add a MenuBar first!", "Ok");
 						_btnAddMenuBar.SetFocus ();
 						_btnAddMenuBar.SetFocus ();
@@ -359,7 +359,7 @@ namespace UICatalog.Scenarios {
 					}
 					}
 				};
 				};
 
 
-				_btnRemove.Clicked += () => {
+				_btnRemove.Clicked += (s,e) => {
 					var menuItem = DataContext.Menus.Count > 0 ? DataContext.Menus [_lstMenus.SelectedItem].MenuItem : null;
 					var menuItem = DataContext.Menus.Count > 0 ? DataContext.Menus [_lstMenus.SelectedItem].MenuItem : null;
 					if (menuItem != null) {
 					if (menuItem != null) {
 						var childrens = ((MenuBarItem)_currentMenuBarItem).Children;
 						var childrens = ((MenuBarItem)_currentMenuBarItem).Children;
@@ -391,7 +391,7 @@ namespace UICatalog.Scenarios {
 					}
 					}
 				};
 				};
 
 
-				_lstMenus.OpenSelectedItem += (e) => {
+				_lstMenus.OpenSelectedItem += (s,e) => {
 					_currentMenuBarItem = DataContext.Menus [e.Item].MenuItem;
 					_currentMenuBarItem = DataContext.Menus [e.Item].MenuItem;
 					if (!(_currentMenuBarItem is MenuBarItem)) {
 					if (!(_currentMenuBarItem is MenuBarItem)) {
 						MessageBox.ErrorQuery ("Menu Open Error", "Must allows sub menus first!", "Ok");
 						MessageBox.ErrorQuery ("Menu Open Error", "Must allows sub menus first!", "Ok");
@@ -409,14 +409,14 @@ namespace UICatalog.Scenarios {
 					SetFrameDetails (menuBarItem);
 					SetFrameDetails (menuBarItem);
 				};
 				};
 
 
-				_btnNext.Clicked += () => {
+				_btnNext.Clicked += (s,e) => {
 					if (_menuBar != null && _currentSelectedMenuBar + 1 < _menuBar.Menus.Length) {
 					if (_menuBar != null && _currentSelectedMenuBar + 1 < _menuBar.Menus.Length) {
 						_currentSelectedMenuBar++;
 						_currentSelectedMenuBar++;
 					}
 					}
 					SelectCurrentMenuBarItem ();
 					SelectCurrentMenuBarItem ();
 				};
 				};
 
 
-				_btnPrevious.Clicked += () => {
+				_btnPrevious.Clicked += (s,e) => {
 					if (_currentSelectedMenuBar - 1 > -1) {
 					if (_currentSelectedMenuBar - 1 > -1) {
 						_currentSelectedMenuBar--;
 						_currentSelectedMenuBar--;
 					}
 					}
@@ -430,7 +430,7 @@ namespace UICatalog.Scenarios {
 					}
 					}
 				};
 				};
 
 
-				_btnAddMenuBar.Clicked += () => {
+				_btnAddMenuBar.Clicked += (s,e) => {
 					var frameDetails = new DynamicMenuBarDetails (null, false);
 					var frameDetails = new DynamicMenuBarDetails (null, false);
 					var item = frameDetails.EnterMenuItem ();
 					var item = frameDetails.EnterMenuItem ();
 					if (item == null) {
 					if (item == null) {
@@ -457,7 +457,7 @@ namespace UICatalog.Scenarios {
 					_menuBar.SetNeedsDisplay ();
 					_menuBar.SetNeedsDisplay ();
 				};
 				};
 
 
-				_btnRemoveMenuBar.Clicked += () => {
+				_btnRemoveMenuBar.Clicked += (s,e) => {
 					if (_menuBar == null || _menuBar.Menus.Length == 0) {
 					if (_menuBar == null || _menuBar.Menus.Length == 0) {
 						return;
 						return;
 					}
 					}
@@ -784,7 +784,7 @@ namespace UICatalog.Scenarios {
 					X = Pos.X (_lblShortcut),
 					X = Pos.X (_lblShortcut),
 					Y = Pos.Bottom (_txtShortcut) + 1
 					Y = Pos.Bottom (_txtShortcut) + 1
 				};
 				};
-				_btnShortcut.Clicked += () => {
+				_btnShortcut.Clicked += (s,e) => {
 					_txtShortcut.Text = "";
 					_txtShortcut.Text = "";
 				};
 				};
 				Add (_btnShortcut);
 				Add (_btnShortcut);
@@ -868,7 +868,7 @@ namespace UICatalog.Scenarios {
 				var _btnOk = new Button ("Ok") {
 				var _btnOk = new Button ("Ok") {
 					IsDefault = true,
 					IsDefault = true,
 				};
 				};
-				_btnOk.Clicked += () => {
+				_btnOk.Clicked += (s,e) => {
 					if (ustring.IsNullOrEmpty (_txtTitle.Text)) {
 					if (ustring.IsNullOrEmpty (_txtTitle.Text)) {
 						MessageBox.ErrorQuery ("Invalid title", "Must enter a valid title!.", "Ok");
 						MessageBox.ErrorQuery ("Invalid title", "Must enter a valid title!.", "Ok");
 					} else {
 					} else {
@@ -877,7 +877,7 @@ namespace UICatalog.Scenarios {
 					}
 					}
 				};
 				};
 				var _btnCancel = new Button ("Cancel");
 				var _btnCancel = new Button ("Cancel");
-				_btnCancel.Clicked += () => {
+				_btnCancel.Clicked += (s,e) => {
 					_txtTitle.Text = ustring.Empty;
 					_txtTitle.Text = ustring.Empty;
 					Application.RequestStop ();
 					Application.RequestStop ();
 				};
 				};

+ 12 - 12
UICatalog/Scenarios/DynamicStatusBar.cs

@@ -142,7 +142,7 @@ namespace UICatalog.Scenarios {
 				};
 				};
 				Add (_frmStatusBarDetails);
 				Add (_frmStatusBarDetails);
 
 
-				_btnUp.Clicked += () => {
+				_btnUp.Clicked += (s,e) => {
 					var i = _lstItems.SelectedItem;
 					var i = _lstItems.SelectedItem;
 					var statusItem = DataContext.Items.Count > 0 ? DataContext.Items [i].StatusItem : null;
 					var statusItem = DataContext.Items.Count > 0 ? DataContext.Items [i].StatusItem : null;
 					if (statusItem != null) {
 					if (statusItem != null) {
@@ -158,7 +158,7 @@ namespace UICatalog.Scenarios {
 					}
 					}
 				};
 				};
 
 
-				_btnDown.Clicked += () => {
+				_btnDown.Clicked += (s,e) => {
 					var i = _lstItems.SelectedItem;
 					var i = _lstItems.SelectedItem;
 					var statusItem = DataContext.Items.Count > 0 ? DataContext.Items [i].StatusItem : null;
 					var statusItem = DataContext.Items.Count > 0 ? DataContext.Items [i].StatusItem : null;
 					if (statusItem != null) {
 					if (statusItem != null) {
@@ -184,16 +184,16 @@ namespace UICatalog.Scenarios {
 					X = Pos.Right (_btnOk) + 3,
 					X = Pos.Right (_btnOk) + 3,
 					Y = Pos.Top (_btnOk),
 					Y = Pos.Top (_btnOk),
 				};
 				};
-				_btnCancel.Clicked += () => {
+				_btnCancel.Clicked += (s,e) => {
 					SetFrameDetails (_currentEditStatusItem);
 					SetFrameDetails (_currentEditStatusItem);
 				};
 				};
 				Add (_btnCancel);
 				Add (_btnCancel);
 
 
-				_lstItems.SelectedItemChanged += (e) => {
+				_lstItems.SelectedItemChanged += (s, e) => {
 					SetFrameDetails ();
 					SetFrameDetails ();
 				};
 				};
 
 
-				_btnOk.Clicked += () => {
+				_btnOk.Clicked += (s,e) => {
 					if (ustring.IsNullOrEmpty (_frmStatusBarDetails._txtTitle.Text) && _currentEditStatusItem != null) {
 					if (ustring.IsNullOrEmpty (_frmStatusBarDetails._txtTitle.Text) && _currentEditStatusItem != null) {
 						MessageBox.ErrorQuery ("Invalid title", "Must enter a valid title!.", "Ok");
 						MessageBox.ErrorQuery ("Invalid title", "Must enter a valid title!.", "Ok");
 					} else if (_currentEditStatusItem != null) {
 					} else if (_currentEditStatusItem != null) {
@@ -206,7 +206,7 @@ namespace UICatalog.Scenarios {
 					}
 					}
 				};
 				};
 
 
-				_btnAdd.Clicked += () => {
+				_btnAdd.Clicked += (s,e) => {
 					if (StatusBar == null) {
 					if (StatusBar == null) {
 						MessageBox.ErrorQuery ("StatusBar Bar Error", "Must add a StatusBar first!", "Ok");
 						MessageBox.ErrorQuery ("StatusBar Bar Error", "Must add a StatusBar first!", "Ok");
 						_btnAddStatusBar.SetFocus ();
 						_btnAddStatusBar.SetFocus ();
@@ -227,7 +227,7 @@ namespace UICatalog.Scenarios {
 					SetFrameDetails ();
 					SetFrameDetails ();
 				};
 				};
 
 
-				_btnRemove.Clicked += () => {
+				_btnRemove.Clicked += (s,e) => {
 					var statusItem = DataContext.Items.Count > 0 ? DataContext.Items [_lstItems.SelectedItem].StatusItem : null;
 					var statusItem = DataContext.Items.Count > 0 ? DataContext.Items [_lstItems.SelectedItem].StatusItem : null;
 					if (statusItem != null) {
 					if (statusItem != null) {
 						_statusBar.RemoveItem (_currentSelectedStatusBar);
 						_statusBar.RemoveItem (_currentSelectedStatusBar);
@@ -245,7 +245,7 @@ namespace UICatalog.Scenarios {
 					SetFrameDetails (statusItem);
 					SetFrameDetails (statusItem);
 				};
 				};
 
 
-				_btnAddStatusBar.Clicked += () => {
+				_btnAddStatusBar.Clicked += (s,e) => {
 					if (_statusBar != null) {
 					if (_statusBar != null) {
 						return;
 						return;
 					}
 					}
@@ -254,7 +254,7 @@ namespace UICatalog.Scenarios {
 					Add (_statusBar);
 					Add (_statusBar);
 				};
 				};
 
 
-				_btnRemoveStatusBar.Clicked += () => {
+				_btnRemoveStatusBar.Clicked += (s,e) => {
 					if (_statusBar == null) {
 					if (_statusBar == null) {
 						return;
 						return;
 					}
 					}
@@ -457,7 +457,7 @@ namespace UICatalog.Scenarios {
 					X = Pos.X (_lblShortcut),
 					X = Pos.X (_lblShortcut),
 					Y = Pos.Bottom (_txtShortcut) + 1
 					Y = Pos.Bottom (_txtShortcut) + 1
 				};
 				};
-				_btnShortcut.Clicked += () => {
+				_btnShortcut.Clicked += (s,e) => {
 					_txtShortcut.Text = "";
 					_txtShortcut.Text = "";
 				};
 				};
 				Add (_btnShortcut);
 				Add (_btnShortcut);
@@ -479,7 +479,7 @@ namespace UICatalog.Scenarios {
 				var _btnOk = new Button ("Ok") {
 				var _btnOk = new Button ("Ok") {
 					IsDefault = true,
 					IsDefault = true,
 				};
 				};
-				_btnOk.Clicked += () => {
+				_btnOk.Clicked += (s,e) => {
 					if (ustring.IsNullOrEmpty (_txtTitle.Text)) {
 					if (ustring.IsNullOrEmpty (_txtTitle.Text)) {
 						MessageBox.ErrorQuery ("Invalid title", "Must enter a valid title!.", "Ok");
 						MessageBox.ErrorQuery ("Invalid title", "Must enter a valid title!.", "Ok");
 					} else {
 					} else {
@@ -492,7 +492,7 @@ namespace UICatalog.Scenarios {
 					}
 					}
 				};
 				};
 				var _btnCancel = new Button ("Cancel");
 				var _btnCancel = new Button ("Cancel");
-				_btnCancel.Clicked += () => {
+				_btnCancel.Clicked += (s,e) => {
 					_txtTitle.Text = ustring.Empty;
 					_txtTitle.Text = ustring.Empty;
 					Application.RequestStop ();
 					Application.RequestStop ();
 				};
 				};

+ 7 - 7
UICatalog/Scenarios/Editor.cs

@@ -799,7 +799,7 @@ namespace UICatalog.Scenarios {
 				IsDefault = true,
 				IsDefault = true,
 				AutoSize = false
 				AutoSize = false
 			};
 			};
-			btnFindNext.Clicked += () => FindNext ();
+			btnFindNext.Clicked += (s,e) => FindNext ();
 			d.Add (btnFindNext);
 			d.Add (btnFindNext);
 
 
 			var btnFindPrevious = new Button ("Find _Previous") {
 			var btnFindPrevious = new Button ("Find _Previous") {
@@ -810,7 +810,7 @@ namespace UICatalog.Scenarios {
 				TextAlignment = TextAlignment.Centered,
 				TextAlignment = TextAlignment.Centered,
 				AutoSize = false
 				AutoSize = false
 			};
 			};
-			btnFindPrevious.Clicked += () => FindPrevious ();
+			btnFindPrevious.Clicked += (s,e) => FindPrevious ();
 			d.Add (btnFindPrevious);
 			d.Add (btnFindPrevious);
 
 
 			txtToFind.TextChanged += (e) => {
 			txtToFind.TextChanged += (e) => {
@@ -827,7 +827,7 @@ namespace UICatalog.Scenarios {
 				TextAlignment = TextAlignment.Centered,
 				TextAlignment = TextAlignment.Centered,
 				AutoSize = false
 				AutoSize = false
 			};
 			};
-			btnCancel.Clicked += () => {
+			btnCancel.Clicked += (s,e) => {
 				DisposeWinDialog ();
 				DisposeWinDialog ();
 			};
 			};
 			d.Add (btnCancel);
 			d.Add (btnCancel);
@@ -891,7 +891,7 @@ namespace UICatalog.Scenarios {
 				IsDefault = true,
 				IsDefault = true,
 				AutoSize = false
 				AutoSize = false
 			};
 			};
-			btnFindNext.Clicked += () => ReplaceNext ();
+			btnFindNext.Clicked += (s,e) => ReplaceNext ();
 			d.Add (btnFindNext);
 			d.Add (btnFindNext);
 
 
 			label = new Label ("Replace:") {
 			label = new Label ("Replace:") {
@@ -919,7 +919,7 @@ namespace UICatalog.Scenarios {
 				TextAlignment = TextAlignment.Centered,
 				TextAlignment = TextAlignment.Centered,
 				AutoSize = false
 				AutoSize = false
 			};
 			};
-			btnFindPrevious.Clicked += () => ReplacePrevious ();
+			btnFindPrevious.Clicked += (s,e) => ReplacePrevious ();
 			d.Add (btnFindPrevious);
 			d.Add (btnFindPrevious);
 
 
 			var btnReplaceAll = new Button ("Replace _All") {
 			var btnReplaceAll = new Button ("Replace _All") {
@@ -930,7 +930,7 @@ namespace UICatalog.Scenarios {
 				TextAlignment = TextAlignment.Centered,
 				TextAlignment = TextAlignment.Centered,
 				AutoSize = false
 				AutoSize = false
 			};
 			};
-			btnReplaceAll.Clicked += () => ReplaceAll ();
+			btnReplaceAll.Clicked += (s,e) => ReplaceAll ();
 			d.Add (btnReplaceAll);
 			d.Add (btnReplaceAll);
 
 
 			txtToFind.TextChanged += (e) => {
 			txtToFind.TextChanged += (e) => {
@@ -948,7 +948,7 @@ namespace UICatalog.Scenarios {
 				TextAlignment = TextAlignment.Centered,
 				TextAlignment = TextAlignment.Centered,
 				AutoSize = false
 				AutoSize = false
 			};
 			};
-			btnCancel.Clicked += () => {
+			btnCancel.Clicked += (s,e) => {
 				DisposeWinDialog ();
 				DisposeWinDialog ();
 			};
 			};
 			d.Add (btnCancel);
 			d.Add (btnCancel);

+ 1 - 1
UICatalog/Scenarios/Generic.cs

@@ -32,7 +32,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = Pos.Center (),
 				Y = Pos.Center (),
 			};
 			};
-			button.Clicked += () => MessageBox.Query (20, 7, "Hi", "Neat?", "Yes", "No");
+			button.Clicked += (s,e) => MessageBox.Query (20, 7, "Hi", "Neat?", "Yes", "No");
 			Win.Add (button);
 			Win.Add (button);
 		}
 		}
 	}
 	}

+ 2 - 2
UICatalog/Scenarios/InteractiveTree.cs

@@ -116,9 +116,9 @@ namespace UICatalog.Scenarios {
 			bool okPressed = false;
 			bool okPressed = false;
 
 
 			var ok = new Button ("Ok", is_default: true);
 			var ok = new Button ("Ok", is_default: true);
-			ok.Clicked += () => { okPressed = true; Application.RequestStop (); };
+			ok.Clicked += (s,e) => { okPressed = true; Application.RequestStop (); };
 			var cancel = new Button ("Cancel");
 			var cancel = new Button ("Cancel");
-			cancel.Clicked += () => { Application.RequestStop (); };
+			cancel.Clicked += (s,e) => { Application.RequestStop (); };
 			var d = new Dialog (title, 60, 20, ok, cancel);
 			var d = new Dialog (title, 60, 20, ok, cancel);
 
 
 			var lbl = new Label () {
 			var lbl = new Label () {

+ 1 - 1
UICatalog/Scenarios/InvertColors.cs

@@ -33,7 +33,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = foreColors.Length + 1,
 				Y = foreColors.Length + 1,
 			};
 			};
-			button.Clicked += () => {
+			button.Clicked += (s,e) => {
 
 
 				foreach (var label in labels) {
 				foreach (var label in labels) {
 					var color = label.ColorScheme.Normal;
 					var color = label.ColorScheme.Normal;

+ 12 - 12
UICatalog/Scenarios/LabelsAsButtons.cs

@@ -32,14 +32,14 @@ namespace UICatalog.Scenarios {
 				HotKeySpecifier = (System.Rune)'_',
 				HotKeySpecifier = (System.Rune)'_',
 				CanFocus = true,
 				CanFocus = true,
 			};
 			};
-			defaultLabel.Clicked += () => Application.RequestStop ();
+			defaultLabel.Clicked += (s,e) => Application.RequestStop ();
 			Win.Add (defaultLabel);
 			Win.Add (defaultLabel);
 
 
 			var swapLabel = new Label (50, 0, "S_wap Default (Absolute Layout)") {
 			var swapLabel = new Label (50, 0, "S_wap Default (Absolute Layout)") {
 				HotKeySpecifier = (System.Rune)'_',
 				HotKeySpecifier = (System.Rune)'_',
 				CanFocus = true,
 				CanFocus = true,
 			};
 			};
-			swapLabel.Clicked += () => {
+			swapLabel.Clicked += (s,e) => {
 				//defaultLabel.IsDefault = !defaultLabel.IsDefault;
 				//defaultLabel.IsDefault = !defaultLabel.IsDefault;
 				//swapLabel.IsDefault = !swapLabel.IsDefault;
 				//swapLabel.IsDefault = !swapLabel.IsDefault;
 			};
 			};
@@ -47,7 +47,7 @@ namespace UICatalog.Scenarios {
 
 
 			static void DoMessage (Label Label, ustring txt)
 			static void DoMessage (Label Label, ustring txt)
 			{
 			{
-				Label.Clicked += () => {
+				Label.Clicked += (s,e) => {
 					var btnText = Label.Text.ToString ();
 					var btnText = Label.Text.ToString ();
 					MessageBox.Query ("Message", $"Did you click {txt}?", "Yes", "No");
 					MessageBox.Query ("Message", $"Did you click {txt}?", "Yes", "No");
 				};
 				};
@@ -93,7 +93,7 @@ namespace UICatalog.Scenarios {
 				TextAlignment = TextAlignment.Centered,
 				TextAlignment = TextAlignment.Centered,
 				VerticalTextAlignment = VerticalTextAlignment.Middle
 				VerticalTextAlignment = VerticalTextAlignment.Middle
 			});
 			});
-			Label.Clicked += () => MessageBox.Query ("Message", "Question?", "Yes", "No");
+			Label.Clicked += (s,e) => MessageBox.Query ("Message", "Question?", "Yes", "No");
 
 
 			var textChanger = new Label ("Te_xt Changer") {
 			var textChanger = new Label ("Te_xt Changer") {
 				X = 2,
 				X = 2,
@@ -102,7 +102,7 @@ namespace UICatalog.Scenarios {
 				CanFocus = true,
 				CanFocus = true,
 			};
 			};
 			Win.Add (textChanger);
 			Win.Add (textChanger);
-			textChanger.Clicked += () => textChanger.Text += "!";
+			textChanger.Clicked += (s,e) => textChanger.Text += "!";
 
 
 			Win.Add (Label = new Label ("Lets see if this will move as \"Text Changer\" grows") {
 			Win.Add (Label = new Label ("Lets see if this will move as \"Text Changer\" grows") {
 				X = Pos.Right (textChanger) + 2,
 				X = Pos.Right (textChanger) + 2,
@@ -120,7 +120,7 @@ namespace UICatalog.Scenarios {
 			};
 			};
 			Win.Add (removeLabel);
 			Win.Add (removeLabel);
 			// This in interesting test case because `moveBtn` and below are laid out relative to this one!
 			// This in interesting test case because `moveBtn` and below are laid out relative to this one!
-			removeLabel.Clicked += () => {
+			removeLabel.Clicked += (s,e) => {
 				// Now this throw a InvalidOperationException on the TopologicalSort method as is expected.
 				// Now this throw a InvalidOperationException on the TopologicalSort method as is expected.
 				//Win.Remove (removeLabel);
 				//Win.Remove (removeLabel);
 
 
@@ -145,7 +145,7 @@ namespace UICatalog.Scenarios {
 				HotKeySpecifier = (System.Rune)'_',
 				HotKeySpecifier = (System.Rune)'_',
 				CanFocus = true,
 				CanFocus = true,
 			};
 			};
-			moveBtn.Clicked += () => {
+			moveBtn.Clicked += (s,e) => {
 				moveBtn.X = moveBtn.Frame.X + 5;
 				moveBtn.X = moveBtn.Frame.X + 5;
 				// This is already fixed with the call to SetNeedDisplay() in the Pos Dim.
 				// This is already fixed with the call to SetNeedDisplay() in the Pos Dim.
 				//computedFrame.LayoutSubviews (); // BUGBUG: This call should not be needed. View.X is not causing relayout correctly
 				//computedFrame.LayoutSubviews (); // BUGBUG: This call should not be needed. View.X is not causing relayout correctly
@@ -163,7 +163,7 @@ namespace UICatalog.Scenarios {
 				CanFocus = true,
 				CanFocus = true,
 				AutoSize = false
 				AutoSize = false
 			};
 			};
-			sizeBtn.Clicked += () => {
+			sizeBtn.Clicked += (s,e) => {
 				sizeBtn.Width = sizeBtn.Frame.Width + 5;
 				sizeBtn.Width = sizeBtn.Frame.Width + 5;
 				//computedFrame.LayoutSubviews (); // FIXED: This call should not be needed. View.X is not causing relayout correctly
 				//computedFrame.LayoutSubviews (); // FIXED: This call should not be needed. View.X is not causing relayout correctly
 			};
 			};
@@ -183,7 +183,7 @@ namespace UICatalog.Scenarios {
 				HotKeySpecifier = (System.Rune)'_',
 				HotKeySpecifier = (System.Rune)'_',
 				CanFocus = true,
 				CanFocus = true,
 			};
 			};
-			moveBtnA.Clicked += () => {
+			moveBtnA.Clicked += (s,e) => {
 				moveBtnA.Frame = new Rect (moveBtnA.Frame.X + 5, moveBtnA.Frame.Y, moveBtnA.Frame.Width, moveBtnA.Frame.Height);
 				moveBtnA.Frame = new Rect (moveBtnA.Frame.X + 5, moveBtnA.Frame.Y, moveBtnA.Frame.Width, moveBtnA.Frame.Height);
 			};
 			};
 			absoluteFrame.Add (moveBtnA);
 			absoluteFrame.Add (moveBtnA);
@@ -195,7 +195,7 @@ namespace UICatalog.Scenarios {
 				CanFocus = true,
 				CanFocus = true,
 				AutoSize = false
 				AutoSize = false
 			};
 			};
-			sizeBtnA.Clicked += () => {
+			sizeBtnA.Clicked += (s,e) => {
 				sizeBtnA.Frame = new Rect (sizeBtnA.Frame.X, sizeBtnA.Frame.Y, sizeBtnA.Frame.Width + 5, sizeBtnA.Frame.Height);
 				sizeBtnA.Frame = new Rect (sizeBtnA.Frame.X, sizeBtnA.Frame.Y, sizeBtnA.Frame.Width + 5, sizeBtnA.Frame.Height);
 			};
 			};
 			absoluteFrame.Add (sizeBtnA);
 			absoluteFrame.Add (sizeBtnA);
@@ -250,7 +250,7 @@ namespace UICatalog.Scenarios {
 				HotKeySpecifier = (System.Rune)'_',
 				HotKeySpecifier = (System.Rune)'_',
 				CanFocus = true,
 				CanFocus = true,
 			};
 			};
-			moveHotKeyBtn.Clicked += () => {
+			moveHotKeyBtn.Clicked += (s,e) => {
 				moveHotKeyBtn.Text = MoveHotkey (moveHotKeyBtn.Text);
 				moveHotKeyBtn.Text = MoveHotkey (moveHotKeyBtn.Text);
 			};
 			};
 			Win.Add (moveHotKeyBtn);
 			Win.Add (moveHotKeyBtn);
@@ -264,7 +264,7 @@ namespace UICatalog.Scenarios {
 				HotKeySpecifier = (System.Rune)'_',
 				HotKeySpecifier = (System.Rune)'_',
 				CanFocus = true,
 				CanFocus = true,
 			};
 			};
-			moveUnicodeHotKeyBtn.Clicked += () => {
+			moveUnicodeHotKeyBtn.Clicked += (s,e) => {
 				moveUnicodeHotKeyBtn.Text = MoveHotkey (moveUnicodeHotKeyBtn.Text);
 				moveUnicodeHotKeyBtn.Text = MoveHotkey (moveUnicodeHotKeyBtn.Text);
 			};
 			};
 			Win.Add (moveUnicodeHotKeyBtn);
 			Win.Add (moveUnicodeHotKeyBtn);

+ 1 - 1
UICatalog/Scenarios/ListViewWithSelection.cs

@@ -97,7 +97,7 @@ namespace UICatalog.Scenarios {
 			Win.Add (keepCheckBox);
 			Win.Add (keepCheckBox);
 		}
 		}
 
 
-		private void ListView_RowRender (ListViewRowEventArgs obj)
+		private void ListView_RowRender (object sender, ListViewRowEventArgs obj)
 		{
 		{
 			if (obj.Row == _listView.SelectedItem) {
 			if (obj.Row == _listView.SelectedItem) {
 				return;
 				return;

+ 4 - 4
UICatalog/Scenarios/ListsAndCombos.cs

@@ -36,7 +36,7 @@ namespace UICatalog.Scenarios {
 				Height = Dim.Fill(2),
 				Height = Dim.Fill(2),
 				Width = Dim.Percent (40)
 				Width = Dim.Percent (40)
 			};
 			};
-			listview.SelectedItemChanged += (ListViewItemEventArgs e) => lbListView.Text = items [listview.SelectedItem];
+			listview.SelectedItemChanged += (object s, ListViewItemEventArgs e) => lbListView.Text = items [listview.SelectedItem];
 			Win.Add (lbListView, listview);
 			Win.Add (lbListView, listview);
 
 
 			var _scrollBar = new ScrollBarView (listview, true);
 			var _scrollBar = new ScrollBarView (listview, true);
@@ -80,7 +80,7 @@ namespace UICatalog.Scenarios {
 			};
 			};
 			comboBox.SetSource (items);
 			comboBox.SetSource (items);
 
 
-			comboBox.SelectedItemChanged += (ListViewItemEventArgs text) => lbComboBox.Text = text.Value.ToString ();
+			comboBox.SelectedItemChanged += (object s, ListViewItemEventArgs text) => lbComboBox.Text = text.Value.ToString ();
 			Win.Add (lbComboBox, comboBox);
 			Win.Add (lbComboBox, comboBox);
 
 
 			var scrollBarCbx = new ScrollBarView (comboBox.Subviews [1], true);
 			var scrollBarCbx = new ScrollBarView (comboBox.Subviews [1], true);
@@ -114,7 +114,7 @@ namespace UICatalog.Scenarios {
 				X = 1,
 				X = 1,
 				Y = Pos.Bottom(lbListView),
 				Y = Pos.Bottom(lbListView),
 			};
 			};
-			btnMoveUp.Clicked += () => {
+			btnMoveUp.Clicked += (s,e) => {
 				listview.MoveUp ();
 				listview.MoveUp ();
 			};
 			};
 
 
@@ -122,7 +122,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Right (btnMoveUp) + 1,
 				X = Pos.Right (btnMoveUp) + 1,
 				Y = Pos.Bottom (lbListView),
 				Y = Pos.Bottom (lbListView),
 			};
 			};
-			btnMoveDown.Clicked += () => {
+			btnMoveDown.Clicked += (s,e) => {
 				listview.MoveDown ();
 				listview.MoveDown ();
 			};
 			};
 
 

+ 1 - 1
UICatalog/Scenarios/MessageBoxes.cs

@@ -183,7 +183,7 @@ namespace UICatalog.Scenarios {
 				Y = Pos.Bottom (frame) + 2,
 				Y = Pos.Bottom (frame) + 2,
 				IsDefault = true,
 				IsDefault = true,
 			};
 			};
-			showMessageBoxButton.Clicked += () => {
+			showMessageBoxButton.Clicked += (s,e) => {
 				try {
 				try {
 					int width = int.Parse (widthEdit.Text.ToString ());
 					int width = int.Parse (widthEdit.Text.ToString ());
 					int height = int.Parse (heightEdit.Text.ToString ());
 					int height = int.Parse (heightEdit.Text.ToString ());

+ 2 - 2
UICatalog/Scenarios/MultiColouredTable.cs

@@ -72,9 +72,9 @@ namespace UICatalog.Scenarios {
 			bool okPressed = false;
 			bool okPressed = false;
 
 
 			var ok = new Button ("Ok", is_default: true);
 			var ok = new Button ("Ok", is_default: true);
-			ok.Clicked += () => { okPressed = true; Application.RequestStop (); };
+			ok.Clicked += (s,e) => { okPressed = true; Application.RequestStop (); };
 			var cancel = new Button ("Cancel");
 			var cancel = new Button ("Cancel");
-			cancel.Clicked += () => { Application.RequestStop (); };
+			cancel.Clicked += (s,e) => { Application.RequestStop (); };
 			var d = new Dialog (title, 60, 20, ok, cancel);
 			var d = new Dialog (title, 60, 20, ok, cancel);
 
 
 			var lbl = new Label () {
 			var lbl = new Label () {

+ 4 - 4
UICatalog/Scenarios/Progress.cs

@@ -58,17 +58,17 @@ namespace UICatalog.Scenarios {
 					X = Pos.Right (LeftFrame) + 1,
 					X = Pos.Right (LeftFrame) + 1,
 					Y = 0,
 					Y = 0,
 				};
 				};
-				startButton.Clicked += () => Start ();
+				startButton.Clicked += (s,e) => Start ();
 				var pulseButton = new Button ("Pulse") {
 				var pulseButton = new Button ("Pulse") {
 					X = Pos.Right (startButton) + 2,
 					X = Pos.Right (startButton) + 2,
 					Y = Pos.Y (startButton),
 					Y = Pos.Y (startButton),
 				};
 				};
-				pulseButton.Clicked += () => Pulse ();
+				pulseButton.Clicked += (s,e) => Pulse ();
 				var stopbutton = new Button ("Stop Timer") {
 				var stopbutton = new Button ("Stop Timer") {
 					X = Pos.Right (pulseButton) + 2,
 					X = Pos.Right (pulseButton) + 2,
 					Y = Pos.Top (pulseButton),
 					Y = Pos.Top (pulseButton),
 				};
 				};
-				stopbutton.Clicked += () => Stop ();
+				stopbutton.Clicked += (s,e) => Stop ();
 
 
 				Add (startButton);
 				Add (startButton);
 				Add (pulseButton);
 				Add (pulseButton);
@@ -225,7 +225,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = Pos.Bottom(mainLoopTimeoutDemo) + 1,
 				Y = Pos.Bottom(mainLoopTimeoutDemo) + 1,
 			};
 			};
-			startBoth.Clicked += () => {
+			startBoth.Clicked += (s,e) => {
 				systemTimerDemo.Start ();
 				systemTimerDemo.Start ();
 				mainLoopTimeoutDemo.Start ();
 				mainLoopTimeoutDemo.Start ();
 			};
 			};

+ 1 - 1
UICatalog/Scenarios/ProgressBarStyles.cs

@@ -64,7 +64,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = Pos.Bottom (continuousPB) + 1
 				Y = Pos.Bottom (continuousPB) + 1
 			};
 			};
-			button.Clicked += () => {
+			button.Clicked += (s,e) => {
 				if (_fractionTimer == null) {
 				if (_fractionTimer == null) {
 					button.Enabled = false;
 					button.Enabled = false;
 					blocksPB.Fraction = 0;
 					blocksPB.Fraction = 0;

+ 1 - 1
UICatalog/Scenarios/RunTExample.cs

@@ -58,7 +58,7 @@ namespace UICatalog.Scenarios {
 				};
 				};
 
 
 				// When login button is clicked display a message popup
 				// When login button is clicked display a message popup
-				btnLogin.Clicked += () => {
+				btnLogin.Clicked += (s,e) => {
 					if (usernameText.Text == "admin" && passwordText.Text == "password") {
 					if (usernameText.Text == "admin" && passwordText.Text == "password") {
 						MessageBox.Query ("Login Successful", $"Username: {usernameText.Text}", "Ok");
 						MessageBox.Query ("Login Successful", $"Username: {usernameText.Text}", "Ok");
 						Application.RequestStop ();
 						Application.RequestStop ();

+ 3 - 3
UICatalog/Scenarios/RuneWidthGreaterThanOne.cs

@@ -91,17 +91,17 @@ namespace UICatalog.Scenarios {
 			}
 			}
 		}
 		}
 
 
-		private void MixedMessage ()
+		private void MixedMessage (object sender, EventArgs e)
 		{
 		{
 			MessageBox.Query ("Say Hello 你", $"Hello {_text.Text}", "Ok");
 			MessageBox.Query ("Say Hello 你", $"Hello {_text.Text}", "Ok");
 		}
 		}
 
 
-		private void NarrowMessage ()
+		private void NarrowMessage (object sender, EventArgs e)
 		{
 		{
 			MessageBox.Query ("Say Hello", $"Hello {_text.Text}", "Ok");
 			MessageBox.Query ("Say Hello", $"Hello {_text.Text}", "Ok");
 		}
 		}
 
 
-		private void WideMessage ()
+		private void WideMessage (object sender, EventArgs e)
 		{
 		{
 			MessageBox.Query ("こんにちはと言う", $"こんにちは {_text.Text}", "Ok");
 			MessageBox.Query ("こんにちはと言う", $"こんにちは {_text.Text}", "Ok");
 		}
 		}

+ 3 - 3
UICatalog/Scenarios/Scrolling.cs

@@ -164,7 +164,7 @@ namespace UICatalog.Scenarios {
 				X = 3,
 				X = 3,
 				Y = 3,
 				Y = 3,
 			};
 			};
-			pressMeButton.Clicked += () => MessageBox.Query (20, 7, "MessageBox", "Neat?", "Yes", "No");
+			pressMeButton.Clicked += (s,e) => MessageBox.Query (20, 7, "MessageBox", "Neat?", "Yes", "No");
 			scrollView.Add (pressMeButton);
 			scrollView.Add (pressMeButton);
 
 
 			var aLongButton = new Button ("A very long button. Should be wide enough to demo clipping!") {
 			var aLongButton = new Button ("A very long button. Should be wide enough to demo clipping!") {
@@ -172,7 +172,7 @@ namespace UICatalog.Scenarios {
 				Y = 4,
 				Y = 4,
 				Width = Dim.Fill (3),
 				Width = Dim.Fill (3),
 			};
 			};
-			aLongButton.Clicked += () => MessageBox.Query (20, 7, "MessageBox", "Neat?", "Yes", "No");
+			aLongButton.Clicked += (s,e) => MessageBox.Query (20, 7, "MessageBox", "Neat?", "Yes", "No");
 			scrollView.Add (aLongButton);
 			scrollView.Add (aLongButton);
 
 
 			scrollView.Add (new TextField ("This is a test of...") {
 			scrollView.Add (new TextField ("This is a test of...") {
@@ -202,7 +202,7 @@ namespace UICatalog.Scenarios {
 			};
 			};
 			// TODO: Use Pos.Width instead of (Right-Left) when implemented (#502)
 			// TODO: Use Pos.Width instead of (Right-Left) when implemented (#502)
 			anchorButton.X = Pos.AnchorEnd () - (Pos.Right (anchorButton) - Pos.Left (anchorButton));
 			anchorButton.X = Pos.AnchorEnd () - (Pos.Right (anchorButton) - Pos.Left (anchorButton));
-			anchorButton.Clicked += () => {
+			anchorButton.Clicked += (s,e) => {
 				// Ths demonstrates how to have a dynamically sized button
 				// Ths demonstrates how to have a dynamically sized button
 				// Each time the button is clicked the button's text gets longer
 				// Each time the button is clicked the button's text gets longer
 				// The call to Win.LayoutSubviews causes the Computed layout to
 				// The call to Win.LayoutSubviews causes the Computed layout to

+ 1 - 1
UICatalog/Scenarios/SendKeys.cs

@@ -114,7 +114,7 @@ namespace UICatalog.Scenarios {
 				txtInput.SetFocus ();
 				txtInput.SetFocus ();
 			}
 			}
 
 
-			button.Clicked += () => ProcessInput ();
+			button.Clicked += (s,e) => ProcessInput ();
 
 
 			Win.KeyPress += (s, e) => {
 			Win.KeyPress += (s, e) => {
 				if (e.KeyEvent.Key == Key.Enter) {
 				if (e.KeyEvent.Key == Key.Enter) {

+ 1 - 1
UICatalog/Scenarios/SingleBackgroundWorker.cs

@@ -63,7 +63,7 @@ namespace UICatalog.Scenarios {
 				worker = new BackgroundWorker () { WorkerSupportsCancellation = true };
 				worker = new BackgroundWorker () { WorkerSupportsCancellation = true };
 
 
 				var cancel = new Button ("Cancel Worker");
 				var cancel = new Button ("Cancel Worker");
-				cancel.Clicked += () => {
+				cancel.Clicked += (s,e) => {
 					if (worker == null) {
 					if (worker == null) {
 						log.Add ($"Worker is not running at {DateTime.Now}!");
 						log.Add ($"Worker is not running at {DateTime.Now}!");
 						listLog.SetNeedsDisplay ();
 						listLog.SetNeedsDisplay ();

+ 4 - 4
UICatalog/Scenarios/TableEditor.cs

@@ -278,9 +278,9 @@ namespace UICatalog.Scenarios {
 		{
 		{
 			var accepted = false;
 			var accepted = false;
 			var ok = new Button ("Ok", is_default: true);
 			var ok = new Button ("Ok", is_default: true);
-			ok.Clicked += () => { accepted = true; Application.RequestStop (); };
+			ok.Clicked += (s,e) => { accepted = true; Application.RequestStop (); };
 			var cancel = new Button ("Cancel");
 			var cancel = new Button ("Cancel");
-			cancel.Clicked += () => { Application.RequestStop (); };
+			cancel.Clicked += (s,e) => { Application.RequestStop (); };
 			var d = new Dialog (prompt, 60, 20, ok, cancel);
 			var d = new Dialog (prompt, 60, 20, ok, cancel);
 
 
 			var style = tableView.Style.GetOrCreateColumnStyle (col);
 			var style = tableView.Style.GetOrCreateColumnStyle (col);
@@ -760,9 +760,9 @@ namespace UICatalog.Scenarios {
 			bool okPressed = false;
 			bool okPressed = false;
 
 
 			var ok = new Button ("Ok", is_default: true);
 			var ok = new Button ("Ok", is_default: true);
-			ok.Clicked += () => { okPressed = true; Application.RequestStop (); };
+			ok.Clicked += (s,e) => { okPressed = true; Application.RequestStop (); };
 			var cancel = new Button ("Cancel");
 			var cancel = new Button ("Cancel");
-			cancel.Clicked += () => { Application.RequestStop (); };
+			cancel.Clicked += (s,e) => { Application.RequestStop (); };
 			var d = new Dialog (title, 60, 20, ok, cancel);
 			var d = new Dialog (title, 60, 20, ok, cancel);
 
 
 			var lbl = new Label () {
 			var lbl = new Label () {

+ 2 - 2
UICatalog/Scenarios/TextAlignments.cs

@@ -52,7 +52,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Right (edit) + 1,
 				X = Pos.Right (edit) + 1,
 				Y = 0,
 				Y = 0,
 			};
 			};
-			unicodeSample.Clicked += () => {
+			unicodeSample.Clicked += (s,e) => {
 				edit.Text = unicodeSampleText;
 				edit.Text = unicodeSampleText;
 			};
 			};
 			Win.Add (unicodeSample);
 			Win.Add (unicodeSample);
@@ -62,7 +62,7 @@ namespace UICatalog.Scenarios {
 				Y = Pos.Bottom (edit) - 1,
 				Y = Pos.Bottom (edit) - 1,
 
 
 			};
 			};
-			update.Clicked += () => {
+			update.Clicked += (s,e) => {
 				foreach (var alignment in alignments) {
 				foreach (var alignment in alignments) {
 					singleLines [(int)alignment].Text = edit.Text;
 					singleLines [(int)alignment].Text = edit.Text;
 					multipleLines [(int)alignment].Text = edit.Text;
 					multipleLines [(int)alignment].Text = edit.Text;

+ 8 - 8
UICatalog/Scenarios/Threading.cs

@@ -46,7 +46,7 @@ namespace UICatalog.Scenarios {
 
 
 
 
 			_btnActionCancel = new Button (1, 1, "Cancelable Load Items");
 			_btnActionCancel = new Button (1, 1, "Cancelable Load Items");
-			_btnActionCancel.Clicked += () => Application.MainLoop.Invoke (CallLoadItemsAsync);
+			_btnActionCancel.Clicked += (s,e) => Application.MainLoop.Invoke (CallLoadItemsAsync);
 
 
 			Win.Add (new Label ("Data Items:") {
 			Win.Add (new Label ("Data Items:") {
 				X = Pos.X (_btnActionCancel),
 				X = Pos.X (_btnActionCancel),
@@ -77,19 +77,19 @@ namespace UICatalog.Scenarios {
 			var text = new TextField (1, 3, 100, "Type anything after press the button");
 			var text = new TextField (1, 3, 100, "Type anything after press the button");
 
 
 			var _btnAction = new Button (80, 10, "Load Data Action");
 			var _btnAction = new Button (80, 10, "Load Data Action");
-			_btnAction.Clicked += () => _action.Invoke ();
+			_btnAction.Clicked += (s,e) => _action.Invoke ();
 			var _btnLambda = new Button (80, 12, "Load Data Lambda");
 			var _btnLambda = new Button (80, 12, "Load Data Lambda");
-			_btnLambda.Clicked += () => _lambda.Invoke ();
+			_btnLambda.Clicked += (s,e) => _lambda.Invoke ();
 			var _btnHandler = new Button (80, 14, "Load Data Handler");
 			var _btnHandler = new Button (80, 14, "Load Data Handler");
-			_btnHandler.Clicked += () => _handler.Invoke (null, new EventArgs ());
+			_btnHandler.Clicked += (s,e) => _handler.Invoke (null, new EventArgs ());
 			var _btnSync = new Button (80, 16, "Load Data Synchronous");
 			var _btnSync = new Button (80, 16, "Load Data Synchronous");
-			_btnSync.Clicked += () => _sync.Invoke ();
+			_btnSync.Clicked += (s,e) => _sync.Invoke ();
 			var _btnMethod = new Button (80, 18, "Load Data Method");
 			var _btnMethod = new Button (80, 18, "Load Data Method");
-			_btnMethod.Clicked += async () => await MethodAsync ();
+			_btnMethod.Clicked += async (s,e) => await MethodAsync ();
 			var _btnClearData = new Button (80, 20, "Clear Data");
 			var _btnClearData = new Button (80, 20, "Clear Data");
-			_btnClearData.Clicked += () => { _itemsList.Source = null; LogJob ("Cleaning Data"); };
+			_btnClearData.Clicked += (s,e) => { _itemsList.Source = null; LogJob ("Cleaning Data"); };
 			var _btnQuit = new Button (80, 22, "Quit");
 			var _btnQuit = new Button (80, 22, "Quit");
-			_btnQuit.Clicked += () => Application.RequestStop ();
+			_btnQuit.Clicked += (s,e) => Application.RequestStop ();
 
 
 			Win.Add (_itemsList, _btnActionCancel, _logJob, text, _btnAction, _btnLambda, _btnHandler, _btnSync, _btnMethod, _btnClearData, _btnQuit);
 			Win.Add (_itemsList, _btnActionCancel, _logJob, text, _btnAction, _btnLambda, _btnHandler, _btnSync, _btnMethod, _btnClearData, _btnQuit);
 
 

+ 1 - 1
UICatalog/Scenarios/TimeAndDate.cs

@@ -102,7 +102,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Center (),
 				X = Pos.Center (),
 				Y = Pos.Bottom (Win) - 5,
 				Y = Pos.Bottom (Win) - 5,
 			};
 			};
-			swapButton.Clicked += () => {
+			swapButton.Clicked += (s,e) => {
 				longTime.ReadOnly = !longTime.ReadOnly;
 				longTime.ReadOnly = !longTime.ReadOnly;
 				shortTime.ReadOnly = !shortTime.ReadOnly;
 				shortTime.ReadOnly = !shortTime.ReadOnly;
 
 

+ 2 - 2
UICatalog/Scenarios/VkeyPacketSimulator.cs

@@ -207,13 +207,13 @@ namespace UICatalog.Scenarios {
 				}
 				}
 			};
 			};
 
 
-			btnInput.Clicked += () => {
+			btnInput.Clicked += (s,e) => {
 				if (!tvInput.HasFocus && _keyboardStrokes.Count == 0) {
 				if (!tvInput.HasFocus && _keyboardStrokes.Count == 0) {
 					tvInput.SetFocus ();
 					tvInput.SetFocus ();
 				}
 				}
 			};
 			};
 
 
-			btnOutput.Clicked += () => {
+			btnOutput.Clicked += (s,e) => {
 				if (!tvOutput.HasFocus && _keyboardStrokes.Count == 0) {
 				if (!tvOutput.HasFocus && _keyboardStrokes.Count == 0) {
 					tvOutput.SetFocus ();
 					tvOutput.SetFocus ();
 				}
 				}

+ 2 - 2
UICatalog/Scenarios/WindowsAndFrameViews.cs

@@ -38,7 +38,7 @@ namespace UICatalog.Scenarios {
 				Y = 0,
 				Y = 0,
 				ColorScheme = Colors.Error,
 				ColorScheme = Colors.Error,
 			};
 			};
-			paddingButton.Clicked += () => About ();
+			paddingButton.Clicked += (s,e) => About ();
 			Win.Add (paddingButton);
 			Win.Add (paddingButton);
 			Win.Add (new Button ("Press ME! (Y = Pos.AnchorEnd(1))") {
 			Win.Add (new Button ("Press ME! (Y = Pos.AnchorEnd(1))") {
 				X = Pos.Center (),
 				X = Pos.Center (),
@@ -71,7 +71,7 @@ namespace UICatalog.Scenarios {
 					Y = 0,
 					Y = 0,
 					ColorScheme = Colors.Error,
 					ColorScheme = Colors.Error,
 				};
 				};
-				pressMeButton.Clicked += () =>
+				pressMeButton.Clicked += (s,e) =>
 					MessageBox.ErrorQuery (win.Title.ToString (), "Neat?", "Yes", "No");
 					MessageBox.ErrorQuery (win.Title.ToString (), "Neat?", "Yes", "No");
 				win.Add (pressMeButton);
 				win.Add (pressMeButton);
 				var subWin = new Window ("Sub Window") {
 				var subWin = new Window ("Sub Window") {

+ 1 - 1
UICatalog/Scenarios/WizardAsView.cs

@@ -76,7 +76,7 @@ namespace UICatalog.Scenarios {
 				X = Pos.Right (buttonLbl),
 				X = Pos.Right (buttonLbl),
 				Y = Pos.Top (buttonLbl)
 				Y = Pos.Top (buttonLbl)
 			};
 			};
-			button.Clicked += () => {
+			button.Clicked += (s,e) => {
 				secondStep.Title = "2nd Step";
 				secondStep.Title = "2nd Step";
 				MessageBox.Query ("Wizard Scenario", "This Wizard Step's title was changed to '2nd Step'", "Ok");
 				MessageBox.Query ("Wizard Scenario", "This Wizard Step's title was changed to '2nd Step'", "Ok");
 			};
 			};

+ 3 - 3
UICatalog/Scenarios/Wizards.cs

@@ -97,7 +97,7 @@ namespace UICatalog.Scenarios {
 				IsDefault = true,
 				IsDefault = true,
 			};
 			};
 
 
-			showWizardButton.Clicked += () => {
+			showWizardButton.Clicked += (s,e) => {
 				try {
 				try {
 					int width = 0;
 					int width = 0;
 					int.TryParse (widthEdit.Text.ToString (), out width);
 					int.TryParse (widthEdit.Text.ToString (), out width);
@@ -153,7 +153,7 @@ namespace UICatalog.Scenarios {
 						X = Pos.Right (buttonLbl),
 						X = Pos.Right (buttonLbl),
 						Y = Pos.Top (buttonLbl)
 						Y = Pos.Top (buttonLbl)
 					};
 					};
-					button.Clicked += () => {
+					button.Clicked += (s,e) => {
 						secondStep.Title = "2nd Step";
 						secondStep.Title = "2nd Step";
 						MessageBox.Query ("Wizard Scenario", "This Wizard Step's title was changed to '2nd Step'");
 						MessageBox.Query ("Wizard Scenario", "This Wizard Step's title was changed to '2nd Step'");
 					};
 					};
@@ -226,7 +226,7 @@ namespace UICatalog.Scenarios {
 						X = Pos.Center (),
 						X = Pos.Center (),
 						Y = Pos.AnchorEnd (1)
 						Y = Pos.AnchorEnd (1)
 					};
 					};
-					hideHelpBtn.Clicked += () => {
+					hideHelpBtn.Clicked += (s,e) => {
 						if (fourthStep.HelpText.Length > 0) {
 						if (fourthStep.HelpText.Length > 0) {
 							fourthStep.HelpText = ustring.Empty;
 							fourthStep.HelpText = ustring.Empty;
 						} else {
 						} else {

+ 3 - 3
UICatalog/UICatalog.cs

@@ -312,7 +312,7 @@ namespace UICatalog {
 					AllowsMarking = false,
 					AllowsMarking = false,
 					CanFocus = true,
 					CanFocus = true,
 				};
 				};
-				CategoryListView.OpenSelectedItem += (a) => {
+				CategoryListView.OpenSelectedItem += (s,a) => {
 					ScenarioListView.SetFocus ();
 					ScenarioListView.SetFocus ();
 				};
 				};
 				CategoryListView.SelectedItemChanged += CategoryListView_SelectedChanged;
 				CategoryListView.SelectedItemChanged += CategoryListView_SelectedChanged;
@@ -396,7 +396,7 @@ namespace UICatalog {
 			/// Launches the selected scenario, setting the global _selectedScenario
 			/// Launches the selected scenario, setting the global _selectedScenario
 			/// </summary>
 			/// </summary>
 			/// <param name="e"></param>
 			/// <param name="e"></param>
-			void ScenarioListView_OpenSelectedItem (EventArgs e)
+			void ScenarioListView_OpenSelectedItem (object sender, EventArgs e)
 			{
 			{
 				if (_selectedScenario is null) {
 				if (_selectedScenario is null) {
 					// Save selected item state
 					// Save selected item state
@@ -678,7 +678,7 @@ namespace UICatalog {
 				}
 				}
 			}
 			}
 
 
-			void CategoryListView_SelectedChanged (ListViewItemEventArgs e)
+			void CategoryListView_SelectedChanged (object sender, ListViewItemEventArgs e)
 			{
 			{
 				var item = _categories [e.Item];
 				var item = _categories [e.Item];
 				List<Scenario> newlist;
 				List<Scenario> newlist;

+ 3 - 3
UnitTests/Application/MainLoopTests.cs

@@ -636,7 +636,7 @@ namespace Terminal.Gui.ApplicationTests {
 
 
 			var btnLaunch = new Button ("Open Window");
 			var btnLaunch = new Button ("Open Window");
 
 
-			btnLaunch.Clicked += () => action ();
+			btnLaunch.Clicked += (s,e) => action ();
 
 
 			Application.Top.Add (btnLaunch);
 			Application.Top.Add (btnLaunch);
 
 
@@ -700,7 +700,7 @@ namespace Terminal.Gui.ApplicationTests {
 				Text = "total"
 				Text = "total"
 			};
 			};
 
 
-			totalbtn.Clicked += () => {
+			totalbtn.Clicked += (s,e) => {
 				MessageBox.Query ("Count", $"Count is {total}", "Ok");
 				MessageBox.Query ("Count", $"Count is {total}", "Ok");
 			};
 			};
 
 
@@ -715,7 +715,7 @@ namespace Terminal.Gui.ApplicationTests {
 			Application.RequestStop ();
 			Application.RequestStop ();
 		}
 		}
 
 
-		private static async void RunAsyncTest ()
+		private static async void RunAsyncTest (object sender, EventArgs e)
 		{
 		{
 			Assert.Equal (clickMe, btn.Text);
 			Assert.Equal (clickMe, btn.Text);
 			Assert.Equal (zero, total);
 			Assert.Equal (zero, total);

+ 2 - 2
UnitTests/Core/ViewTests.cs

@@ -1252,7 +1252,7 @@ namespace Terminal.Gui.CoreTests {
 		{
 		{
 			var wasClicked = false;
 			var wasClicked = false;
 			var view = new Button ("Click Me");
 			var view = new Button ("Click Me");
-			view.Clicked += () => wasClicked = !wasClicked;
+			view.Clicked += (s,e) => wasClicked = !wasClicked;
 			Application.Top.Add (view);
 			Application.Top.Add (view);
 
 
 			view.ProcessKey (new KeyEvent (Key.Enter, null));
 			view.ProcessKey (new KeyEvent (Key.Enter, null));
@@ -1281,7 +1281,7 @@ namespace Terminal.Gui.CoreTests {
 		{
 		{
 			var wasClicked = false;
 			var wasClicked = false;
 			var button = new Button ("Click Me");
 			var button = new Button ("Click Me");
-			button.Clicked += () => wasClicked = !wasClicked;
+			button.Clicked += (s,e) => wasClicked = !wasClicked;
 			var win = new Window () { Width = Dim.Fill (), Height = Dim.Fill () };
 			var win = new Window () { Width = Dim.Fill (), Height = Dim.Fill () };
 			win.Add (button);
 			win.Add (button);
 			Application.Top.Add (win);
 			Application.Top.Add (win);

+ 1 - 1
UnitTests/Menus/ContextMenuTests.cs

@@ -228,7 +228,7 @@ namespace Terminal.Gui.MenuTests {
 			var oldKey = Key.Null;
 			var oldKey = Key.Null;
 			var cm = new ContextMenu ();
 			var cm = new ContextMenu ();
 
 
-			cm.KeyChanged += (e) => oldKey = e;
+			cm.KeyChanged += (s,e) => oldKey = e.OldKey;
 
 
 			cm.Key = Key.Space | Key.CtrlMask;
 			cm.Key = Key.Space | Key.CtrlMask;
 			Assert.Equal (Key.Space | Key.CtrlMask, cm.Key);
 			Assert.Equal (Key.Space | Key.CtrlMask, cm.Key);

+ 2 - 2
UnitTests/Menus/MenuTests.cs

@@ -109,7 +109,7 @@ namespace Terminal.Gui.MenuTests {
 					new MenuItem ("_New", "Creates new file.", New)
 					new MenuItem ("_New", "Creates new file.", New)
 				})
 				})
 			});
 			});
-			menu.MenuOpening += (e) => {
+			menu.MenuOpening += (s,e) => {
 				Assert.Equal ("_File", e.CurrentMenu.Title);
 				Assert.Equal ("_File", e.CurrentMenu.Title);
 				Assert.Equal ("_New", e.CurrentMenu.Children [0].Title);
 				Assert.Equal ("_New", e.CurrentMenu.Children [0].Title);
 				Assert.Equal ("Creates new file.", e.CurrentMenu.Children [0].Help);
 				Assert.Equal ("Creates new file.", e.CurrentMenu.Children [0].Help);
@@ -378,7 +378,7 @@ Edit
 				}),
 				}),
 				new MenuBarItem ("_About", "Top-Level", () => miAction ="About")
 				new MenuBarItem ("_About", "Top-Level", () => miAction ="About")
 			});
 			});
-			menu.MenuOpening += (e) => mbiCurrent = e.CurrentMenu;
+			menu.MenuOpening += (s,e) => mbiCurrent = e.CurrentMenu;
 			menu.MenuOpened += (e) => {
 			menu.MenuOpened += (e) => {
 				miCurrent = e;
 				miCurrent = e;
 				mCurrent = menu.openCurrentMenu;
 				mCurrent = menu.openCurrentMenu;

+ 2 - 2
UnitTests/TopLevels/WindowTests.cs

@@ -107,7 +107,7 @@ namespace Terminal.Gui.TopLevelTests {
 			string expectedDuring = null;
 			string expectedDuring = null;
 			string expectedAfter = null;
 			string expectedAfter = null;
 			bool cancel = false;
 			bool cancel = false;
-			r.TitleChanging += (args) => {
+			r.TitleChanging += (s, args) => {
 				Assert.Equal (expectedOld, args.OldTitle);
 				Assert.Equal (expectedOld, args.OldTitle);
 				Assert.Equal (expectedDuring, args.NewTitle);
 				Assert.Equal (expectedDuring, args.NewTitle);
 				args.Cancel = cancel;
 				args.Cancel = cancel;
@@ -138,7 +138,7 @@ namespace Terminal.Gui.TopLevelTests {
 
 
 			string expectedOld = null;
 			string expectedOld = null;
 			string expected = null;
 			string expected = null;
-			r.TitleChanged += (args) => {
+			r.TitleChanged += (s,args) => {
 				Assert.Equal (expectedOld, args.OldTitle);
 				Assert.Equal (expectedOld, args.OldTitle);
 				Assert.Equal (r.Title, args.NewTitle);
 				Assert.Equal (r.Title, args.NewTitle);
 			};
 			};

+ 2 - 2
UnitTests/TopLevels/WizardTests.cs

@@ -47,7 +47,7 @@ namespace Terminal.Gui.TopLevelTests {
 			string expectedAfter = string.Empty;
 			string expectedAfter = string.Empty;
 			string expectedDuring = string.Empty;
 			string expectedDuring = string.Empty;
 			bool cancel = false;
 			bool cancel = false;
-			r.TitleChanging += (args) => {
+			r.TitleChanging += (s,args) => {
 				Assert.Equal (expectedDuring, args.NewTitle);
 				Assert.Equal (expectedDuring, args.NewTitle);
 				args.Cancel = cancel;
 				args.Cancel = cancel;
 			};
 			};
@@ -73,7 +73,7 @@ namespace Terminal.Gui.TopLevelTests {
 			Assert.Equal (ustring.Empty, r.Title);
 			Assert.Equal (ustring.Empty, r.Title);
 
 
 			string expected = string.Empty;
 			string expected = string.Empty;
-			r.TitleChanged += (args) => {
+			r.TitleChanged += (s,args) => {
 				Assert.Equal (r.Title, args.NewTitle);
 				Assert.Equal (r.Title, args.NewTitle);
 			};
 			};
 
 

+ 2 - 2
UnitTests/UICatalog/ScenarioTests.cs

@@ -295,10 +295,10 @@ namespace UICatalog.Tests {
 				ColorScheme = Colors.Dialog,
 				ColorScheme = Colors.Dialog,
 			};
 			};
 
 
-			_classListView.OpenSelectedItem += (a) => {
+			_classListView.OpenSelectedItem += (s, a) => {
 				_settingsPane.SetFocus ();
 				_settingsPane.SetFocus ();
 			};
 			};
-			_classListView.SelectedItemChanged += (args) => {
+			_classListView.SelectedItemChanged += (s, args) => {
 				ClearClass (_curView);
 				ClearClass (_curView);
 				_curView = CreateClass (_viewClasses.Values.ToArray () [_classListView.SelectedItem]);
 				_curView = CreateClass (_viewClasses.Values.ToArray () [_classListView.SelectedItem]);
 			};
 			};

+ 3 - 3
UnitTests/Views/ButtonTests.cs

@@ -76,7 +76,7 @@ namespace Terminal.Gui.ViewTests {
 		{
 		{
 			var clicked = false;
 			var clicked = false;
 			Button btn = new Button ("Test");
 			Button btn = new Button ("Test");
-			btn.Clicked += () => clicked = true;
+			btn.Clicked += (s,e) => clicked = true;
 			Application.Top.Add (btn);
 			Application.Top.Add (btn);
 			Application.Begin (Application.Top);
 			Application.Begin (Application.Top);
 
 
@@ -119,7 +119,7 @@ namespace Terminal.Gui.ViewTests {
 		{
 		{
 			var clicked = false;
 			var clicked = false;
 			Button btn = new Button ("Test");
 			Button btn = new Button ("Test");
-			btn.Clicked += () => clicked = true;
+			btn.Clicked += (s,e) => clicked = true;
 			Application.Top.Add (btn);
 			Application.Top.Add (btn);
 			Application.Begin (Application.Top);
 			Application.Begin (Application.Top);
 
 
@@ -146,7 +146,7 @@ namespace Terminal.Gui.ViewTests {
 		{
 		{
 			int pressed = 0;
 			int pressed = 0;
 			var btn = new Button ("Press Me");
 			var btn = new Button ("Press Me");
-			btn.Clicked += () => pressed++;
+			btn.Clicked += (s,e) => pressed++;
 
 
 			// The Button class supports the Accept command
 			// The Button class supports the Accept command
 			Assert.Contains (Command.Accept, btn.GetSupportedCommands ());
 			Assert.Contains (Command.Accept, btn.GetSupportedCommands ());

+ 12 - 12
UnitTests/Views/ComboBoxTests.cs

@@ -88,7 +88,7 @@ namespace Terminal.Gui.ViewTests {
 			Assert.Equal (-1, cb.SelectedItem);
 			Assert.Equal (-1, cb.SelectedItem);
 			Assert.Equal (string.Empty, cb.Text);
 			Assert.Equal (string.Empty, cb.Text);
 			var opened = false;
 			var opened = false;
-			cb.OpenSelectedItem += (_) => opened = true;
+			cb.OpenSelectedItem += (s,_) => opened = true;
 			Assert.True (cb.ProcessKey (new KeyEvent (Key.Enter, new KeyModifiers ())));
 			Assert.True (cb.ProcessKey (new KeyEvent (Key.Enter, new KeyModifiers ())));
 			Assert.False (opened);
 			Assert.False (opened);
 			cb.Text = "Tw";
 			cb.Text = "Tw";
@@ -274,7 +274,7 @@ Three
 				Width = 5
 				Width = 5
 			};
 			};
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
-			cb.OpenSelectedItem += (e) => selected = e.Value.ToString ();
+			cb.OpenSelectedItem += (s,e) => selected = e.Value.ToString ();
 			Application.Top.Add (cb);
 			Application.Top.Add (cb);
 			Application.Begin (Application.Top);
 			Application.Begin (Application.Top);
 
 
@@ -369,7 +369,7 @@ Three
 				HideDropdownListOnClick = true
 				HideDropdownListOnClick = true
 			};
 			};
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
-			cb.OpenSelectedItem += (e) => selected = e.Value.ToString ();
+			cb.OpenSelectedItem += (s,e) => selected = e.Value.ToString ();
 			Application.Top.Add (cb);
 			Application.Top.Add (cb);
 			Application.Begin (Application.Top);
 			Application.Begin (Application.Top);
 
 
@@ -431,7 +431,7 @@ Three
 				HideDropdownListOnClick = true
 				HideDropdownListOnClick = true
 			};
 			};
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
-			cb.OpenSelectedItem += (e) => selected = e.Value.ToString ();
+			cb.OpenSelectedItem += (s,e) => selected = e.Value.ToString ();
 			Application.Top.Add (cb);
 			Application.Top.Add (cb);
 			Application.Begin (Application.Top);
 			Application.Begin (Application.Top);
 
 
@@ -490,7 +490,7 @@ Three
 				HideDropdownListOnClick = false
 				HideDropdownListOnClick = false
 			};
 			};
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
-			cb.OpenSelectedItem += (e) => selected = e.Value.ToString ();
+			cb.OpenSelectedItem += (s, e) => selected = e.Value.ToString ();
 			Application.Top.Add (cb);
 			Application.Top.Add (cb);
 			Application.Begin (Application.Top);
 			Application.Begin (Application.Top);
 
 
@@ -551,7 +551,7 @@ Three
 				ReadOnly = true
 				ReadOnly = true
 			};
 			};
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
-			cb.OpenSelectedItem += (e) => selected = e.Value.ToString ();
+			cb.OpenSelectedItem += (s,e) => selected = e.Value.ToString ();
 			Application.Top.Add (cb);
 			Application.Top.Add (cb);
 			Application.Begin (Application.Top);
 			Application.Begin (Application.Top);
 
 
@@ -611,7 +611,7 @@ Three
 				HideDropdownListOnClick = true
 				HideDropdownListOnClick = true
 			};
 			};
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
-			cb.OpenSelectedItem += (e) => selected = e.Value.ToString ();
+			cb.OpenSelectedItem += (s,e) => selected = e.Value.ToString ();
 			Application.Top.Add (cb);
 			Application.Top.Add (cb);
 			Application.Begin (Application.Top);
 			Application.Begin (Application.Top);
 
 
@@ -648,7 +648,7 @@ Three
 				HideDropdownListOnClick = false
 				HideDropdownListOnClick = false
 			};
 			};
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
-			cb.OpenSelectedItem += (e) => selected = e.Value.ToString ();
+			cb.OpenSelectedItem += (s,e) => selected = e.Value.ToString ();
 			Application.Top.Add (cb);
 			Application.Top.Add (cb);
 			Application.Begin (Application.Top);
 			Application.Begin (Application.Top);
 
 
@@ -685,7 +685,7 @@ Three
 				HideDropdownListOnClick = true
 				HideDropdownListOnClick = true
 			};
 			};
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
-			cb.OpenSelectedItem += (e) => selected = e.Value.ToString ();
+			cb.OpenSelectedItem += (s,e) => selected = e.Value.ToString ();
 			Application.Top.Add (cb);
 			Application.Top.Add (cb);
 			Application.Begin (Application.Top);
 			Application.Begin (Application.Top);
 
 
@@ -790,7 +790,7 @@ Three
 				HideDropdownListOnClick = true,
 				HideDropdownListOnClick = true,
 			};
 			};
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
 			cb.SetSource (new List<string> { "One", "Two", "Three" });
-			cb.OpenSelectedItem += (e) => selected = e.Value.ToString ();
+			cb.OpenSelectedItem += (s,e) => selected = e.Value.ToString ();
 			Application.Top.Add (cb);
 			Application.Top.Add (cb);
 			Application.Begin (Application.Top);
 			Application.Begin (Application.Top);
 
 
@@ -912,8 +912,8 @@ Three ", output);
 			};
 			};
 			var list = new List<string> { "One", "Two", "Three" };
 			var list = new List<string> { "One", "Two", "Three" };
 
 
-			cb.Expanded += () => cb.SetSource (list);
-			cb.Collapsed += () => cb.Source = null;
+			cb.Expanded += (s,e) => cb.SetSource (list);
+			cb.Collapsed += (s,e) => cb.Source = null;
 
 
 			Application.Top.Add (cb);
 			Application.Top.Add (cb);
 			Application.Begin (Application.Top);
 			Application.Begin (Application.Top);

+ 2 - 2
UnitTests/Views/ListViewTests.cs

@@ -175,7 +175,7 @@ namespace Terminal.Gui.ViewTests {
 			Assert.True (lv.ProcessKey (new KeyEvent (Key.Space, new KeyModifiers ())));
 			Assert.True (lv.ProcessKey (new KeyEvent (Key.Space, new KeyModifiers ())));
 			Assert.True (lv.Source.IsMarked (lv.SelectedItem));
 			Assert.True (lv.Source.IsMarked (lv.SelectedItem));
 			var opened = false;
 			var opened = false;
-			lv.OpenSelectedItem += (_) => opened = true;
+			lv.OpenSelectedItem += (s,_) => opened = true;
 			Assert.True (lv.ProcessKey (new KeyEvent (Key.Enter, new KeyModifiers ())));
 			Assert.True (lv.ProcessKey (new KeyEvent (Key.Enter, new KeyModifiers ())));
 			Assert.True (opened);
 			Assert.True (opened);
 			Assert.True (lv.ProcessKey (new KeyEvent (Key.End, new KeyModifiers ())));
 			Assert.True (lv.ProcessKey (new KeyEvent (Key.End, new KeyModifiers ())));
@@ -191,7 +191,7 @@ namespace Terminal.Gui.ViewTests {
 			var rendered = false;
 			var rendered = false;
 			var source = new List<string> () { "one", "two", "three" };
 			var source = new List<string> () { "one", "two", "three" };
 			var lv = new ListView () { Width = Dim.Fill (), Height = Dim.Fill () };
 			var lv = new ListView () { Width = Dim.Fill (), Height = Dim.Fill () };
-			lv.RowRender += _ => rendered = true;
+			lv.RowRender += (s,_) => rendered = true;
 			Application.Top.Add (lv);
 			Application.Top.Add (lv);
 			Application.Begin (Application.Top);
 			Application.Begin (Application.Top);
 			Assert.False (rendered);
 			Assert.False (rendered);

+ 1 - 1
UnitTests/Views/ScrollBarViewTests.cs

@@ -909,7 +909,7 @@ This is a test
 			var text = "This is a test\nThis is a test\nThis is a test\nThis is a test\nThis is a test";
 			var text = "This is a test\nThis is a test\nThis is a test\nThis is a test\nThis is a test";
 			var label = new Label (text) { Width = 14, Height = 5 };
 			var label = new Label (text) { Width = 14, Height = 5 };
 			var btn = new Button (14, 0, "Click Me!");
 			var btn = new Button (14, 0, "Click Me!");
-			btn.Clicked += () => clicked = true;
+			btn.Clicked += (s,e) => clicked = true;
 			Application.Top.Add (label, btn);
 			Application.Top.Add (label, btn);
 
 
 			var sbv = new ScrollBarView (label, true, false) {
 			var sbv = new ScrollBarView (label, true, false) {