[Tizen] temporal API to make users use Container class
[platform/core/csapi/nui.git] / NUISamples / NUISamples / NUISamples.Tizen / firstscreen / App.cs
1 using Tizen.NUI;
2 using Tizen.NUI.UIComponents;
3 using Tizen.NUI.BaseComponents;
4 using System;
5 using System.Runtime.InteropServices;
6 using System.Collections.Generic;
7 using Tizen.NUI.Constants;
8
9 namespace FirstScreen
10 {
11     public class FirstScreenApp : NUIApplication
12     {
13         //private Application _application;                  // Reference to Dali Application.
14         private Stage _stage;                              // Reference to Dali stage.
15         private Size2D _stageSize;                        // Reference to Dali stage size.
16
17         private View _topContainer;                        // Top Container added to the Stage will contain Poster ScrollContainers.
18         private View _bottomContainer;                     // Bottom Container added to the Stage will contain Menu ScrollContainer.
19         private int _currentPostersContainerID;            // Current Poster Container ID visible on the Top Container / Stage.
20         private int _totalPostersContainers;               // Number of Poster ScrollContainers to be added on Top Container.
21         private List<ScrollContainer> _postersContainer;   // List collection of Poster ScrollContainers used on the Top Container in this demo application.
22         private ScrollContainer _menuContainer;            // Menu ScrollContainer used on the Bottom Container in this demo application.
23         private Layer _bottomClipLayer;                    // Clip layer (Dali Clip Layer instance) used for Bottom Container.
24         private Layer _topClipLayer;                       // Clip layer (Dali Clip Layer instance) used for Top Container.
25
26         private FocusEffect _focusEffect;                  // FocusEffect is used to apply Focus animation effect on any supplied item/image.
27         private string _imagePath;                         // Contains the physical location of all images used in the demo application.
28
29         private ImageView _keyboardFocusIndicator;         // Reference to the ImageView (Keyboard Focus indicator) applied to the focused item on ScrollContainer.
30         private ImageView _launcherSeparator;              // Reference to the ImageView used for launcher separation (Launcher consists of three image icons on left of Menu ScrollContainer).
31         private ImageView[] launcherIcon;                  // ImageViews used for launcher Icons.
32         private Animation _showBottomContainerAnimation;   // Animation used to show/unhide Bottom Container (Menu ScrollContainer) when it is focused.
33         private Animation _hideBottomContainerAnimation;   // Animation used to hide Bottom Container (Menu ScrollContainer) when it is focused.
34         private Animation _showAnimation;                  // Animation used to move Poster scrollContainer from bottom to top and make it non-transparent.
35         private Animation _hideAnimation;                  // Animation used to make the unused specified Poster scrollContainer transparent.
36         private ScrollContainer _hideScrollContainer;      // The unused Poster scrollContainer which needs to be transparent.
37         FocusManager _keyboardFocusManager;        // Reference to Dali KeyboardFocusManager.
38
39         protected override void OnCreate()
40         {
41             base.OnCreate();
42             OnInitialize();
43         }
44
45
46         // Create Items for Poster ScrollContainer
47         private void CreatePosters()
48         {
49             for (int j = 0; j < _totalPostersContainers; j++)
50             {
51                 View posterContainer = _postersContainer[j].Container;
52                 for (int i = 0; i < Constants.PostersItemsCount; i++)
53                 {
54                     if (j % _totalPostersContainers == 0)
55                     {
56                         View item = new ImageView(_imagePath + "/poster" + j + "/" + (i % 14) + ".jpg");
57                         item.Name = ("poster-item-" + _postersContainer[j].ItemCount);
58                         _postersContainer[j].Add(item);
59                     }
60                     else
61                     {
62                         View item = new ImageView(_imagePath + "/poster" + j + "/" + (i % 6) + ".jpg");
63                         item.Name = ("poster-item-" + _postersContainer[j].ItemCount);
64                         _postersContainer[j].Add(item);
65                     }
66                 }
67
68                 if (j == 0)
69                 {
70                     Show(_postersContainer[j]);
71                 }
72                 else
73                 {
74                     Hide(_postersContainer[j]);
75                 }
76
77                 _postersContainer[j].SetFocused(false);
78             }
79
80             _currentPostersContainerID = 0;
81         }
82
83         // Create Items for Menu ScrollContainer
84         private void CreateMenu()
85         {
86             View menuContainer = _menuContainer.Container;
87             menuContainer.Position = new Position(Constants.LauncherWidth, 0.0f, 0.0f);
88
89             for (int i = 0; i < Constants.MenuItemsCount; i++)
90             {
91                 View menuItem = new ImageView(_imagePath + "/menu/" + i % 7 + ".png");
92                 menuItem.Name = ("menu-item-" + _menuContainer.ItemCount);
93                 _menuContainer.Add(menuItem);
94             }
95         }
96
97         private View OnKeyboardPreFocusChangeSignal(object source, FocusManager.PreFocusChangeEventArgs e)
98         {
99             if (!e.CurrentView && !e.ProposedView)
100             {
101                 return _menuContainer;
102             }
103
104             Actor actor = _menuContainer.Container;
105
106             if (e.Direction == View.FocusDirection.Up)
107             {
108                 // Move the Focus to Poster ScrollContainer and hide Bottom Container (Menu ScrollContainer)
109                 if (_menuContainer.IsFocused)
110                 {
111                     actor = _postersContainer[_currentPostersContainerID].GetCurrentFocusedActor();
112                     _menuContainer.SetFocused(false);
113                     _postersContainer[_currentPostersContainerID].SetFocused(true);
114                     HideBottomContainer();
115
116                     // Also apply Focus animation on Focused item on Poster ScrollContainer
117                     FocusAnimation(_postersContainer[_currentPostersContainerID], FocusEffectDirection.BottomToTop);
118                 }
119             }
120             else if (e.Direction == View.FocusDirection.Down)
121             {
122                 // Show Bottom Container (Menu ScrollContainer) and move the Focus to it
123                 if (!_menuContainer.IsFocused)
124                 {
125                     ShowBottomContainer();
126                     actor = _menuContainer.GetCurrentFocusedActor();
127                     _postersContainer[_currentPostersContainerID].SetFocused(false);
128                     _menuContainer.SetFocused(true);
129
130                     // Also apply Focus animation on Focused item on Menu ScrollContainer
131                     FocusAnimation(_menuContainer, FocusEffectDirection.TopToBottom);
132                 }
133             }
134             else
135             {
136                 actor = e.ProposedView;
137             }
138
139             if (e.Direction == View.FocusDirection.Left)
140             {
141                 if (_menuContainer.IsFocused)
142                 {
143                     int id = _menuContainer.FocusedItemID % _totalPostersContainers;
144                     if (id != _currentPostersContainerID)
145                     {
146                         Hide(_postersContainer[_currentPostersContainerID]);
147                         _currentPostersContainerID = id;
148
149                         Show(_postersContainer[_currentPostersContainerID]);
150                     }
151                 }
152             }
153             else if (e.Direction == View.FocusDirection.Right)
154             {
155                 if (_menuContainer.IsFocused)
156                 {
157                     int id = _menuContainer.FocusedItemID % _totalPostersContainers;
158                     if (id != _currentPostersContainerID)
159                     {
160                         Hide(_postersContainer[_currentPostersContainerID]);
161                         _currentPostersContainerID = id;
162                         Show(_postersContainer[_currentPostersContainerID]);
163                     }
164                 }
165             }
166
167             return (View)actor;
168         }
169
170         // Perform Focus animation Effect on the current Focused Item on ScrollContainer.
171         private void FocusAnimation(ScrollContainer scrollContainer, FocusEffectDirection direction)
172         {
173             _focusEffect.FocusAnimation(scrollContainer.GetCurrentFocusedActor(), scrollContainer.ItemSize, 1000, direction);
174         }
175
176         // Perform Show animation on ScrollContainer (used only for Poster Container)
177         private void Show(ScrollContainer scrollContainer)
178         {
179             scrollContainer.Add(scrollContainer.Container);
180
181             _hideScrollContainer = null;
182
183             // This animation will move Poster scrollContainer from bottom to top and make it non-transparent.
184             _showAnimation = new Animation(350);
185             _showAnimation.AnimateTo(scrollContainer.Container, "ColorAlpha", 1.0f);
186
187             scrollContainer.Container.PositionY = scrollContainer.Container.Position.Y + 200.0f;
188             float targetPositionY = scrollContainer.Container.Position.Y - 200.0f;
189
190             _showAnimation.AnimateTo(scrollContainer.Container, "PositionY", targetPositionY, new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOutSine));
191
192             _showAnimation.Play();
193         }
194
195         // Perform Hide animation on ScrollContainer (used only for Poster Container)
196         private void Hide(ScrollContainer scrollContainer)
197         {
198             if (_hideAnimation)
199             {
200                 _hideAnimation.Clear();
201                 _hideAnimation.Reset();
202             }
203
204             int duration = 350;
205             _hideAnimation = new Animation(duration);
206             _hideAnimation.Duration = duration;
207             _hideAnimation.AnimateTo(scrollContainer.Container, "ColorAlpha", 0.0f, 0, (int)((float)duration * 0.75f), new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOutSine));
208             _hideAnimation.Finished += OnHideAnimationFinished;
209             _hideScrollContainer = scrollContainer;
210             _hideAnimation.Play();
211         }
212
213         // This removes all the items from the specified unused Poster ScrollContainer (hence Stage) to improve performance.
214         private void OnHideAnimationFinished(object source, EventArgs e)
215         {
216             if (_hideScrollContainer)
217             {
218                 _hideScrollContainer.Remove(_hideScrollContainer.Container);
219             }
220         }
221
222         // Hide Bottom Container (Menu ScrollContainer) when it is not focused
223         private void HideBottomContainer()
224         {
225             _topClipLayer.ClippingBox = new Rectangle(0,
226                                                         Convert.ToInt32(_stageSize.Height * Constants.TopContainerPositionFactor),
227                                                         Convert.ToInt32((_stageSize.Width)),
228                                                         Convert.ToInt32((_stageSize.Height * Constants.TopClipLayerExpandHeightFactor)));  // X, Y, Width, Height
229
230
231             _hideBottomContainerAnimation.AnimateTo(_bottomContainer, "Position", new Position(0.0f, _stageSize.Height * Constants.BottomContainerHidePositionFactor, 0.0f),
232                     new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOutSine));
233
234             _hideBottomContainerAnimation.Play();
235         }
236
237         // Show (unhide) Bottom Container (Menu ScrollContainer) when it is focused
238         private void ShowBottomContainer()
239         {
240             _topClipLayer.ClippingBox = new Rectangle(0,
241                                                         Convert.ToInt32(_stageSize.Height * Constants.TopContainerPositionFactor),
242                                                         Convert.ToInt32((_stageSize.Width)),
243                                                         Convert.ToInt32((_stageSize.Height * Constants.TopClipLayerHeightFactor)));  // X, Y, Width, Height
244
245             _showBottomContainerAnimation.AnimateTo(_bottomContainer, "Position", new Position(0.0f, _stageSize.Height * Constants.BottomContainerShowPositionFactor, 0.0f),
246                             new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOutSine));
247             _showBottomContainerAnimation.Play();
248         }
249
250         // First screen demo Application initialisation
251         private void OnInitialize()
252         {
253             Tizen.Log.Debug("NUI", "OnInitialize() is called!");
254             _hideScrollContainer = null;
255             _stage = Stage.Instance;
256             _stageSize = _stage.Size;
257             _totalPostersContainers = Constants.TotalPostersContainers;
258             _imagePath = Constants.ImageResourcePath;
259
260             _postersContainer = new List<ScrollContainer>();
261             _menuContainer = new ScrollContainer();
262
263             _hideBottomContainerAnimation = new Animation(250);
264             _showBottomContainerAnimation = new Animation(250);
265
266             // Create a Top Container for poster items
267             _topContainer = new View();
268             _topContainer.Size = new Size(_stageSize.Width, _stageSize.Height * Constants.TopContainerHeightFactor, 0);
269             _topContainer.Position = new Position(0.0f, _stageSize.Height * Constants.TopContainerPositionFactor, 0.0f);
270             _topContainer.ParentOrigin = ParentOrigin.TopLeft;
271
272             // Add a background to Top container
273             PropertyMap visual = new PropertyMap();
274             visual.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
275             visual.Insert(ImageVisualProperty.URL, new PropertyValue(_imagePath + "/focuseffect/background.png"));
276             _topContainer.Background = visual;
277             _topContainer.Name = "TopControl";
278
279             // Create a Bottom Container
280             _bottomContainer = new View();
281             _bottomContainer.Size = new Size(_stageSize.Width, _stageSize.Height * Constants.BottomContainerHeightFactor, 0);
282             _bottomContainer.Position = new Position(0.0f, _stageSize.Height * Constants.BottomContainerHidePositionFactor, 0.0f);
283             _bottomContainer.ParentOrigin = ParentOrigin.TopLeft;
284
285             // Add a background to Bottom Container
286             visual = new PropertyMap();
287             visual.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
288             visual.Insert(ImageVisualProperty.URL, new PropertyValue(_imagePath + "/focuseffect/background.png"));
289             _bottomContainer.Background = visual;
290             _bottomContainer.Name = "BottomControl";
291
292             // Add both Top and Bottom Containers to Stage
293             _stage.GetDefaultLayer().Add(_topContainer);
294             _stage.GetDefaultLayer().Add(_bottomContainer);
295
296             // Add a clip layer to Top Container
297             _topClipLayer = new Layer();
298             _topClipLayer.ParentOrigin = ParentOrigin.BottomCenter;
299             _topClipLayer.ClippingEnable = true;
300             _topClipLayer.ClippingBox = new Rectangle(0,
301                                                         Convert.ToInt32(_stageSize.Height * Constants.TopContainerPositionFactor),
302                                                         Convert.ToInt32((_stageSize.Width)),
303                                                         Convert.ToInt32((_stageSize.Height * Constants.TopClipLayerHeightFactor)));  // X, Y, Width, Height
304             _topContainer.Add(_topClipLayer);
305
306             // Create a SpotLight for items / images of both Poster and Menu ScrollContainers
307             ImageView spotLight = new ImageView(_imagePath + "/focuseffect/highlight_spot.png");
308             spotLight.WidthResizePolicy = ResizePolicyType.UseNaturalSize;
309             spotLight.HeightResizePolicy = ResizePolicyType.UseNaturalSize;
310             spotLight.ParentOrigin = ParentOrigin.Center;
311             spotLight.PivotPoint = PivotPoint.Center;
312             spotLight.PositionUsesPivotPoint = true;
313             spotLight.Name = "spotLight";
314
315             // Create a shadowBorder for items / images of Poster ScrollContainers
316             ImageView shadowBorder = new ImageView(_imagePath + "/focuseffect/thumbnail_shadow.9.png");
317             shadowBorder.ParentOrigin = ParentOrigin.Center;
318             shadowBorder.PivotPoint = PivotPoint.Center;
319             shadowBorder.PositionUsesPivotPoint = true;
320             shadowBorder.WidthResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent;
321             shadowBorder.HeightResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent;
322             shadowBorder.SizeModeFactor = (new Vector3(32.0f, 41.0f, 0.0f));
323             shadowBorder.Name = "poster shadowBorder";
324
325             // Create Poster Containers and add them to Top Clip layer
326             for (int i = 0; i < _totalPostersContainers; i++)
327             {
328                 _postersContainer.Add(new ScrollContainer());
329                 _postersContainer[i].Container.Name = "poster" + i;
330                 if (i == 0)
331                 {
332                     _postersContainer[i].ItemSize = new Size((_stageSize.Width * Constants.Poster0ItemWidthFactor) - Constants.PostersContainerPadding,
333                                                                 _stageSize.Height * Constants.PostersItemHeightFactor, 0.0f);
334                 }
335                 else
336                 {
337                     _postersContainer[i].ItemSize = new Size((_stageSize.Width * Constants.Poster1ItemWidthFactor) - Constants.PostersContainerPadding,
338                                                                 _stageSize.Height * Constants.PostersItemHeightFactor, 0.0f);
339                 }
340
341                 _postersContainer[i].Gap = Constants.PostersContainerPadding;
342                 _postersContainer[i].MarginX = Constants.PostersContainerMargin;
343                 _postersContainer[i].OffsetYFator = Constants.PostersContainerOffsetYFactor;
344                 _postersContainer[i].Width = _stageSize.Width;
345                 _postersContainer[i].Height = _stageSize.Height * Constants.PostersContainerHeightFactor;
346                 _postersContainer[i].ShadowBorder = shadowBorder;
347                 _postersContainer[i].ShadowBorder.Position = new Position(0.0f, 4.0f, 0.0f);
348                 _postersContainer[i].SpotLight = spotLight;
349                 _topClipLayer.Add(_postersContainer[i]);
350             }
351
352             // Add a clip layer to Bottom Container
353             _bottomClipLayer = new Layer();
354             _bottomClipLayer.PivotPoint = PivotPoint.BottomCenter;
355             _bottomClipLayer.PositionUsesPivotPoint = true;
356             _bottomClipLayer.ParentOrigin = ParentOrigin.BottomCenter;
357             _bottomClipLayer.ClippingEnable = true;
358             _bottomClipLayer.ClippingBox = new Rectangle(Convert.ToInt32(Constants.LauncherWidth),
359                                                            Convert.ToInt32(_stageSize.Height * Constants.BottomContainerShowPositionFactor),
360                                                            Convert.ToInt32((_stageSize.Width)),
361                                                            Convert.ToInt32((_stageSize.Height - (_stageSize.Height * Constants.BottomClipLayerHeightFactor))));  // X, Y, Width, Height
362             _bottomContainer.Add(_bottomClipLayer);
363
364             // Add Launcher items to Bottom Container. Launcher is used to display three images on left of Menu ScrollContainer
365             launcherIcon = new ImageView[Convert.ToInt32(Constants.LauncherItemsCount)];
366             for (int launcherIndex = 0; launcherIndex < Constants.LauncherItemsCount; launcherIndex++)
367             {
368                 launcherIcon[launcherIndex] = new ImageView(_imagePath + "/focuseffect/" + launcherIndex + "-normal.png");
369                 launcherIcon[launcherIndex].Name = "launcherIcon" + launcherIndex;
370                 launcherIcon[launcherIndex].WidthResizePolicy = ResizePolicyType.UseNaturalSize;
371                 launcherIcon[launcherIndex].HeightResizePolicy = ResizePolicyType.UseNaturalSize;
372                 launcherIcon[launcherIndex].ParentOrigin = ParentOrigin.CenterLeft;
373                 launcherIcon[launcherIndex].PivotPoint = PivotPoint.CenterLeft;
374                 launcherIcon[launcherIndex].PositionUsesPivotPoint = true;
375                 launcherIcon[launcherIndex].Position = new Position(Constants.LauncherIconWidth * launcherIndex + Constants.LauncherLeftMargin, 0.0f, 0.0f);
376                 _bottomContainer.Add(launcherIcon[launcherIndex]);
377             }
378
379             // Add a shadow seperator image between last Launcher icon and Menu ScrollContainer
380             _launcherSeparator = new ImageView(_imagePath + "/focuseffect/focus_launcher_shadow_n.png");
381             _launcherSeparator.Name = "launcherSeparator";
382             _launcherSeparator.WidthResizePolicy = ResizePolicyType.UseNaturalSize;
383             _launcherSeparator.HeightResizePolicy = ResizePolicyType.FillToParent;
384             _launcherSeparator.ParentOrigin = ParentOrigin.CenterLeft;
385             _launcherSeparator.PivotPoint = PivotPoint.CenterLeft;
386             _launcherSeparator.PositionUsesPivotPoint = true;
387             _launcherSeparator.Position = new Position(Constants.LauncherIconWidth * Constants.LauncherItemsCount + Constants.LauncherLeftMargin, 0.0f, 0.0f);
388             _bottomContainer.Add(_launcherSeparator);
389
390             // Create Menu Container and add it to Bottom Clip Layer
391             Size menuItemSize = new Size((_stageSize.Width * Constants.MenuItemWidthFactor) - Constants.MenuContainerPadding,
392                                         _stageSize.Height * Constants.MenuItemHeightFactor, 0.0f);
393             _menuContainer.Container.Name = "menu";
394             _menuContainer.ItemSize = menuItemSize;
395             _menuContainer.Gap = Constants.MenuContainerPadding;
396             _menuContainer.MarginX = Constants.MenuContainerMargin;
397             _menuContainer.OffsetYFator = Constants.MenuContainerOffsetYFactor;
398             _menuContainer.OffsetX = Constants.LauncherWidth;
399             _menuContainer.Width = _stageSize.Width - Constants.LauncherWidth;
400             _menuContainer.Height = _stageSize.Height * Constants.MenuContainerHeightFactor;
401             _menuContainer.ShadowBorder = new ImageView(_imagePath + "/focuseffect/focus_launcher_shadow.9.png");
402             _menuContainer.ShadowBorder.Name = "_menuContainer.ShadowBorder";
403             _menuContainer.ShadowBorder.Size = new Size(_menuContainer.ItemSize.Width + 40.0f, _menuContainer.ItemSize.Height + 50.0f, 0.0f);
404             _menuContainer.ShadowBorder.Position = new Position(0.0f, 5.0f, 0.0f);
405             _menuContainer.ShadowBorder.ParentOrigin = ParentOrigin.Center;
406             _menuContainer.ShadowBorder.PivotPoint = PivotPoint.Center;
407             _menuContainer.ShadowBorder.PositionUsesPivotPoint = true;
408             _menuContainer.SpotLight = spotLight;
409             _bottomClipLayer.Add(_menuContainer);
410
411             CreatePosters(); // Create Items for Poster ScrollContainer
412             CreateMenu();    // Create Items for Menu ScrollContainer
413
414             // Initialize PreFocusChange event of KeyboardFocusManager
415             _keyboardFocusManager = FocusManager.Instance;
416             _keyboardFocusManager.PreFocusChange += OnKeyboardPreFocusChangeSignal;
417
418             _keyboardFocusIndicator = new ImageView(_imagePath + "/focuseffect/highlight_stroke.9.png");
419             _keyboardFocusIndicator.ParentOrigin = ParentOrigin.Center;
420             _keyboardFocusIndicator.PivotPoint = PivotPoint.Center;
421             _keyboardFocusIndicator.PositionUsesPivotPoint = true;
422             _keyboardFocusIndicator.WidthResizePolicy = ResizePolicyType.FillToParent;
423             _keyboardFocusIndicator.HeightResizePolicy = ResizePolicyType.FillToParent;
424
425             _keyboardFocusManager.FocusIndicator = (_keyboardFocusIndicator);
426
427             _keyboardFocusManager.SetAsFocusGroup(_menuContainer, true);
428             _keyboardFocusManager.SetAsFocusGroup(_postersContainer[0], true);
429             _keyboardFocusManager.SetAsFocusGroup(_postersContainer[1], true);
430             _keyboardFocusManager.FocusGroupLoop = (true);
431
432             _focusEffect = new FocusEffect();
433
434             // Move Fcous to Bottom Container (Menu ScrollContainer)
435             ShowBottomContainer();
436             _menuContainer.SetFocused(true);
437
438 #if true
439             //test.
440             TextLabel _dateOfTest = new TextLabel();
441             _dateOfTest.WidthResizePolicy = ResizePolicyType.FillToParent;
442             _dateOfTest.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
443             _dateOfTest.PivotPoint = PivotPoint.TopCenter;
444             _dateOfTest.PositionUsesPivotPoint = true;
445             _dateOfTest.ParentOrigin = ParentOrigin.TopCenter;
446             _dateOfTest.SizeModeFactor = new Vector3(0.0f, 0.1f, 0.0f);
447             _dateOfTest.BackgroundColor = new Color(43.0f / 255.0f, 145.0f / 255.0f, 175.0f / 255.0f, 1.0f);
448             _dateOfTest.TextColor = Color.White;
449             _dateOfTest.Text = "  Common Interface Define Verification Test of 2017-02-10 #1";
450             _dateOfTest.HorizontalAlignment = HorizontalAlignment.Begin;
451             _dateOfTest.VerticalAlignment = VerticalAlignment.Center;
452             _dateOfTest.PointSize = 12.0f;
453             _dateOfTest.UnderlineEnabled = true;
454             _stage.GetDefaultLayer().Add(_dateOfTest);
455             Tizen.Log.Debug("NUI", "### 1) ColorMode = " + _dateOfTest.ColorMode);
456             _dateOfTest.ColorMode = ColorMode.UseParentColor;
457             Tizen.Log.Debug("NUI", "### 2) ColorMode = " + _dateOfTest.ColorMode);
458             _dateOfTest.ColorMode = ColorMode.UseOwnMultiplyParentColor;
459             Tizen.Log.Debug("NUI", "### 3) ColorMode = " + _dateOfTest.ColorMode);
460             Tizen.Log.Debug("NUI", "### 1) DrawModeType = " + _dateOfTest.DrawMode);
461             _dateOfTest.DrawMode = DrawModeType.Overlay2D;
462             Tizen.Log.Debug("NUI", "### 2) DrawModeType = " + _dateOfTest.DrawMode);
463
464 #endif
465
466         }
467         
468         [STAThread]
469         static void _Main(string[] args)
470         {
471             Tizen.Log.Debug("NUI", "Main() is called! ");
472             
473             FirstScreenApp app = new FirstScreenApp();
474             app.Run(args);
475         }
476
477     }
478 }