Implement Welcome step
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Wed, 11 Mar 2020 12:14:30 +0000 (13:14 +0100)
committerLukasz Stanislawski/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics <l.stanislaws@samsung.com>
Wed, 18 Mar 2020 08:00:42 +0000 (09:00 +0100)
Oobe/Oobe.Welcome/OobeWelcome.csproj [moved from Oobe/OobeWelcome/OobeWelcome.csproj with 78% similarity]
Oobe/Oobe.Welcome/WelcomeStep.cs [new file with mode: 0644]
Oobe/Oobe/Managers/ProcessManager.cs
Oobe/Oobe/Oobe.csproj
Oobe/OobeWelcome/Class1.cs [deleted file]

similarity index 78%
rename from Oobe/OobeWelcome/OobeWelcome.csproj
rename to Oobe/Oobe.Welcome/OobeWelcome.csproj
index 455b3a0..7a34d9a 100644 (file)
@@ -11,4 +11,7 @@
       <ExcludeAssets>Runtime</ExcludeAssets>\r
     </PackageReference>\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="..\OobeCommon\OobeCommon.csproj" />\r
+  </ItemGroup>\r
 </Project>\r
diff --git a/Oobe/Oobe.Welcome/WelcomeStep.cs b/Oobe/Oobe.Welcome/WelcomeStep.cs
new file mode 100644 (file)
index 0000000..0c65764
--- /dev/null
@@ -0,0 +1,48 @@
+using Oobe.Common.Interfaces;\r
+using Oobe.Common.Styles;\r
+using Tizen.NUI;\r
+using Tizen.NUI.BaseComponents;\r
+using Tizen.NUI.Components;\r
+\r
+namespace Oobe.Welcome\r
+{\r
+    public class WelcomeStep : ProcessStep\r
+    {\r
+        public override View CreateView(IProcessNavigation nav)\r
+        {\r
+            View container = new View();\r
+\r
+            TextLabel title = new TextLabel("Welcome to Tizen IoT!");\r
+            title.Position2D = new Position2D(163, 160);\r
+            title.Size2D = new Size2D(857, 63);\r
+            title.TextColor = new Color(0, 20.0f/255.0f, 71.0f/255.0f, 1.0f);\r
+            title.PointSize = 48.0f;\r
+            title.HorizontalAlignment = HorizontalAlignment.Center;\r
+            title.FontFamily = "BreezeSans";\r
+            title.FontStyle = FontsStyles.Light();\r
+\r
+            TextLabel content = new TextLabel();\r
+            content.Position2D = new Position2D(81, 247);\r
+            content.Size2D = new Size2D(1022, 166);\r
+            content.TextColor = new Color(0, 12.0f/255.0f, 43.0f/255.0f, 1.0f);\r
+            content.PointSize = 22.0f;\r
+            content.HorizontalAlignment = HorizontalAlignment.Center;\r
+            content.FontFamily = "BreezeSansLight";\r
+            content.MultiLine = true;\r
+            content.Text = "There should be some description or information about Tizen IoT. There should be some description or information about Tizen IoT. There should be some description or information about Tizen IoT. There should be some description or information about Tizen IoT. There should be some description or information about Tizen IoT. There should be some description or information about Tizen IoT. There should be some description or information about Tizen IoT. There should be some description or information about Tizen IoT.";\r
+\r
+            Button next = new Button(ButtonStyles.Next);\r
+            next.Position2D = new Position2D(472, 512);\r
+            next.Text = "GET STARTED";\r
+            next.ClickEvent += (obj, args) => {\r
+                nav.Next();\r
+            };\r
+\r
+            container.Add(title);\r
+            container.Add(next);\r
+            container.Add(content);\r
+\r
+            return container;\r
+        }\r
+    }\r
+}\r
index e05a25a..1f3526d 100644 (file)
@@ -2,6 +2,7 @@ using System.Collections.Generic;
 using Oobe.Common.Interfaces;
 using Oobe.Language;
 using Oobe.Views;
+using Oobe.Welcome;
 using Tizen.NUI;
 using Oobe.Region;
 using System;
@@ -20,7 +21,8 @@ namespace Oobe
             //TODO consider loading this from xaml, xml or something...
             steps = new LinkedList<Lazy<ProcessStep>>(new []{
                 new Lazy<ProcessStep>(() => new LanguageStep()),
-                new Lazy<ProcessStep>(() => new RegionStep())}
+                new Lazy<ProcessStep>(() => new RegionStep()),
+                new Lazy<ProcessStep>(() => new WelcomeStep())}
             );
             //only for review
             steps.AddFirst(new Lazy<ProcessStep>(() => new WifiStep()));
index 5617d4b..f656a6c 100644 (file)
@@ -30,7 +30,7 @@
     <ProjectReference Include="..\OobeLanguage\OobeLanguage.csproj" />
     <ProjectReference Include="..\OobeRegion\OobeRegion.csproj" />
     <ProjectReference Include="..\OobeTerms\OobeTerms.csproj" />
-    <ProjectReference Include="..\OobeWelcome\OobeWelcome.csproj" />
+    <ProjectReference Include="..\Oobe.Welcome\OobeWelcome.csproj" />
     <ProjectReference Include="..\OobeWifi\OobeWifi.csproj" />
   </ItemGroup>
 
diff --git a/Oobe/OobeWelcome/Class1.cs b/Oobe/OobeWelcome/Class1.cs
deleted file mode 100644 (file)
index 362ac96..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-using System;\r
-\r
-namespace Oobe.Welcome\r
-{\r
-    public class Class1\r
-    {\r
-    }\r
-}\r