summaryrefslogtreecommitdiff
path: root/reference/csharp/core
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-09-06 16:01:45 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-09-06 16:01:45 +0200
commit5472a77fb3ace3fa3dba7ae4c4770314412d5e55 (patch)
treed8cefe8c79195557178db6f8904e32d7dab45f15 /reference/csharp/core
parent17609ba6bf8bea42e121f742fceea77308e50d5d (diff)
mono-examples: adapt to latest bindings syntax
Diffstat (limited to 'reference/csharp/core')
-rw-r--r--reference/csharp/core/src/core_event.cs4
-rw-r--r--reference/csharp/core/src/core_idler.cs8
-rw-r--r--reference/csharp/core/src/core_poll.cs8
3 files changed, 10 insertions, 10 deletions
diff --git a/reference/csharp/core/src/core_event.cs b/reference/csharp/core/src/core_event.cs
index bb617bd..43a5d67 100644
--- a/reference/csharp/core/src/core_event.cs
+++ b/reference/csharp/core/src/core_event.cs
@@ -22,14 +22,14 @@ public class Example : Efl.Csharp.Application
22 mainloop.SetName("Mainloop"); 22 mainloop.SetName("Mainloop");
23 23
24 // This event gets triggered continuously 24 // This event gets triggered continuously
25 mainloop.PollHighEvt += PollCb; 25 mainloop.PollHighEvent += PollCb;
26 26
27 // This timer will control events fired by the main loop 27 // This timer will control events fired by the main loop
28 var timer = new Efl.LoopTimer(mainloop, 0.1); 28 var timer = new Efl.LoopTimer(mainloop, 0.1);
29 timer.SetName("Timer"); 29 timer.SetName("Timer");
30 // To count number of timer triggers 30 // To count number of timer triggers
31 int tick_count = 0; 31 int tick_count = 0;
32 timer.TimerTickEvt += (object sender, EventArgs e) => { 32 timer.TimerTickEvent += (object sender, EventArgs e) => {
33 string message = "Tick {0} from {1}: "; 33 string message = "Tick {0} from {1}: ";
34 // Depending on the number of timer ticks, it does a different thing 34 // Depending on the number of timer ticks, it does a different thing
35 switch (tick_count) { 35 switch (tick_count) {
diff --git a/reference/csharp/core/src/core_idler.cs b/reference/csharp/core/src/core_idler.cs
index 224511b..458a15d 100644
--- a/reference/csharp/core/src/core_idler.cs
+++ b/reference/csharp/core/src/core_idler.cs
@@ -17,19 +17,19 @@ public class Example : Efl.Csharp.Application
17 var mainloop = Efl.App.AppMain; 17 var mainloop = Efl.App.AppMain;
18 18
19 // Register to all Idle events 19 // Register to all Idle events
20 mainloop.IdleEnterEvt += (object sender, EventArgs e) => { 20 mainloop.IdleEnterEvent += (object sender, EventArgs e) => {
21 Console.WriteLine("IDLE ENTER: Entering idle state."); 21 Console.WriteLine("IDLE ENTER: Entering idle state.");
22 }; 22 };
23 mainloop.IdleEvt += (object sender, EventArgs e) => { 23 mainloop.IdleEvent += (object sender, EventArgs e) => {
24 Console.WriteLine("IDLE: Executing idler callback while in idle state."); 24 Console.WriteLine("IDLE: Executing idler callback while in idle state.");
25 }; 25 };
26 mainloop.IdleExitEvt += (object sender, EventArgs e) => { 26 mainloop.IdleExitEvent += (object sender, EventArgs e) => {
27 Console.WriteLine("IDLE EXIT: Leaving idle state."); 27 Console.WriteLine("IDLE EXIT: Leaving idle state.");
28 }; 28 };
29 29
30 // Use a timer to exit the application 30 // Use a timer to exit the application
31 var timer = new Efl.LoopTimer(mainloop, 0.02); 31 var timer = new Efl.LoopTimer(mainloop, 0.02);
32 timer.TimerTickEvt += (object sender, EventArgs e) => { 32 timer.TimerTickEvent += (object sender, EventArgs e) => {
33 Console.WriteLine("TIMER: timer callback called, exiting."); 33 Console.WriteLine("TIMER: timer callback called, exiting.");
34 mainloop.Quit(0); 34 mainloop.Quit(0);
35 }; 35 };
diff --git a/reference/csharp/core/src/core_poll.cs b/reference/csharp/core/src/core_poll.cs
index 0032223..9f233c1 100644
--- a/reference/csharp/core/src/core_poll.cs
+++ b/reference/csharp/core/src/core_poll.cs
@@ -16,19 +16,19 @@ public class Example : Efl.Csharp.Application
16 var mainloop = Efl.App.AppMain; 16 var mainloop = Efl.App.AppMain;
17 17
18 // Register to all Poll events 18 // Register to all Poll events
19 mainloop.PollLowEvt += (object sender, EventArgs e) => { 19 mainloop.PollLowEvent += (object sender, EventArgs e) => {
20 Console.Write("L"); 20 Console.Write("L");
21 }; 21 };
22 mainloop.PollMediumEvt += (object sender, EventArgs e) => { 22 mainloop.PollMediumEvent += (object sender, EventArgs e) => {
23 Console.Write("M"); 23 Console.Write("M");
24 }; 24 };
25 mainloop.PollHighEvt += (object sender, EventArgs e) => { 25 mainloop.PollHighEvent += (object sender, EventArgs e) => {
26 Console.Write("."); 26 Console.Write(".");
27 }; 27 };
28 28
29 // Use a timer to exit the application 29 // Use a timer to exit the application
30 var timer = new Efl.LoopTimer(mainloop, 30); 30 var timer = new Efl.LoopTimer(mainloop, 30);
31 timer.TimerTickEvt += (object sender, EventArgs e) => { 31 timer.TimerTickEvent += (object sender, EventArgs e) => {
32 Console.WriteLine("\nTIMER: timer callback called, exiting."); 32 Console.WriteLine("\nTIMER: timer callback called, exiting.");
33 mainloop.Quit(0); 33 mainloop.Quit(0);
34 }; 34 };