3 using Tizen.NUI.BaseComponents;
4 using Tizen.Applications;
6 namespace NUISimpleCaller
8 class Program : NUIApplication
10 protected override void OnCreate()
18 Window.Instance.KeyEvent += OnKeyEvent;
19 Window.Instance.TouchEvent += OnTouchEvent;
21 TextLabel text = new TextLabel("NUI Simple Caller Sample");
22 text.HorizontalAlignment = HorizontalAlignment.Center;
23 text.VerticalAlignment = VerticalAlignment.Center;
24 text.TextColor = Color.Blue;
25 text.PointSize = 12.0f;
26 text.HeightResizePolicy = ResizePolicyType.FillToParent;
27 text.WidthResizePolicy = ResizePolicyType.FillToParent;
28 Window.Instance.GetDefaultLayer().Add(text);
31 TransitionOptions = new TransitionOptions(GetDefaultWindow());
32 TransitionOptions.EnableTransition = true;
33 TransitionOptions.ForwardAnimation = new SlideIn(300);
34 TransitionOptions.BackwardAnimation = new SlideOut(300);
36 ////TransitionOptions.AnimationStart += TransitionOptions_AnimationStart;
37 ////TransitionOptions.AnimationFinished += TransitionOptions_AnimationFinished;
40 private void TransitionOptions_AnimationFinished()
42 Tizen.Log.Error("MYLOG", "Finish Animation");
45 private void TransitionOptions_AnimationStart()
47 Tizen.Log.Error("MYLOG", "Start Animation");
50 private void OnTouchEvent(object sender, Window.TouchEventArgs e)
52 if (e.Touch.GetState(0) == PointStateType.Up)
54 AppControl appControl = new AppControl();
55 appControl.ApplicationId = "org.tizen.example.NUISimpleCallee";
56 SendLaunchRequest(appControl);
60 public void OnKeyEvent(object sender, Window.KeyEventArgs e)
62 if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
68 static void Main(string[] args)
70 var app = new Program();