X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=plugins%2Fdali-swig%2Fexamples%2Fhello-world.cs;h=a392996ceced394a755c5c544e9b3a3763804706;hp=8437e3ae5eff4730552ed49d441335beff33e856;hb=3fc0516c8f87d42c4bbf7979bd2002c62c4c537f;hpb=82ae5bfae69e5db5845c495270c62b35bf6c3213 diff --git a/plugins/dali-swig/examples/hello-world.cs b/plugins/dali-swig/examples/hello-world.cs index 8437e3a..a392996 100755 --- a/plugins/dali-swig/examples/hello-world.cs +++ b/plugins/dali-swig/examples/hello-world.cs @@ -34,15 +34,12 @@ namespace MyCSharpExample _application.Initialized += Initialize; } - public void Initialize(object source, AUIApplicationInitEventArgs e) + public void Initialize(object source, NUIApplicationInitEventArgs e) { Console.WriteLine("Customized Application Initialize event handler"); - Stage stage = Stage.GetCurrent(); - stage.BackgroundColor = Color.Cyan; - stage.TouchEvent += OnStageTouched; - stage.WheelEvent += OnStageWheelMoved; - stage.KeyEvent += OnStageKeyPressed; - stage.EventProcessingFinished += OnStageEventProcessingFinished; + Stage stage = Stage.Instance; + stage.BackgroundColor = Color.White; + stage.Touch += OnStageTouched; // Add a _text label to the stage _text = new TextLabel("Hello Mono World"); @@ -57,13 +54,7 @@ namespace MyCSharpExample // Callback for _animation finished signal handling public void AnimationFinished(object sender, EventArgs e) { - Console.WriteLine("AnimationFinished()!"); - } - - // Callback for _animation finished signal handling - public void AnimationFinished2(object sender, EventArgs e) - { - Console.WriteLine("AnimationFinished2()!"); + Console.WriteLine("AnimationFinished()!"); if(_animation) { Console.WriteLine("Duration= " + _animation.Duration); @@ -71,34 +62,11 @@ namespace MyCSharpExample } } - public void OnStageEventProcessingFinished(object sender, EventArgs e) - { - Console.WriteLine("OnStageEventProcessingFinished()!"); - if( e != null) - { - Console.WriteLine("e != null !"); - } - } - - public void OnStageKeyPressed(object sender, Stage.KeyEventArgs e) - { - Console.WriteLine("OnStageKeyEventOccured()!"); - Console.WriteLine("keyPressedName=" + e.KeyEvent.keyPressedName); - Console.WriteLine("state=" + e.KeyEvent.state); - } - - public void OnStageWheelMoved(object sender, Stage.WheelEventArgs e) - { - Console.WriteLine("OnStageWheelEventOccured()!"); - Console.WriteLine("direction=" + e.WheelEvent.direction); - Console.WriteLine("type=" + e.WheelEvent.type); - } - // Callback for stage touched signal handling public void OnStageTouched(object sender, Stage.TouchEventArgs e) { // Only animate the _text label when touch down happens - if( e.TouchData.GetState(0) == PointStateType.DOWN ) + if( e.Touch.GetState(0) == PointStateType.DOWN ) { Console.WriteLine("Customized Stage Touch event handler"); // Create a new _animation @@ -112,34 +80,33 @@ namespace MyCSharpExample Duration = 2000, StartTime = 0, EndTime = 500, - TargetPoperty = "Orientation", - Destination = new Quaternion( new Radian( new Degree( 180.0f ) ), Vect3.Xaxis) + TargetProperty = "Orientation", + Destination = new Rotation( new Radian( new Degree( 180.0f ) ), Vect3.Xaxis) }; _animation.AnimateTo(_text); _animation.StartTime = 500; _animation.EndTime = 1000; - _animation.TargetPoperty = "Orientation"; - _animation.Destination = new Quaternion( new Radian( new Degree( 0.0f ) ), Vect3.Xaxis ); + _animation.TargetProperty = "Orientation"; + _animation.Destination = new Rotation( new Radian( new Degree( 0.0f ) ), Vect3.Xaxis ); _animation.AnimateTo(_text); _animation.StartTime = 1000; _animation.EndTime = 1500; - _animation.TargetPoperty = "ScaleX"; + _animation.TargetProperty = "ScaleX"; _animation.Destination = 3.0f; _animation.AnimateBy(_text); _animation.StartTime = 1500; _animation.EndTime = 2000; - _animation.TargetPoperty = "ScaleY"; + _animation.TargetProperty = "ScaleY"; _animation.Destination = 4.0f; _animation.AnimateBy(_text); - _animation.EndAction = Dali.Constants.Animation.EndAction.Discard; + _animation.EndAction = Animation.EndActions.Discard; // Connect the signal callback for animaiton finished signal _animation.Finished += AnimationFinished; - _animation.Finished += AnimationFinished2; // Play the _animation _animation.Play();