aboutsummaryrefslogtreecommitdiffstats
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
parentdemonstrate application and SimpleApplication (diff)
downloadexamples-devs/lauromoura/csharp_app.tar.gz
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
{
// quit the mainloop
if (ev.arg == false)
- Efl.Ui.Config.Exit();
+ Efl.App.AppMain.Quit(0);
}
void TouchEvt(object sender, Efl.Input.IInterfacePointerDownEvt_Args ev)
@@ -41,7 +41,11 @@ public class LifeWindow : Efl.Csharp.Application
protected override void OnInitialize(Eina.Array<System.String> args)
{
- Efl.Ui.Win win = new Efl.Ui.Win(parent: null, winName: "Life", winType: Efl.Ui.WinType.Basic);
+ foreach (string arg in args)
+ {
+ Eina.Log.Error($"Got arg [{arg}]");
+ }
+ win = new Efl.Ui.Win(parent: null, winName: "Life", winType: Efl.Ui.WinType.Basic);
win.SetText("EFL Life");
win.SetAutohide(true);
@@ -64,19 +68,27 @@ public class LifeWindow : Efl.Csharp.Application
lifeBoard.Run(win);
}
- protected void OnPause() {
+ protected override void OnPause() {
if (win != null) {
lifeBoard.TogglePause(win);
}
}
- protected void OnResume() {
+ protected override void OnResume() {
if (win != null) {
lifeBoard.TogglePause(win);
}
}
- protected void OnTerminate() {
+ protected override void OnTerminate() {
Console.WriteLine("Goodbye.");
}
+
+ protected override void OnArguments(Efl.LoopArguments args) {
+ Eina.Log.Error($"Got arguments: {args.Argv}");
+ foreach (string arg in args.Argv)
+ {
+ Eina.Log.Error($"Got arg [{arg}]");
+ }
+ }
}
public class Example