Changes to new csharp application scheme

This commit is contained in:
Lauro Moura 2019-03-25 10:53:59 -03:00
parent 3053ccd672
commit c86eb912e6
1 changed files with 17 additions and 5 deletions

View File

@ -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