X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=plugins%2Fdali-swig%2Fexamples%2Fdali-test.cs;h=6e106aeb665fcc2309735281a6d9326b564bd932;hp=73b7fb31f557d47ed4a7fa16c266d4f37aecc975;hb=b00827fcac356e25c32ce504a202efa54aeee4a6;hpb=50a6c0040f45569ffa098042607582015fb1b137 diff --git a/plugins/dali-swig/examples/dali-test.cs b/plugins/dali-swig/examples/dali-test.cs index 73b7fb3..6e106ae 100644 --- a/plugins/dali-swig/examples/dali-test.cs +++ b/plugins/dali-swig/examples/dali-test.cs @@ -108,6 +108,8 @@ namespace MyCSharpExample public void Initialize(object source, NUIApplicationInitEventArgs e) { + NavigationPropertiesTests(); + OperatorTests(); CustomViewPropertyTest(); @@ -265,6 +267,83 @@ namespace MyCSharpExample } } + public void NavigationPropertiesTests() + { + View view = new View(); + View leftView, rightView, upView, downView, tmpView; + + leftView = new View(); + leftView.Name = "leftView"; + rightView = new View(); + rightView.Name = "rightView"; + upView = new View(); + upView.Name = "upView"; + downView = new View(); + downView.Name = "downView"; + + Stage.Instance.Add(leftView); + Stage.Instance.Add(rightView); + Stage.Instance.Add(upView); + Stage.Instance.Add(downView); + + view.LeftFocusableView = leftView; + tmpView = view.LeftFocusableView; + if (string.Compare(tmpView.Name, "leftView") == 0) + { + Console.WriteLine("Passed: LeftFocusedView = " + tmpView.Name); + } + else + { + Console.WriteLine("Failed: LeftFocusedView = " + tmpView.Name); + } + + view.RightFocusableView = rightView; + tmpView = view.RightFocusableView; + if (string.Compare(tmpView.Name, "rightView") == 0) + { + Console.WriteLine("Passed: RightFocusedView = " + tmpView.Name); + } + else + { + Console.WriteLine("Failed: RightFocusedView = " + tmpView.Name); + } + + Stage.Instance.Add(view); + + view.UpFocusableView = upView; + tmpView = view.UpFocusableView; + if (string.Compare(tmpView.Name, "upView") == 0) + { + Console.WriteLine("Passed: UpFocusedView = " + tmpView.Name); + } + else + { + Console.WriteLine("Failed: UpFocusedView = " + tmpView.Name); + } + + view.DownFocusableView = downView; + tmpView = view.DownFocusableView; + if (string.Compare(tmpView.Name, "downView") == 0) + { + Console.WriteLine("Passed: DownFocusedView = " + tmpView.Name); + } + else + { + Console.WriteLine("Failed: DownFocusedView = " + tmpView.Name); + } + + Stage.Instance.Remove(leftView); + tmpView = view.LeftFocusableView; + if (!tmpView) + { + Console.WriteLine("Passed: NULL LeftFocusedView"); + } + else + { + Console.WriteLine("Failed: LeftFocusedView = " + tmpView.Name); + } + } + public void OperatorTests() { Actor actor = new Actor();