public void AnimatableGetProperty() { tlog.Debug(tag, $"AnimatableGetProperty START"); var testingTarget = new Animatable(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <Animatable>(testingTarget, "should be an instance of ImageView class!"); testingTarget.RegisterProperty("dummy", new PropertyValue(6), PropertyAccessMode.Animatable); var index = testingTarget.GetPropertyIndex("dummy"); testingTarget.GetProperty(index).Get(out int result); Assert.AreEqual(6, result, "should be equal."); testingTarget.Dispose(); tlog.Debug(tag, $"AnimatableGetProperty END (OK)"); }
public void Initialize() { DowncastTest(); NavigationPropertiesTests(); OperatorTests(); CustomViewPropertyTest(); VisibilityChangeTest(); ResourceReadyTest(); ViewFocusTest(); WindowDevelPropertyTest(); Animatable handle = new Animatable(); int myPropertyIndex = handle.RegisterProperty("myProperty", new PropertyValue(10.0f), PropertyAccessMode.ReadWrite); float myProperty = 0.0f; handle.GetProperty(myPropertyIndex).Get(out myProperty); Tizen.Log.Debug("NUI", "myProperty value: " + myProperty); int myPropertyIndex2 = handle.RegisterProperty("myProperty2", new PropertyValue(new Size(5.0f, 5.0f, 0.0f)), PropertyAccessMode.ReadWrite); Size2D myProperty2 = new Size2D(0, 0); handle.GetProperty(myPropertyIndex2).Get(myProperty2); Tizen.Log.Debug("NUI", "myProperty2 value: " + myProperty2.Width + ", " + myProperty2.Height); View view = new View(); view.Size2D = new Size2D(200, 200); view.Name = "MyView"; //view.MixColor = new Color(1.0f, 0.0f, 1.0f, 0.8f); Tizen.Log.Debug("NUI", "View size: " + view.Size2D.Width + ", " + view.Size2D.Height); Tizen.Log.Debug("NUI", "View name: " + view.Name); Window window = Window.Instance; window.BackgroundColor = Color.White; Size windowSize = new Size(window.Size.Width, window.Size.Height, 0.0f); Tizen.Log.Debug("NUI", "Window size: " + windowSize.Width + ", " + windowSize.Height); window.Add(view); TextLabel text = new TextLabel("Hello Mono World"); text.ParentOrigin = ParentOrigin.Center; text.PivotPoint = PivotPoint.Center; text.HorizontalAlignment = HorizontalAlignment.Center; window.Add(text); Tizen.Log.Debug("NUI", "Text label text: " + text.Text); Tizen.Log.Debug("NUI", "Text label point size: " + text.PointSize); text.PointSize = 32.0f; Tizen.Log.Debug("NUI", "Text label new point size: " + text.PointSize); RectanglePaddingClassTest(); Tizen.Log.Debug("NUI", " *************************"); Size Size = new Size(100, 50, 0); Tizen.Log.Debug("NUI", " Created " + Size); Tizen.Log.Debug("NUI", " Size x = " + Size.Width + ", y = " + Size.Height); Size += new Size(20, 20, 0); Tizen.Log.Debug("NUI", " Size x = " + Size.Width + ", y = " + Size.Height); Size.Width += 10; Size.Height += 10; Tizen.Log.Debug("NUI", " Size width = " + Size.Width + ", height = " + Size.Height); Tizen.Log.Debug("NUI", " *************************"); Position Position = new Position(20, 100, 50); Tizen.Log.Debug("NUI", " Created " + Position); Tizen.Log.Debug("NUI", " Position x = " + Position.X + ", y = " + Position.Y + ", z = " + Position.Z); Position += new Position(20, 20, 20); Tizen.Log.Debug("NUI", " Position x = " + Position.X + ", y = " + Position.Y + ", z = " + Position.Z); Position.X += 10; Position.Y += 10; Position.Z += 10; Tizen.Log.Debug("NUI", " Position width = " + Position.X + ", height = " + Position.Y + ", depth = " + Position.Z); Tizen.Log.Debug("NUI", " *************************"); Color color = new Color(20, 100, 50, 200); Tizen.Log.Debug("NUI", " Created " + color); Tizen.Log.Debug("NUI", " Color R = " + color.R + ", G = " + color.G + ", B = " + color.B + ", A = " + color.A); color += new Color(20, 20, 20, 20); Tizen.Log.Debug("NUI", " Color R = " + color.R + ", G = " + color.G + ", B = " + color.B + ", A = " + color.A); color.R += 10; color.G += 10; color.B += 10; color.A += 10; Tizen.Log.Debug("NUI", " Color r = " + color.R + ", g = " + color.G + ", b = " + color.B + ", a = " + color.A); ViewDownCastTest(); }