X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=plugins%2Fdali-swig%2Fexamples%2Fdali-test.cs;h=274b97a0373cddd00819351a48c33658e4871005;hb=c57e053b5795783ad92b0fd7f8fbaba6b6d9322a;hp=b6396f750202098a56efd9fd439f298689cca397;hpb=dcee19c07c4f38251b88ca0ad849c9a666cf20eb;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/plugins/dali-swig/examples/dali-test.cs b/plugins/dali-swig/examples/dali-test.cs index b6396f7..274b97a 100644 --- a/plugins/dali-swig/examples/dali-test.cs +++ b/plugins/dali-swig/examples/dali-test.cs @@ -37,11 +37,12 @@ namespace MyCSharpExample Console.WriteLine( "InitSignal connection count = " + _application.InitSignal().GetConnectionCount() ); } - public void Initialize(object source, AUIApplicationInitEventArgs e) + public void Initialize(object source, NUIApplicationInitEventArgs e) { - OperatorTests(); + CustomViewPropertyTest(); + Handle handle = new Handle(); int myPropertyIndex = handle.RegisterProperty("myProperty", new Property.Value(10.0f), Property.AccessMode.READ_WRITE); float myProperty = 0.0f; @@ -58,7 +59,7 @@ namespace MyCSharpExample actor.Name = "MyActor"; actor.Color = new Color(1.0f, 0.0f, 1.0f, 0.8f); Console.WriteLine("Actor id: {0}", actor.GetId()); - Console.WriteLine("Actor size: " + actor.Size.x + ", " + actor.Size.y); + Console.WriteLine("Actor size: " + actor.Size.X + ", " + actor.Size.Y); Console.WriteLine("Actor name: " + actor.Name); Stage stage = Stage.GetCurrent(); @@ -338,6 +339,52 @@ namespace MyCSharpExample } + public void CustomViewPropertyTest() + { + // Create a Spin control + Spin spin = new Spin(); + + // Background property + Property.Map background = new Property.Map(); + background.Add( Dali.Constants.Visual.Property.Type, new Property.Value((int)Dali.Constants.Visual.Type.Color) ) + .Add( Dali.Constants.ColorVisualProperty.MixColor, new Property.Value(Color.Red) ); + spin.Background = background; + + background = spin.Background; + Vector4 backgroundColor = new Vector4(); + background.Find(Dali.Constants.ColorVisualProperty.MixColor).Get(backgroundColor); + if( backgroundColor == Color.Red ) + { + Console.WriteLine ("Custom View Background property : test passed"); + } + else + { + Console.WriteLine ("Custom View Background property : test failed"); + } + + // BackgroundColor property + spin.BackgroundColor = Color.Yellow; + if(spin.BackgroundColor == Color.Yellow) + { + Console.WriteLine ("Custom View BackgroundColor property : test passed"); + } + else + { + Console.WriteLine ("Custom View BackgroundColor property : test failed"); + } + + // StyleName property + spin.StyleName = "MyCustomStyle"; + if(spin.StyleName == "MyCustomStyle") + { + Console.WriteLine ("Custom View StyleName property : test passed"); + } + else + { + Console.WriteLine ("Custom View StyleName property : test failed"); + } + } + public void MainLoop() { _application.MainLoop ();