felipealmeida pushed a commit to branch master.

http://git.enlightenment.org/tools/examples.git/commit/?id=1d5a5322dfc5ad67c9d3c338d0622d736ade1554

commit 1d5a5322dfc5ad67c9d3c338d0622d736ade1554
Author: Felipe Magno de Almeida <[email protected]>
Date:   Mon Jan 28 16:03:49 2019 +0900

    efl-mono: Fix examples based on new D7789
---
 apps/csharp/life/src/life_board.cs      | 4 +---
 apps/csharp/life/src/life_main.cs       | 3 +--
 reference/csharp/core/src/core_event.cs | 5 +----
 reference/csharp/core/src/core_idler.cs | 5 +----
 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
 
     public void Run(Efl.Ui.Win win)
     {
-        lifeTimer = new Efl.LoopTimer(win, (Efl.LoopTimer etimer) => {
-            etimer.SetInterval(0.1);
-        });
+        lifeTimer = new Efl.LoopTimer(win, 0.1);
 
         lifeTimer.TickEvt += (object sender, EventArgs ev) => {
             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
 
     public LifeWindow()
     {
-        Efl.Ui.Win win = new Efl.Ui.Win(null);
-        win.SetWinType(Efl.Ui.WinType.Basic);
+        Efl.Ui.Win win = new Efl.Ui.Win(null, null, Efl.Ui.WinType.Basic);
         win.SetText("EFL Life");
         win.SetAutohide(true);
 
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
         mainloop.PollHighEvt += PollCb;
 
         // This timer will control events fired by the main loop
-        var timer = new Efl.LoopTimer(mainloop, (Efl.LoopTimer etimer) => {
-            // Trigger every 100ms
-            etimer.SetInterval(0.1);
-        });
+        var timer = new Efl.LoopTimer(mainloop, 0.1);
         timer.SetName("Timer");
         // To count number of timer triggers
         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
         };
 
         // Use a timer to exit the application
-        var timer = new Efl.LoopTimer(mainloop, (Efl.LoopTimer etimer) => {
-            // Trigger after 10ms
-            etimer.SetInterval(0.01);
-        });
+        var timer = new Efl.LoopTimer(mainloop, 0.01);
         timer.TickEvt += (object sender, EventArgs e) => {
           Console.WriteLine("TIMER: timer callback called, exiting.");
           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
         };
 
         // Use a timer to exit the application
-        var timer = new Efl.LoopTimer(mainloop, (Efl.LoopTimer etimer) => {
-            // Trigger after 30s
-            etimer.SetInterval(30);
-        });
+        var timer = new Efl.LoopTimer(mainloop, 30);
         timer.TickEvt += (object sender, EventArgs e) => {
           Console.WriteLine("\nTIMER: timer callback called, exiting.");
           mainloop.Quit(new Eina.Value(0));

-- 


Reply via email to