mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Move all nested eventargs out of parent classes to root
This commit is contained in:
@@ -582,7 +582,7 @@ namespace Terminal.Gui.ApplicationTests {
|
||||
|
||||
int keyUps = 0;
|
||||
var output = string.Empty;
|
||||
Application.Top.KeyUp += (object sender, View.KeyEventEventArgs args) => {
|
||||
Application.Top.KeyUp += (object sender, KeyEventEventArgs args) => {
|
||||
if (args.KeyEvent.Key != (Key.CtrlMask | Key.Q)) {
|
||||
output += (char)args.KeyEvent.KeyValue;
|
||||
}
|
||||
|
||||
@@ -775,7 +775,7 @@ namespace Terminal.Gui.ConfigurationTests {
|
||||
|
||||
ConfigurationManager.Updated += ConfigurationManager_Updated;
|
||||
bool fired = false;
|
||||
void ConfigurationManager_Updated (object sender, ConfigurationManager.ConfigurationManagerEventArgs obj)
|
||||
void ConfigurationManager_Updated (object sender, ConfigurationManagerEventArgs obj)
|
||||
{
|
||||
fired = true;
|
||||
// assert
|
||||
@@ -801,7 +801,7 @@ namespace Terminal.Gui.ConfigurationTests {
|
||||
ConfigurationManager.Reset ();
|
||||
ConfigurationManager.Applied += ConfigurationManager_Applied;
|
||||
bool fired = false;
|
||||
void ConfigurationManager_Applied (object sender, ConfigurationManager.ConfigurationManagerEventArgs obj)
|
||||
void ConfigurationManager_Applied (object sender, ConfigurationManagerEventArgs obj)
|
||||
{
|
||||
fired = true;
|
||||
// assert
|
||||
|
||||
@@ -1539,7 +1539,7 @@ namespace Terminal.Gui.CoreTests {
|
||||
var tf = new TextField ();
|
||||
tf.KeyPress += Tf_KeyPress;
|
||||
|
||||
void Tf_KeyPress (object sender, View.KeyEventEventArgs obj)
|
||||
void Tf_KeyPress (object sender, KeyEventEventArgs obj)
|
||||
{
|
||||
if (obj.KeyEvent.Key == (Key.Q | Key.CtrlMask)) {
|
||||
obj.Handled = tfQuiting = true;
|
||||
@@ -1551,7 +1551,7 @@ namespace Terminal.Gui.CoreTests {
|
||||
var top = Application.Top;
|
||||
top.KeyPress += Top_KeyPress;
|
||||
|
||||
void Top_KeyPress (object sender, View.KeyEventEventArgs obj)
|
||||
void Top_KeyPress (object sender, KeyEventEventArgs obj)
|
||||
{
|
||||
if (obj.KeyEvent.Key == (Key.Q | Key.CtrlMask)) {
|
||||
obj.Handled = topQuiting = true;
|
||||
@@ -1599,7 +1599,7 @@ namespace Terminal.Gui.CoreTests {
|
||||
var tf = new TextField ();
|
||||
tf.KeyPress += Tf_KeyPress;
|
||||
|
||||
void Tf_KeyPress (object sender, View.KeyEventEventArgs obj)
|
||||
void Tf_KeyPress (object sender, KeyEventEventArgs obj)
|
||||
{
|
||||
if (obj.KeyEvent.Key == (Key.Q | Key.CtrlMask)) {
|
||||
obj.Handled = tfQuiting = true;
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace UICatalog.Tests {
|
||||
};
|
||||
var token = Application.MainLoop.AddTimeout (TimeSpan.FromMilliseconds (ms), abortCallback);
|
||||
|
||||
Application.Top.KeyPress += (object sender, View.KeyEventEventArgs args) => {
|
||||
Application.Top.KeyPress += (object sender, KeyEventEventArgs args) => {
|
||||
Assert.Equal (Key.CtrlMask | Key.Q, args.KeyEvent.Key);
|
||||
};
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ namespace Terminal.Gui.ViewTests {
|
||||
public void PositionChanged_Event ()
|
||||
{
|
||||
var hv = new HexView (LoadStream ()) { Width = Dim.Fill (), Height = Dim.Fill () };
|
||||
HexView.HexViewEventArgs hexViewEventArgs = null;
|
||||
HexViewEventArgs hexViewEventArgs = null;
|
||||
hv.PositionChanged += (s, e) => hexViewEventArgs = e;
|
||||
Application.Top.Add (hv);
|
||||
Application.Begin (Application.Top);
|
||||
|
||||
Reference in New Issue
Block a user