diff options
author | Felipe Magno de Almeida <felipe@expertisesolutions.com.br> | 2019-01-28 16:03:49 +0900 |
---|---|---|
committer | Felipe Magno de Almeida <felipe@expertisesolutions.com.br> | 2019-01-28 16:03:49 +0900 |
commit | 1d5a5322dfc5ad67c9d3c338d0622d736ade1554 (patch) | |
tree | aa6e46545f216be92d97918b985d053c6c701b86 | |
parent | 500049f1eb376dbd0b07a3688546c4f11a567d6b (diff) |
efl-mono: Fix examples based on new D7789
-rw-r--r-- | apps/csharp/life/src/life_board.cs | 4 | ||||
-rw-r--r-- | apps/csharp/life/src/life_main.cs | 3 | ||||
-rw-r--r-- | reference/csharp/core/src/core_event.cs | 5 | ||||
-rw-r--r-- | reference/csharp/core/src/core_idler.cs | 5 | ||||
-rw-r--r-- | reference/csharp/core/src/core_poll.cs | 5 |
5 files changed, 5 insertions, 17 deletions
diff --git a/apps/csharp/life/src/life_board.cs b/apps/csharp/life/src/life_board.cs index 836c0169..26dbf62c 100644 --- a/apps/csharp/life/src/life_board.cs +++ b/apps/csharp/life/src/life_board.cs | |||
@@ -60,9 +60,7 @@ public class LifeBoard | |||
60 | 60 | ||
61 | public void Run(Efl.Ui.Win win) | 61 | public void Run(Efl.Ui.Win win) |
62 | { | 62 | { |
63 | lifeTimer = new Efl.LoopTimer(win, (Efl.LoopTimer etimer) => { | 63 | lifeTimer = new Efl.LoopTimer(win, 0.1); |
64 | etimer.SetInterval(0.1); | ||
65 | }); | ||
66 | 64 | ||
67 | lifeTimer.TickEvt += (object sender, EventArgs ev) => { | 65 | lifeTimer.TickEvt += (object sender, EventArgs ev) => { |
68 | Nextgen(); | 66 | Nextgen(); |
diff --git a/apps/csharp/life/src/life_main.cs b/apps/csharp/life/src/life_main.cs index 4dd34dd6..11e2b816 100644 --- a/apps/csharp/life/src/life_main.cs +++ b/apps/csharp/life/src/life_main.cs | |||
@@ -37,8 +37,7 @@ public class LifeWindow | |||
37 | 37 | ||
38 | public LifeWindow() | 38 | public LifeWindow() |
39 | { | 39 | { |
40 | Efl.Ui.Win win = new Efl.Ui.Win(null); | 40 | Efl.Ui.Win win = new Efl.Ui.Win(null, null, Efl.Ui.WinType.Basic); |
41 | win.SetWinType(Efl.Ui.WinType.Basic); | ||
42 | win.SetText("EFL Life"); | 41 | win.SetText("EFL Life"); |
43 | win.SetAutohide(true); | 42 | win.SetAutohide(true); |
44 | 43 | ||
diff --git a/reference/csharp/core/src/core_event.cs b/reference/csharp/core/src/core_event.cs index 2cb6d8e0..b0caac81 100644 --- a/reference/csharp/core/src/core_event.cs +++ b/reference/csharp/core/src/core_event.cs | |||
@@ -31,10 +31,7 @@ public class Example | |||
31 | mainloop.PollHighEvt += PollCb; | 31 | mainloop.PollHighEvt += PollCb; |
32 | 32 | ||
33 | // This timer will control events fired by the main loop | 33 | // This timer will control events fired by the main loop |
34 | var timer = new Efl.LoopTimer(mainloop, (Efl.LoopTimer etimer) => { | 34 | var timer = new Efl.LoopTimer(mainloop, 0.1); |
35 | // Trigger every 100ms | ||
36 | etimer.SetInterval(0.1); | ||
37 | }); | ||
38 | timer.SetName("Timer"); | 35 | timer.SetName("Timer"); |
39 | // To count number of timer triggers | 36 | // To count number of timer triggers |
40 | int tick_count = 0; | 37 | int tick_count = 0; |
diff --git a/reference/csharp/core/src/core_idler.cs b/reference/csharp/core/src/core_idler.cs index e8853e51..7e272796 100644 --- a/reference/csharp/core/src/core_idler.cs +++ b/reference/csharp/core/src/core_idler.cs | |||
@@ -34,10 +34,7 @@ public class Example | |||
34 | }; | 34 | }; |
35 | 35 | ||
36 | // Use a timer to exit the application | 36 | // Use a timer to exit the application |
37 | var timer = new Efl.LoopTimer(mainloop, (Efl.LoopTimer etimer) => { | 37 | var timer = new Efl.LoopTimer(mainloop, 0.01); |
38 | // Trigger after 10ms | ||
39 | etimer.SetInterval(0.01); | ||
40 | }); | ||
41 | timer.TickEvt += (object sender, EventArgs e) => { | 38 | timer.TickEvt += (object sender, EventArgs e) => { |
42 | Console.WriteLine("TIMER: timer callback called, exiting."); | 39 | Console.WriteLine("TIMER: timer callback called, exiting."); |
43 | mainloop.Quit(new Eina.Value(0)); | 40 | mainloop.Quit(new Eina.Value(0)); |
diff --git a/reference/csharp/core/src/core_poll.cs b/reference/csharp/core/src/core_poll.cs index 3ecf7bc1..522a36aa 100644 --- a/reference/csharp/core/src/core_poll.cs +++ b/reference/csharp/core/src/core_poll.cs | |||
@@ -33,10 +33,7 @@ public class Example | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | // Use a timer to exit the application | 35 | // Use a timer to exit the application |
36 | var timer = new Efl.LoopTimer(mainloop, (Efl.LoopTimer etimer) => { | 36 | var timer = new Efl.LoopTimer(mainloop, 30); |
37 | // Trigger after 30s | ||
38 | etimer.SetInterval(30); | ||
39 | }); | ||
40 | timer.TickEvt += (object sender, EventArgs e) => { | 37 | timer.TickEvt += (object sender, EventArgs e) => { |
41 | Console.WriteLine("\nTIMER: timer callback called, exiting."); | 38 | Console.WriteLine("\nTIMER: timer callback called, exiting."); |
42 | mainloop.Quit(new Eina.Value(0)); | 39 | mainloop.Quit(new Eina.Value(0)); |