[NUI] Fixing the emtpy finalizers(CA1821)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / NUIFrameComponent.cs
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Text;
5 using Tizen.Applications;
6 using Tizen.Applications.ComponentBased.Common;
7 using Tizen.NUI;
8
9 namespace Tizen.NUI
10 {
11     /// <summary>
12     /// The class for showing UI module
13     /// </summary>
14     /// <since_tizen> 6 </since_tizen>
15     [EditorBrowsable(EditorBrowsableState.Never)]
16     public class NUIFrameComponent : FrameComponent
17     {
18         private bool defaultWindowSet = false;
19         internal NUIWindowInfo NUIWindowInfo
20         {
21             get;
22             set;
23         }
24
25         [EditorBrowsable(EditorBrowsableState.Never)]
26         public Window Window
27         {
28             get;
29             set;
30         }
31
32         /// <summary>
33         /// Overrides this method to create window. It will be called before OnCreate method.
34         /// </summary>
35         /// <returns>Window object to use</returns>
36         [EditorBrowsable(EditorBrowsableState.Never)]
37         public override IWindowInfo CreateWindowInfo()
38         {
39             ComponentApplication instance = ComponentApplication.Instance as ComponentApplication;
40             if (instance != null)
41             {
42                 if (!defaultWindowSet)
43                 {
44                     instance.GetWindow().WindowPositionSize = new Rectangle(0, 0, 1, 1);
45                     instance.GetWindow().BackgroundColor = new Color(0, 0, 0, 0);
46                     instance.GetWindow().Hide();
47                     defaultWindowSet = true;
48                 }
49
50                 Window = new Window();
51                 Window.Show();
52             }
53             NUIWindowInfo = new NUIWindowInfo(Window);
54             return NUIWindowInfo;
55         }
56
57         /// <summary>
58         /// Overrides this method to handle behavior when the component is launched.
59         /// </summary>
60         /// <returns>True if a service component is successfully created</returns>
61         [EditorBrowsable(EditorBrowsableState.Never)]
62         public override bool OnCreate()
63         {
64             return true;
65         }
66
67         /// <summary>
68         /// Overrides this method if want to handle behavior when the component receives the appcontrol message.
69         /// </summary>
70         /// <param name="appControl">appcontrol object</param>
71         /// <param name="restarted">True if it was restarted</param>
72         [EditorBrowsable(EditorBrowsableState.Never)]
73         public override void OnStart(AppControl appControl, bool restarted)
74         {
75             base.OnStart(appControl, restarted);
76         }
77
78         /// <summary>
79         /// Overrides this method if you want to handle the behavior when the component is resumed.
80         /// </summary>
81         [EditorBrowsable(EditorBrowsableState.Never)]
82         public override void OnResume()
83         {
84             base.OnResume();
85         }
86
87         /// <summary>
88         /// Overrides this method if you want to handle the behavior when the component is paused.
89         /// </summary>
90         [EditorBrowsable(EditorBrowsableState.Never)]
91         public override void OnPause()
92         {
93             base.OnPause();
94         }
95
96         /// <summary>
97         /// Overrides this method if you want to handle the behavior when the component is stopped.
98         /// </summary>
99         [EditorBrowsable(EditorBrowsableState.Never)]
100         public override void OnStop()
101         {
102             base.OnStop();
103         }
104
105         /// <summary>
106         /// Overrides this method if want to handle behavior when the component is destroyed.
107         /// </summary>
108         [EditorBrowsable(EditorBrowsableState.Never)]
109         public override void OnDestroy()
110         {
111             base.OnDestroy();
112         }
113     }
114 }
115