Skip to content

Commit f32f3fe

Browse files
committed
* EventArgs to MyraEventArgs migration
1 parent 646e5c8 commit f32f3fe

File tree

25 files changed

+67
-55
lines changed

25 files changed

+67
-55
lines changed

samples/Myra.Samples.DebugConsole/DebugPanel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public DebugPanel()
1414
_buttonHideDebug.Click += _buttonHideDebug_Click;
1515
}
1616

17-
private void _buttonHideDebug_Click(object sender, System.EventArgs e)
17+
private void _buttonHideDebug_Click(object sender, MyraEventArgs e)
1818
{
1919
RemoveFromDesktop();
2020

samples/Myra.Samples.DebugConsole/GamePanel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ private void ShowDebugPanel(bool isModal)
3636
Desktop.Widgets.Add(debugPanel);
3737
}
3838

39-
private void _buttonDebugPanel_Click(object sender, System.EventArgs e)
39+
private void _buttonDebugPanel_Click(object sender, MyraEventArgs e)
4040
{
4141
ShowDebugPanel(false);
4242

4343
}
4444

45-
private void _buttonModalDebugPanel_Click(object sender, System.EventArgs e)
45+
private void _buttonModalDebugPanel_Click(object sender, MyraEventArgs e)
4646
{
4747
ShowDebugPanel(true);
4848
}

samples/Myra.Samples.DebugConsole/Myra.Samples.DebugConsole.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<OutputType>Exe</OutputType>
44
<TargetFramework>$(AppTargetFramework)</TargetFramework>
55
<OutputPath>bin\MonoGame\$(Configuration)</OutputPath>
6+
<LangVersion>10.0</LangVersion>
67
</PropertyGroup>
78

89
<ItemGroup>

samples/Myra.Samples.DebugConsole/Program.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace Myra.Samples.DebugConsole
1+
global using Myra.Events;
2+
3+
namespace Myra.Samples.DebugConsole
24
{
35
class Program
46
{

samples/Myra.Samples.Layout2D/Myra.Samples.Layout2D.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<OutputType>Exe</OutputType>
44
<TargetFramework>$(AppTargetFramework)</TargetFramework>
55
<OutputPath>bin\MonoGame\$(Configuration)</OutputPath>
6+
<LangVersion>10.0</LangVersion>
67
</PropertyGroup>
78

89
<ItemGroup>

samples/Myra.Samples.Layout2D/MyraSamplesLayout2D.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ protected override void LoadContent()
7272
Text = "Button"
7373
}
7474
};
75-
btnB.Click += (object sender, EventArgs e) => { Console.WriteLine(btnB.Layout2d.Expresion); Console.ReadKey(); };
75+
btnB.Click += (object sender, MyraEventArgs e) => { Console.WriteLine(btnB.Layout2d.Expresion); Console.ReadKey(); };
7676

7777
btnA.Content = new Label
7878
{
7979
Text = "Calc"
8080
};
81-
btnA.Click += (object sender, EventArgs e) => { btnB.Layout2d.Expresion = (_desktop.FindChild("Expression") as TextBox).Text; _desktop.InvalidateLayout(); _desktop.UpdateLayout(); };
81+
btnA.Click += (object sender, MyraEventArgs e) => { btnB.Layout2d.Expresion = (_desktop.FindChild("Expression") as TextBox).Text; _desktop.InvalidateLayout(); _desktop.UpdateLayout(); };
8282
panel.Widgets.Add(btnA);
8383

8484
g.Widgets.Add(panel);

samples/Myra.Samples.Layout2D/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using info.lundin.math;
1+
global using Myra.Events;
2+
using info.lundin.math;
23
using System;
34

45
namespace Myra.Samples.Layout2D

samples/Myra.Samples.NonModalWindows/Myra.Samples.NonModalWindows.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<OutputType>Exe</OutputType>
44
<TargetFramework>$(AppTargetFramework)</TargetFramework>
55
<OutputPath>bin\MonoGame\$(Configuration)</OutputPath>
6+
<LangVersion>10.0</LangVersion>
67
</PropertyGroup>
78

89
<ItemGroup>

samples/Myra.Samples.NonModalWindows/Program.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace Myra.Samples.NonModalWindows
1+
global using Myra.Events;
2+
3+
namespace Myra.Samples.NonModalWindows
24
{
35
class Program
46
{

samples/Myra.Samples.NonModalWindows/UI/MainPanel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void ShowWindows()
4040
_button3.IsPressed = true;
4141
}
4242

43-
private void _button1_PressedChanged(object sender, System.EventArgs e)
43+
private void _button1_PressedChanged(object sender, MyraEventArgs e)
4444
{
4545
if (_button1.IsPressed)
4646
{
@@ -52,7 +52,7 @@ private void _button1_PressedChanged(object sender, System.EventArgs e)
5252
}
5353
}
5454

55-
private void _button2_PressedChanged(object sender, System.EventArgs e)
55+
private void _button2_PressedChanged(object sender, MyraEventArgs e)
5656
{
5757
if (_button2.IsPressed)
5858
{
@@ -64,7 +64,7 @@ private void _button2_PressedChanged(object sender, System.EventArgs e)
6464
}
6565
}
6666

67-
private void _button3_PressedChanged(object sender, System.EventArgs e)
67+
private void _button3_PressedChanged(object sender, MyraEventArgs e)
6868
{
6969
if (_button3.IsPressed)
7070
{

0 commit comments

Comments
 (0)