using System;
using System.Runtime.InteropServices;
using Dali;
-using Dali.CSharp;
namespace MyCSharpExample
{
public Example(Dali.Application application)
{
- Console.WriteLine( "DBG : Example Constructor.... " );
_application = application;
Console.WriteLine( "InitSignal connection count = " + _application.InitSignal().GetConnectionCount() );
Console.WriteLine( "InitSignal connection count = " + _application.InitSignal().GetConnectionCount() );
}
- public void Initialize(object source, AUIApplicationInitEventArgs e)
+ public void Initialize(object source, NUIApplicationInitEventArgs e)
{
- Console.WriteLine( "DBG : Initializing.... " );
OperatorTests();
Handle handle = new Handle();
- Console.WriteLine( "DBG : Initializing.... "+ handle );
int myPropertyIndex = handle.RegisterProperty("myProperty", new Property.Value(10.0f), Property.AccessMode.READ_WRITE);
float myProperty = 0.0f;
handle.GetProperty(myPropertyIndex).Get(ref myProperty);
Console.WriteLine( "myProperty value: " + myProperty );
- Size s = new Size(5.0f, 5.0f);
- Property.Value val = new Property.Value(s);
- int myPropertyIndex2 = handle.RegisterProperty("myProperty2", val, Property.AccessMode.READ_WRITE);
+ int myPropertyIndex2 = handle.RegisterProperty("myProperty2", new Property.Value(new Size(5.0f, 5.0f)), Property.AccessMode.READ_WRITE);
Size myProperty2 = new Size(0.0f, 0.0f);
handle.GetProperty(myPropertyIndex2).Get(myProperty2);
Console.WriteLine( "myProperty2 value: " + myProperty2.W + ", " + myProperty2.H );
Actor actor = new Actor();
actor.Size = new Position(200.0f, 200.0f, 0.0f);
actor.Name = "MyActor";
- actor.Color = new Color(Colors.Green);
+ actor.Color = new Color(1.0f, 0.0f, 1.0f, 0.8f);
Console.WriteLine("Actor id: {0}", actor.GetId());
- Console.WriteLine( "DBG : Initializing.... "+ actor.Size.X );
-
Console.WriteLine("Actor size: " + actor.Size.X + ", " + actor.Size.Y);
Console.WriteLine("Actor name: " + actor.Name);
Stage stage = Stage.GetCurrent();
- stage.BackgroundColor = new Dali.CSharp.Color(Dali.CSharp.Colors.Blue) ;
+ stage.BackgroundColor = Color.White;
Size stageSize = stage.Size;
Console.WriteLine("Stage size: " + stageSize.W + ", " + stageSize.H);
stage.Add(actor);
TextLabel text = new TextLabel("Hello Mono World");
- text.ParentOrigin = new Position(NDalic.ParentOriginCenter);
- text.AnchorPoint = new Position(NDalic.AnchorPointCenter);
+ text.ParentOrigin = NDalic.ParentOriginCenter;
+ text.AnchorPoint = NDalic.AnchorPointCenter;
text.HorizontalAlignment = "CENTER";
stage.Add(text);
Console.WriteLine( " Area = " + rd2.Area() );
Console.WriteLine( " *************************" );
- Size size = new Size(100, 50);
- Console.WriteLine( " Created " + size );
- Console.WriteLine( " Size width = " + size.W + ", height = " + size.H );
- size += new Size(20, 20);
- Console.WriteLine( " Size W = " + size.W + ", H = " + size.H );
- size.W += 10;
- size.H += 10;
- Console.WriteLine( " Size width = " + size.W + ", height = " + size.H );
- size += new Size(15, 15);
- Console.WriteLine( " Size width = " + size.W + ", height = " + size.H );
+ Size Size = new Size(100, 50);
+ Console.WriteLine( " Created " + Size );
+ Console.WriteLine( " Size x = " + Size.W + ", y = " + Size.H );
+ Size += new Size(20, 20);
+ Console.WriteLine( " Size x = " + Size.W + ", y = " + Size.H );
+ Size.W += 10;
+ Size.H += 10;
+ Console.WriteLine( " Size width = " + Size.W + ", height = " + Size.H );
Console.WriteLine( " *************************" );
- Dali.CSharp.Position position = new Dali.CSharp.Position(20, 100, 50);
- Console.WriteLine( " Created " + position );
- Console.WriteLine( " Position x = " + position.X + ", y = " + position.Y + ", z = " + position.Z );
- position += new Dali.CSharp.Position(20, 20, 20);
- Console.WriteLine( " Position x = " + position.X + ", y = " + position.Y + ", z = " + position.Y );
- position.X += 10;
- position.Y += 10;
- position.Z += 10;
- Console.WriteLine( " Position width = " + position.X + ", height = " + position.Y + ", depth = " + position.Z );
- Dali.CSharp.Position parentOrigin = new Dali.CSharp.Position(NDalic.ParentOriginBottomRight);
+ Position Position = new Position(20, 100, 50);
+ Console.WriteLine( " Created " + Position );
+ Console.WriteLine( " Position x = " + Position.X + ", y = " + Position.Y + ", z = " + Position.Z );
+ Position += new Position(20, 20, 20);
+ Console.WriteLine( " Position x = " + Position.X + ", y = " + Position.Y + ", z = " + Position.Z );
+ Position.X += 10;
+ Position.Y += 10;
+ Position.Z += 10;
+ Console.WriteLine( " Position width = " + Position.X + ", height = " + Position.Y + ", depth = " + Position.Z );
+ Position parentOrigin = new Dali.Position(NDalic.ParentOriginBottomRight);
Console.WriteLine( " parentOrigin x = " + parentOrigin.X + ", y = " + parentOrigin.Y + ", z = " + parentOrigin.Z );
Console.WriteLine( " *************************" );
- Dali.CSharp.Color color = new Dali.CSharp.Color(20, 100, 50, 200);
+ Color color = new Color(20, 100, 50, 200);
Console.WriteLine( " Created " + color );
- Console.WriteLine( " Color x = " + color.R + ", y = " + color.G + ", z = " + color.B + ", w = " + color.A );
- color += new Dali.CSharp.Color(20, 20, 20, 20);
- Console.WriteLine( " Color x = " + color.R + ", y = " + color.G + ", z = " + color.B + ", w = " + color.A );
+ Console.WriteLine( " Color R = " + color.R + ", G = " + color.G + ", B = " + color.B + ", A = " + color.A );
+ color += new Color(20, 20, 20, 20);
+ Console.WriteLine( " 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;
- Console.WriteLine( " Color x = " + color.R + ", y = " + color.G + ", z = " + color.B + ", w = " + color.A );
+ Console.WriteLine( " Color r = " + color.R + ", g = " + color.G + ", b = " + color.B + ", a = " + color.A );
}