summaryrefslogtreecommitdiff
path: root/tutorial/csharp/eo-intro
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2018-07-04 14:24:33 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2018-07-04 15:01:27 +0200
commitaa68b683e59b9b3ee742a162f52d486f03678e34 (patch)
tree76ee28df708f541c0d8d8a88d6eb42ea166a5c4f /tutorial/csharp/eo-intro
parent33dad0d59cd6deb64685cbd8460db6c49cf94780 (diff)
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
Diffstat (limited to 'tutorial/csharp/eo-intro')
-rw-r--r--tutorial/csharp/eo-intro/src/eo_intro_main.cs16
1 files 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 fc5e68e..386366d 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 @@
1using System;
1 2
2public class Example 3public class Example
3{ 4{
4 efl.model.Item root, child2; 5 static efl.IModel_Item root, child2;
5 6
6 // Create our test hierarchy 7 // Create our test hierarchy
7 static void ObjCreate() 8 static void ObjCreate()
8 { 9 {
9 // First create a root element 10 // First create a root element
10 root = new efl.model.Item(null, (efl.model.Item eroot) => { 11 root = new efl.Model_Item(null, (efl.IModel_Item eroot) => {
11 eroot.SetName("Root"); 12 eroot.SetName("Root");
12 }); 13 });
13 14
14 // Create the first child element 15 // Create the first child element
15 new efl.model.Item(root, (efl.model.Item eroot) => { 16 new efl.Model_Item(root, (efl.IModel_Item eroot) => {
16 eroot.SetName("Child1"); 17 eroot.SetName("Child1");
17 }); 18 });
18 19
19 // Create the second child element, this time, with an extra reference 20 // Create the second child element, this time, with an extra reference
20 child2 = new efl.model.Item(root, (efl.model.Item eroot) => { 21 child2 = new efl.Model_Item(root, (efl.IModel_Item eroot) => {
21 eroot.SetName("Child2"); 22 eroot.SetName("Child2");
22 }); 23 });
23 } 24 }
@@ -26,12 +27,11 @@ public class Example
26 static void ObjDestroy() 27 static void ObjDestroy()
27 { 28 {
28 // Destroy the root element 29 // Destroy the root element
29 printf ("Deleting Root...\n"); 30 Console.WriteLine ("Deleting Root...\n");
30 efl_unref(root);
31 root.Dispose(); 31 root.Dispose();
32 32
33 // Destroy the child2 element, for which we were keeping an extra reference 33 // Destroy the child2 element, for which we were keeping an extra reference
34 printf ("Deleting Child2...\n"); 34 Console.WriteLine ("Deleting Child2...\n");
35 child2.Dispose(); 35 child2.Dispose();
36 } 36 }
37 37
@@ -47,4 +47,4 @@ public class Example
47 47
48 efl.All.Shutdown(); 48 efl.All.Shutdown();
49 } 49 }
50} \ No newline at end of file 50}