From aa68b683e59b9b3ee742a162f52d486f03678e34 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Wed, 4 Jul 2018 14:24:33 +0200 Subject: [PATCH] tutorials: Fix C# eo_intro Summary: Adapt to API changes plus some other issues (has this ever built for anyone?). Reviewers: lauromoura, felipealmeida Differential Revision: https://phab.enlightenment.org/D6505 --- tutorial/csharp/eo-intro/src/eo_intro_main.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tutorial/csharp/eo-intro/src/eo_intro_main.cs b/tutorial/csharp/eo-intro/src/eo_intro_main.cs index fc5e68ed..386366de 100644 --- a/tutorial/csharp/eo-intro/src/eo_intro_main.cs +++ b/tutorial/csharp/eo-intro/src/eo_intro_main.cs @@ -1,23 +1,24 @@ +using System; public class Example { - efl.model.Item root, child2; + static efl.IModel_Item root, child2; // Create our test hierarchy static void ObjCreate() { // First create a root element - root = new efl.model.Item(null, (efl.model.Item eroot) => { + root = new efl.Model_Item(null, (efl.IModel_Item eroot) => { eroot.SetName("Root"); }); // Create the first child element - new efl.model.Item(root, (efl.model.Item eroot) => { + new efl.Model_Item(root, (efl.IModel_Item eroot) => { eroot.SetName("Child1"); }); // Create the second child element, this time, with an extra reference - child2 = new efl.model.Item(root, (efl.model.Item eroot) => { + child2 = new efl.Model_Item(root, (efl.IModel_Item eroot) => { eroot.SetName("Child2"); }); } @@ -26,12 +27,11 @@ public class Example static void ObjDestroy() { // Destroy the root element - printf ("Deleting Root...\n"); - efl_unref(root); + Console.WriteLine ("Deleting Root...\n"); root.Dispose(); // Destroy the child2 element, for which we were keeping an extra reference - printf ("Deleting Child2...\n"); + Console.WriteLine ("Deleting Child2...\n"); child2.Dispose(); } @@ -47,4 +47,4 @@ public class Example efl.All.Shutdown(); } -} \ No newline at end of file +}