[NUI][AT-SPI] Add AccessibilityHidden property
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Seamless.Xaml / NUIMusicPlayer / NUIMusicPlayer.cs
1 using System;
2 using Tizen.Applications;
3 using Tizen.NUI;
4 using Tizen.NUI.BaseComponents;
5
6 namespace NUIMusicPlayer
7 {
8     public class Program : NUIApplication
9     {
10         private Window window;
11         private XamlPage page;
12         protected override void OnCreate()
13         {
14             base.OnCreate();
15             window = GetDefaultWindow();
16             window.KeyEvent += OnKeyEvent;
17
18             page = new XamlPage();
19             page.PositionUsesPivotPoint = true;
20             page.ParentOrigin = ParentOrigin.TopLeft;
21             page.PivotPoint = PivotPoint.TopLeft;
22             page.BackgroundColor = Color.Black;
23             page.Size = window.WindowSize;
24             window.Add(page);
25
26             TransitionOptions = new TransitionOptions(window);
27             TransitionOptions.EnableTransition = true;
28             TransitionOptions.CallerScreenHidden += TransitionOptions_CallerScreenHidden;
29             TransitionOptions.CallerScreenShown += TransitionOptions_CallerScreenShown;
30         }
31
32         private void TransitionOptions_CallerScreenShown(object sender, EventArgs e)
33         {
34             page.ShowInitObject();
35         }
36
37         private void TransitionOptions_CallerScreenHidden(object sender, EventArgs e)
38         {
39             page.HideInitObject();
40         }
41
42         protected override void OnAppControlReceived(AppControlReceivedEventArgs e)
43         {
44             base.OnAppControlReceived(e);
45             window.Activate();
46         }
47
48         protected override void OnResume()
49         {
50             base.OnResume();
51         }
52
53         protected override void OnPause()
54         {
55             base.OnPause();
56         }
57
58         public void OnKeyEvent(object sender, Window.KeyEventArgs e)
59         {
60             if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
61             {
62                 window.Lower();
63                 //window.Hide();
64             }
65         }
66
67         static void Main(string[] args)
68         {
69             var app = new Program();
70             app.Run(args);
71         }
72     }
73 }