X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=plugins%2Fdali-swig%2Fexamples%2Fhello-world.cs;h=7853ce3dbaba1f4f28e386450f739a3b431ffaed;hb=6372d0a99afb85f510d114f76573296a4b2f387b;hp=c2caeb524b88225328d220a6193ffe8798fcc424;hpb=ee2676c4dfd4ec5e1cb7078acf2ead93fc4c9051;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/plugins/dali-swig/examples/hello-world.cs b/plugins/dali-swig/examples/hello-world.cs index c2caeb5..7853ce3 100755 --- a/plugins/dali-swig/examples/hello-world.cs +++ b/plugins/dali-swig/examples/hello-world.cs @@ -23,15 +23,6 @@ namespace MyCSharpExample { class Example { - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - delegate void CallbackDelegate(IntPtr data); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - delegate void TouchCallbackDelegate(IntPtr data); - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - delegate void AnimationCallbackDelegate(IntPtr data); - private Dali.Application _application; private Animation _animation; @@ -40,16 +31,16 @@ namespace MyCSharpExample public Example(Dali.Application application) { _application = application; - _application.Initialized += new Dali.AUIApplicationInitEventHandler(Initialize); + _application.Initialized += Initialize; } public void Initialize(object source, AUIApplicationInitEventArgs e) { Console.WriteLine("Customized Application Initialize event handler"); Stage stage = Stage.GetCurrent(); - stage.BackgroundColor = NDalic.WHITE; + stage.BackgroundColor = new Color("white"); - stage.Touched += new Dali.Stage.TouchEventHandler(OnStageTouched); + stage.Touched += OnStageTouched; // Add a _text label to the stage _text = new TextLabel("Hello Mono World"); @@ -66,6 +57,7 @@ namespace MyCSharpExample { Console.WriteLine("Customized Animation Finished Event handler"); Console.WriteLine("Animation finished: duration = " + e.Animation.Duration); + Console.WriteLine("End Action = " + e.Animation.GetEndAction()); } // Callback for stage touched signal handling @@ -85,14 +77,17 @@ namespace MyCSharpExample _animation = new Animation(1.0f); // 1 second of duration - _animation.AnimateTo(new Property(_text, Actor.Property.ORIENTATION), new Property.Value(new Quaternion( new Radian( new Degree( 180.0f ) ), Vector3.XAXIS )), new AlphaFunction(AlphaFunction.BuiltinFunction.LINEAR), new TimePeriod(0.0f, 0.5f)); - _animation.AnimateTo(new Property(_text, Actor.Property.ORIENTATION), new Property.Value(new Quaternion( new Radian( new Degree( 0.0f ) ), Vector3.XAXIS )), new AlphaFunction(AlphaFunction.BuiltinFunction.LINEAR), new TimePeriod(0.5f, 0.5f)); + _animation.AnimateTo(_text, Animation.Orientation, new Quaternion( new Radian( new Degree( 180.0f ) ), Vector3.XAXIS ), new AlphaFunction(Dali.Constants.AlphaFunction.BuiltinFunction.Linear), new TimePeriod(0.0f, 0.5f)); + + _animation.AnimateTo(_text, Animation.Orientation, new Quaternion( new Radian( new Degree( 0.0f ) ), Vector3.XAXIS ), new AlphaFunction(Dali.Constants.AlphaFunction.BuiltinFunction.Linear), new TimePeriod(0.5f, 0.5f)); // Connect the signal callback for animaiton finished signal - _animation.Finished += new Dali.Animation.FinishedEventHandler(AnimationFinished); + _animation.Finished += AnimationFinished; // Play the _animation _animation.Play(); + + Console.WriteLine("Looping:" + _animation.Looping); } }