Changeset View
Changeset View
Standalone View
Standalone View
src/tests/efl_mono/Model.cs
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | 55 | { | |||
---|---|---|---|---|---|
61 | task.Wait(); | 61 | task.Wait(); | ||
62 | } | 62 | } | ||
63 | 63 | | |||
64 | public static void factory_test () | 64 | public static void factory_test () | ||
65 | { | 65 | { | ||
66 | string propertyBound = null; | 66 | string propertyBound = null; | ||
67 | bool callbackCalled = false; | 67 | bool callbackCalled = false; | ||
68 | var factory = new Efl.Ui.ItemFactory<Efl.Ui.Button>(); | 68 | var factory = new Efl.Ui.ItemFactory<Efl.Ui.Button>(); | ||
69 | factory.PropertyBoundEvent += (object sender, Efl.Ui.IPropertyBindPropertyBoundEventArgs args) => { | 69 | factory.PropertyBoundEvent += (object sender, Efl.Ui.PropertyBindPropertyBoundEventArgs args) => { | ||
70 | propertyBound = args.arg; | 70 | propertyBound = args.arg; | ||
71 | callbackCalled = true; | 71 | callbackCalled = true; | ||
72 | }; | 72 | }; | ||
73 | 73 | | |||
74 | factory.Style().Bind("first name"); | 74 | factory.Style().Bind("first name"); | ||
75 | 75 | | |||
76 | Test.Assert(callbackCalled, "Property bound callback must have been called."); | 76 | Test.Assert(callbackCalled, "Property bound callback must have been called."); | ||
77 | Test.AssertEquals(propertyBound, "style"); | 77 | Test.AssertEquals(propertyBound, "style"); | ||
78 | } | 78 | } | ||
79 | } | 79 | } | ||
80 | 80 | | |||
81 | } | 81 | } | ||
82 | 82 | | |||
83 | #endif | 83 | #endif |