diff options
author | Xavi Artigas <xavierartigas@yahoo.es> | 2019-09-06 16:10:16 +0200 |
---|---|---|
committer | Xavi Artigas <xavierartigas@yahoo.es> | 2019-09-06 16:10:16 +0200 |
commit | 40801d928510c53c2c2e42efe7190b58c97d16de (patch) | |
tree | 3d51e015ac119e6db978970da3ed4c2a3d2c3bdc /reference/csharp | |
parent | 5472a77fb3ace3fa3dba7ae4c4770314412d5e55 (diff) |
mono-examples: adapt to latest bindings syntax
Diffstat (limited to 'reference/csharp')
-rw-r--r-- | reference/csharp/snippets/Efl.Ui.Win.cs | 2 | ||||
-rw-r--r-- | reference/csharp/ui/src/focus_main.cs | 6 | ||||
-rw-r--r-- | reference/csharp/ui/src/ui_container.cs | 4 | ||||
-rw-r--r-- | reference/csharp/ui/src/ui_custom_widget.cs | 4 | ||||
-rw-r--r-- | reference/csharp/ui/src/ui_sizing.cs | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/reference/csharp/snippets/Efl.Ui.Win.cs b/reference/csharp/snippets/Efl.Ui.Win.cs index c4712e77..243008a2 100644 --- a/reference/csharp/snippets/Efl.Ui.Win.cs +++ b/reference/csharp/snippets/Efl.Ui.Win.cs | |||
@@ -2,5 +2,5 @@ var win = new Efl.Ui.Win(Efl.App.AppMain); | |||
2 | win.SetText("Hello World"); | 2 | win.SetText("Hello World"); |
3 | win.SetAutohide(true); | 3 | win.SetAutohide(true); |
4 | win.VisibilityChangedEvent += | 4 | win.VisibilityChangedEvent += |
5 | (object sender, Efl.Gfx.IEntityVisibilityChangedEventArgs e) => {}; | 5 | (object sender, Efl.Gfx.EntityVisibilityChangedEventArgs e) => {}; |
6 | 6 | ||
diff --git a/reference/csharp/ui/src/focus_main.cs b/reference/csharp/ui/src/focus_main.cs index ae943ba5..20fcf9b0 100644 --- a/reference/csharp/ui/src/focus_main.cs +++ b/reference/csharp/ui/src/focus_main.cs | |||
@@ -13,7 +13,7 @@ public class Example : Efl.Csharp.Application | |||
13 | var win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic); | 13 | var win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic); |
14 | win.SetText("Focus example"); | 14 | win.SetText("Focus example"); |
15 | win.SetAutohide(true); | 15 | win.SetAutohide(true); |
16 | win.VisibilityChangedEvent += (object sender, Efl.Gfx.IEntityVisibilityChangedEventArgs e) => { | 16 | win.VisibilityChangedEvent += (object sender, Efl.Gfx.EntityVisibilityChangedEventArgs e) => { |
17 | // Exit the EFL main loop | 17 | // Exit the EFL main loop |
18 | if (e.arg == false) | 18 | if (e.arg == false) |
19 | Efl.Ui.Config.Exit(); | 19 | Efl.Ui.Config.Exit(); |
@@ -46,7 +46,7 @@ public class Example : Efl.Csharp.Application | |||
46 | var button = new Efl.Ui.Button(hbox); | 46 | var button = new Efl.Ui.Button(hbox); |
47 | button.SetText("Focus mover"); | 47 | button.SetText("Focus mover"); |
48 | button.FocusChangedEvent += FocusChangedCb; | 48 | button.FocusChangedEvent += FocusChangedCb; |
49 | button.ClickedEvent += (object sender, Efl.Input.IClickableClickedEventArgs e) => { | 49 | button.ClickedEvent += (object sender, Efl.Input.ClickableClickedEventArgs e) => { |
50 | Console.WriteLine("Clicked Focus Mover"); | 50 | Console.WriteLine("Clicked Focus Mover"); |
51 | // Manually transfer focus to the first check box | 51 | // Manually transfer focus to the first check box |
52 | Efl.Ui.Focus.Util.Focus(first_checkbox); | 52 | Efl.Ui.Focus.Util.Focus(first_checkbox); |
@@ -57,7 +57,7 @@ public class Example : Efl.Csharp.Application | |||
57 | button = new Efl.Ui.Button(hbox); | 57 | button = new Efl.Ui.Button(hbox); |
58 | button.SetText("Quit"); | 58 | button.SetText("Quit"); |
59 | button.FocusChangedEvent += FocusChangedCb; | 59 | button.FocusChangedEvent += FocusChangedCb; |
60 | button.ClickedEvent += (object sender, Efl.Input.IClickableClickedEventArgs e) => { | 60 | button.ClickedEvent += (object sender, Efl.Input.ClickableClickedEventArgs e) => { |
61 | Console.WriteLine("Clicked Quit"); | 61 | Console.WriteLine("Clicked Quit"); |
62 | Efl.Ui.Config.Exit(); | 62 | Efl.Ui.Config.Exit(); |
63 | }; | 63 | }; |
diff --git a/reference/csharp/ui/src/ui_container.cs b/reference/csharp/ui/src/ui_container.cs index 9d987e17..5379ee66 100644 --- a/reference/csharp/ui/src/ui_container.cs +++ b/reference/csharp/ui/src/ui_container.cs | |||
@@ -63,7 +63,7 @@ public class Example : Efl.Csharp.Application | |||
63 | Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic); | 63 | Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic); |
64 | win.SetText("Container demo"); | 64 | win.SetText("Container demo"); |
65 | win.SetAutohide(true); | 65 | win.SetAutohide(true); |
66 | win.VisibilityChangedEvent += (object sender, Efl.Gfx.IEntityVisibilityChangedEventArgs e) => { | 66 | win.VisibilityChangedEvent += (object sender, Efl.Gfx.EntityVisibilityChangedEventArgs e) => { |
67 | // Exit the EFL main loop | 67 | // Exit the EFL main loop |
68 | if (e.arg == false) | 68 | if (e.arg == false) |
69 | Efl.Ui.Config.Exit(); | 69 | Efl.Ui.Config.Exit(); |
@@ -98,7 +98,7 @@ public class Example : Efl.Csharp.Application | |||
98 | Efl.Ui.Button quit_btn = new Efl.Ui.Button(win); | 98 | Efl.Ui.Button quit_btn = new Efl.Ui.Button(win); |
99 | quit_btn.SetText("Quit"); | 99 | quit_btn.SetText("Quit"); |
100 | quit_btn.SetHintSizeMax(new Eina.Size2D(150, 30)); | 100 | quit_btn.SetHintSizeMax(new Eina.Size2D(150, 30)); |
101 | quit_btn.ClickedEvent += (object sender, Efl.Input.IClickableClickedEventArgs e) => { | 101 | quit_btn.ClickedEvent += (object sender, Efl.Input.ClickableClickedEventArgs e) => { |
102 | // Exit the EFL main loop | 102 | // Exit the EFL main loop |
103 | Efl.Ui.Config.Exit(); | 103 | Efl.Ui.Config.Exit(); |
104 | }; | 104 | }; |
diff --git a/reference/csharp/ui/src/ui_custom_widget.cs b/reference/csharp/ui/src/ui_custom_widget.cs index 6cc14d2c..0907c47f 100644 --- a/reference/csharp/ui/src/ui_custom_widget.cs +++ b/reference/csharp/ui/src/ui_custom_widget.cs | |||
@@ -36,7 +36,7 @@ public class Example : Efl.Csharp.Application | |||
36 | Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic); | 36 | Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic); |
37 | win.SetText("Custom widget demo"); | 37 | win.SetText("Custom widget demo"); |
38 | win.SetAutohide(true); | 38 | win.SetAutohide(true); |
39 | win.VisibilityChangedEvent += (object sender, Efl.Gfx.IEntityVisibilityChangedEventArgs e) => { | 39 | win.VisibilityChangedEvent += (object sender, Efl.Gfx.EntityVisibilityChangedEventArgs e) => { |
40 | // Exit the EFL main loop when the window is closed | 40 | // Exit the EFL main loop when the window is closed |
41 | if (e.arg == false) | 41 | if (e.arg == false) |
42 | Efl.Ui.Config.Exit(); | 42 | Efl.Ui.Config.Exit(); |
@@ -46,7 +46,7 @@ public class Example : Efl.Csharp.Application | |||
46 | 46 | ||
47 | // Instantiate our custom button widget | 47 | // Instantiate our custom button widget |
48 | MyButton btn = new MyButton(win, 99); | 48 | MyButton btn = new MyButton(win, 99); |
49 | btn.ClickedEvent += (object sender, Efl.Input.IClickableClickedEventArgs e) => { | 49 | btn.ClickedEvent += (object sender, Efl.Input.ClickableClickedEventArgs e) => { |
50 | // When the button is clicked, change its text | 50 | // When the button is clicked, change its text |
51 | MyButton b = (MyButton)sender; | 51 | MyButton b = (MyButton)sender; |
52 | b.SetText("Hello!"); | 52 | b.SetText("Hello!"); |
diff --git a/reference/csharp/ui/src/ui_sizing.cs b/reference/csharp/ui/src/ui_sizing.cs index 23e0f2d1..5749d2b1 100644 --- a/reference/csharp/ui/src/ui_sizing.cs +++ b/reference/csharp/ui/src/ui_sizing.cs | |||
@@ -16,7 +16,7 @@ public class Example : Efl.Csharp.Application | |||
16 | Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic); | 16 | Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic); |
17 | win.SetText("Size Control"); | 17 | win.SetText("Size Control"); |
18 | win.SetAutohide(true); | 18 | win.SetAutohide(true); |
19 | win.VisibilityChangedEvent += (object sender, Efl.Gfx.IEntityVisibilityChangedEventArgs e) => { | 19 | win.VisibilityChangedEvent += (object sender, Efl.Gfx.EntityVisibilityChangedEventArgs e) => { |
20 | // Exit the EFL main loop | 20 | // Exit the EFL main loop |
21 | if (e.arg == false) | 21 | if (e.arg == false) |
22 | Efl.Ui.Config.Exit(); | 22 | Efl.Ui.Config.Exit(); |