ViewRegistryHelper class is moved to Application side 45/127845/2
authordongsug.song <dongsug.song@samsung.com>
Tue, 2 May 2017 03:49:35 +0000 (12:49 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Tue, 2 May 2017 08:41:43 +0000 (17:41 +0900)
- ViewRegistryHelper class is only required for the application which uses Dali json theme/style Builder
- ViewRegistryHelper uses C# System.Runtime library and this causes some delay at launching time (ex: KantM board, 300ms delay)
- This is not needed for all application (no need to included in NUI) so it is moved to application side.

Conflicts:
NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs

Change-Id: I5ee38801a1f81991f9d6e76a0cbaa6b59d4a3d4f
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
NUISamples/NUISamples/NUISamples.TizenTV/NUISamples.TizenTV.csproj
NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/date-picker-using-json/ViewRegistryHelper.cs [moved from Tizen.NUI/src/internal/ViewRegistryHelper.cs with 66% similarity]
NUISamples/NUISamples/NUISamples.TizenTV/examples/date-picker-using-json/date-picker-using-json.cs [moved from NUISamples/NUISamples/NUISamples.TizenTV/examples/date-picker-using-json.cs with 97% similarity]
Tizen.NUI/Tizen.NUI.csproj
Tizen.NUI/src/internal/Application.cs

index 7526a1e..e122bf7 100755 (executable)
@@ -58,7 +58,7 @@
     <Compile Include="examples\control-dashboard.cs" />\r
     <Compile Include="examples\custom-control.cs" />\r
     <Compile Include="examples\dali-test.cs" />\r
-    <Compile Include="examples\date-picker-using-json.cs" />\r
+    <Compile Include="examples\date-picker-using-json\date-picker-using-json.cs" />\r
     <Compile Include="examples\date-picker.cs" />\r
     <Compile Include="examples\flex-container.cs" />\r
     <Compile Include="examples\gc-test.cs" />\r
@@ -72,6 +72,7 @@
     <Compile Include="examples\test1.cs" />\r
     <Compile Include="examples\user-alphafunction.cs" />\r
     <Compile Include="examples\view-navi-property.cs" />\r
+    <Compile Include="examples\date-picker-using-json\ViewRegistryHelper.cs" />\r
     <Compile Include="examples\visual-animation-test.cs" />\r
     <Compile Include="examples\visual-animation-test2.cs" />\r
     <Compile Include="examples\visual-view-test2.cs" />\r
index f7992b7..3a0c2f0 100755 (executable)
@@ -15,8 +15,8 @@ namespace NUISamples.TizenTV.examples
         static void Main(string[] args)
         {
             //new ControlDashboard.Example().Run(args);                 //o
-            new DatePickerTest.Example().Run(args);                   //o
-            //new DatePickerUsingJson.Example().Run(args);              //o
+            //new DatePickerTest.Example().Run(args);                   //o
+            new DatePickerUsingJson.Example().Run(args);              //o
             //new HelloTest.Example().Run(args);                        //o
             //new HelloWorldTest.Example().Run(args);                   //o
             //new Test1.Example().Run(args);                            //o
@@ -29,7 +29,7 @@ namespace NUISamples.TizenTV.examples
             //new DaliTest.Example().Run(args);                         //o
             //new RelativeVectorTest.Example().Run(args);
             //new VisaulAnimationExample.Example().Run(args);
-            new VisaulAnimationExample.Example2().Run(args);
+            //new VisaulAnimationExample.Example2().Run(args);
             //new VisualViewTest.Example().Run(args);                   //o
             //new VisualViewTest2.VisualSample().Run(args);
             //new VisualViewTest3.Example().Run(args);                   //o
@@ -1,14 +1,15 @@
 using System;
+using Tizen.NUI;
 
-// include all custom views here which will be
-namespace Tizen.NUI
+
+namespace DatePickerUsingJson
 {
   public class ViewRegistryHelper
   {
     static public void Initialize()
     {
        // Register all views with the type registry
-       System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (typeof(Tizen.NUI.Spin).TypeHandle);
+       System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (typeof(Spin).TypeHandle);
     }
   }
 }
@@ -46,8 +46,10 @@ namespace DatePickerUsingJson
             Stage stage = Stage.Instance;
             stage.BackgroundColor = Color.White;
 
-            // load date JSON template...
+            //This is required for the Application which uses JSON theme and style of Dali builder
+            ViewRegistryHelper.Initialize();
 
+            // load date JSON template...
             _builder = new Builder ();
 
             // Optional constant to see logging information coming out
index 9d88869..07bed33 100755 (executable)
     <Compile Include="src\internal\ViewImpl.cs" />\r
     <Compile Include="src\internal\ViewMode.cs" />\r
     <Compile Include="src\internal\ViewRegistry.cs" />\r
-    <Compile Include="src\internal\ViewRegistryHelper.cs" />\r
     <Compile Include="src\internal\ViewWrapper.cs" />\r
     <Compile Include="src\internal\ViewWrapperImpl.cs" />\r
     <Compile Include="src\internal\VisualTransformPolicyType.cs" />\r
index 89de23b..5188882 100755 (executable)
@@ -1104,7 +1104,7 @@ namespace Tizen.NUI
             LOG(" NewApplication(string stylesheet, Application.WindowMode windowMode) is called! ");
 
             // register all Views with the type registry, so that can be created / styled via JSON
-            ViewRegistryHelper.Initialize();
+            //ViewRegistryHelper.Initialize(); //moved to Application side.
 
             Application ret = New(1, stylesheet, windowMode);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();