Merge "Changed README to README.md" into devel/master
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / examples / hello-world.cs
index 0a5a841..cd9b72e 100755 (executable)
@@ -40,16 +40,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.SetBackgroundColor( NDalic.WHITE );
+            stage.BackgroundColor = NDalic.WHITE;
 
-            stage.Touched += new Dali.Stage.TouchEventHandler(OnStageTouched);
+           stage.Touched += OnStageTouched;
 
             // Add a _text label to the stage
             _text = new TextLabel("Hello Mono World");
@@ -65,7 +65,7 @@ namespace MyCSharpExample
         public void AnimationFinished(object source, Animation.FinishedEventArgs e)
         {
             Console.WriteLine("Customized Animation Finished Event handler");
-            Console.WriteLine("Animation finished: duration = " + e.Animation.GetDuration());
+            Console.WriteLine("Animation finished: duration = " + e.Animation.Duration);
         }
 
         // Callback for stage touched signal handling
@@ -85,11 +85,12 @@ 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();