2 using Tizen.Applications;
4 using Tizen.NUI.BaseComponents;
6 namespace NUIMusicPlayer
8 public class Program : NUIApplication
10 private Window window;
11 private XamlPage page;
12 protected override void OnCreate()
15 window = GetDefaultWindow();
16 window.KeyEvent += OnKeyEvent;
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;
26 TransitionOptions = new TransitionOptions(window);
27 TransitionOptions.EnableTransition = true;
28 TransitionOptions.CallerScreenHidden += TransitionOptions_CallerScreenHidden;
29 TransitionOptions.CallerScreenShown += TransitionOptions_CallerScreenShown;
32 private void TransitionOptions_CallerScreenShown(object sender, EventArgs e)
34 page.ShowInitObject();
37 private void TransitionOptions_CallerScreenHidden(object sender, EventArgs e)
39 page.HideInitObject();
42 protected override void OnAppControlReceived(AppControlReceivedEventArgs e)
44 base.OnAppControlReceived(e);
48 protected override void OnResume()
53 protected override void OnPause()
58 public void OnKeyEvent(object sender, Window.KeyEventArgs e)
60 if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
67 static void Main(string[] args)
69 var app = new Program();