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 [new file with mode: 0644]
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]
Oobe/OobeWelcome/OobeWelcome.csproj [deleted file]

diff --git a/Oobe/Oobe.Welcome/OobeWelcome.csproj b/Oobe/Oobe.Welcome/OobeWelcome.csproj
new file mode 100644 (file)
index 0000000..7a34d9a
--- /dev/null
@@ -0,0 +1,17 @@
+<Project Sdk="Microsoft.NET.Sdk">\r
+\r
+  <PropertyGroup>\r
+    <OutputType>Library</OutputType>\r
+    <TargetFramework>tizen80</TargetFramework>\r
+    <TargetFrameworkIndentifier>Tizen</TargetFrameworkIndentifier>\r
+  </PropertyGroup>\r
+\r
+  <ItemGroup>\r
+    <PackageReference Include="Tizen.NET" Version="8.0.0.15135">\r
+      <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 e05a25a4bc72d8762ad45e6d6579e6312f7118b3..1f3526d3cda8d75e7d1bbed87f28ea241b2939af 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 5617d4bdf4713f460c330e473beb26e77c8afc29..f656a6c79c4cd14510f61e2dca92aa74b940b11c 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
diff --git a/Oobe/OobeWelcome/OobeWelcome.csproj b/Oobe/OobeWelcome/OobeWelcome.csproj
deleted file mode 100644 (file)
index 455b3a0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">\r
-\r
-  <PropertyGroup>\r
-    <OutputType>Library</OutputType>\r
-    <TargetFramework>tizen80</TargetFramework>\r
-    <TargetFrameworkIndentifier>Tizen</TargetFrameworkIndentifier>\r
-  </PropertyGroup>\r
-\r
-  <ItemGroup>\r
-    <PackageReference Include="Tizen.NET" Version="8.0.0.15135">\r
-      <ExcludeAssets>Runtime</ExcludeAssets>\r
-    </PackageReference>\r
-  </ItemGroup>\r
-</Project>\r