summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-03-25 10:53:59 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-03-25 10:53:59 -0300
commitc86eb912e6fc418b782eec3c481ffb07ad625eca (patch)
treec2da500acf2507995f10bdd2483f4e4c4d1631ef
parent3053ccd67229cf90e8ab8c825cc60b295c425e74 (diff)
Changes to new csharp application schemedevs/lauromoura/csharp_app
-rw-r--r--apps/csharp/life/src/life_main.cs22
1 files changed, 17 insertions, 5 deletions
diff --git a/apps/csharp/life/src/life_main.cs b/apps/csharp/life/src/life_main.cs
index a004b0f8..accc64c9 100644
--- a/apps/csharp/life/src/life_main.cs
+++ b/apps/csharp/life/src/life_main.cs
@@ -18,7 +18,7 @@ public class LifeWindow : Efl.Csharp.Application
18 { 18 {
19 // quit the mainloop 19 // quit the mainloop
20 if (ev.arg == false) 20 if (ev.arg == false)
21 Efl.Ui.Config.Exit(); 21 Efl.App.AppMain.Quit(0);
22 } 22 }
23 23
24 void TouchEvt(object sender, Efl.Input.IInterfacePointerDownEvt_Args ev) 24 void TouchEvt(object sender, Efl.Input.IInterfacePointerDownEvt_Args ev)
@@ -41,7 +41,11 @@ public class LifeWindow : Efl.Csharp.Application
41 41
42 protected override void OnInitialize(Eina.Array<System.String> args) 42 protected override void OnInitialize(Eina.Array<System.String> args)
43 { 43 {
44 Efl.Ui.Win win = new Efl.Ui.Win(parent: null, winName: "Life", winType: Efl.Ui.WinType.Basic); 44 foreach (string arg in args)
45 {
46 Eina.Log.Error($"Got arg [{arg}]");
47 }
48 win = new Efl.Ui.Win(parent: null, winName: "Life", winType: Efl.Ui.WinType.Basic);
45 win.SetText("EFL Life"); 49 win.SetText("EFL Life");
46 win.SetAutohide(true); 50 win.SetAutohide(true);
47 51
@@ -64,19 +68,27 @@ public class LifeWindow : Efl.Csharp.Application
64 68
65 lifeBoard.Run(win); 69 lifeBoard.Run(win);
66 } 70 }
67 protected void OnPause() { 71 protected override void OnPause() {
68 if (win != null) { 72 if (win != null) {
69 lifeBoard.TogglePause(win); 73 lifeBoard.TogglePause(win);
70 } 74 }
71 } 75 }
72 protected void OnResume() { 76 protected override void OnResume() {
73 if (win != null) { 77 if (win != null) {
74 lifeBoard.TogglePause(win); 78 lifeBoard.TogglePause(win);
75 } 79 }
76 } 80 }
77 protected void OnTerminate() { 81 protected override void OnTerminate() {
78 Console.WriteLine("Goodbye."); 82 Console.WriteLine("Goodbye.");
79 } 83 }
84
85 protected override void OnArguments(Efl.LoopArguments args) {
86 Eina.Log.Error($"Got arguments: {args.Argv}");
87 foreach (string arg in args.Argv)
88 {
89 Eina.Log.Error($"Got arg [{arg}]");
90 }
91 }
80} 92}
81 93
82public class Example 94public class Example