new LayoutLength(0),
new LayoutLength(totalWidth),
new LayoutLength(totalHeight));
- } else
+ }
+ else
{
childLayout.Layout(
- new LayoutLength(- stack.PagesLeftPadding),
+ new LayoutLength(-stack.PagesLeftPadding),
new LayoutLength(0),
new LayoutLength(totalWidth - stack.PagesLeftPadding),
new LayoutLength(totalHeight));
public ViewStack() : base()
{
ClippingMode = ClippingModeType.ClipToBoundingBox;
- Layout = new ViewStackBaseCustomLayout();
+ //Layout = new ViewStackBaseCustomLayout();
pageEnterAnimation = new Animation();
pageLeaveAnimation = new Animation();
pageEnterAnimation.Finished += OnPageEntered;
using Tizen.NUI;
using Oobe.Region;
using System;
-
- namespace Oobe
+using Oobe.Wifi;
+
+namespace Oobe
{
public class ProcessManager : IProcessNavigation
{
public ProcessManager()
{
//TODO consider loading this from xaml, xml or something...
- steps = new LinkedList<Lazy<ProcessStep>>(new List<Lazy<ProcessStep>>{
+ steps = new LinkedList<Lazy<ProcessStep>>(new []{
new Lazy<ProcessStep>(() => new LanguageStep()),
new Lazy<ProcessStep>(() => new RegionStep())}
);
+ //only for review
+ steps.AddFirst(new Lazy<ProcessStep>(() => new WifiStep()));
}
public void Start()
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Tizen.NET" Version="8.0.0.15106">
+ <PackageReference Include="Tizen.NET" Version="8.0.0.15114">
<ExcludeAssets>Runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Tizen.NET.Sdk" Version="1.0.9" />
-<Project Sdk="Microsoft.NET.Sdk">\r
+<Project Sdk="Microsoft.NET.Sdk">\r
\r
<PropertyGroup>\r
<OutputType>Library</OutputType>\r
</PropertyGroup>\r
\r
<ItemGroup>\r
- <PackageReference Include="Tizen.NET" Version="8.0.0.15106">\r
- <ExcludeAssets>Runtime</ExcludeAssets>\r
- </PackageReference>\r
+ <PackageReference Include="Tizen.NET" Version="8.0.0.15114" />\r
+ <PackageReference Include="Tizen.NET.Sdk" Version="1.0.9" />\r
</ItemGroup>\r
</Project>\r
-<Project Sdk="Microsoft.NET.Sdk">\r
+<Project Sdk="Microsoft.NET.Sdk">\r
\r
<PropertyGroup>\r
<OutputType>Library</OutputType>\r
</PropertyGroup>\r
\r
<ItemGroup>\r
- <PackageReference Include="Tizen.NET" Version="8.0.0.15106">\r
- <ExcludeAssets>Runtime</ExcludeAssets>\r
- </PackageReference>\r
+ <PackageReference Include="Tizen.NET" Version="8.0.0.15114" />\r
+ <PackageReference Include="Tizen.NET.Sdk" Version="1.0.9" />\r
</ItemGroup>\r
\r
<ItemGroup>\r
-<Project Sdk="Microsoft.NET.Sdk">\r
+<Project Sdk="Microsoft.NET.Sdk">\r
\r
<PropertyGroup>\r
<OutputType>Library</OutputType>\r
</PropertyGroup>\r
\r
<ItemGroup>\r
- <PackageReference Include="Tizen.NET" Version="8.0.0.15106">\r
- <ExcludeAssets>Runtime</ExcludeAssets>\r
- </PackageReference>\r
+ <PackageReference Include="Tizen.NET" Version="8.0.0.15114" />\r
+ <PackageReference Include="Tizen.NET.Sdk" Version="1.0.9" />\r
</ItemGroup>\r
<ItemGroup>\r
<ProjectReference Include="..\OobeCommon\OobeCommon.csproj" />\r
using System;\r
\r
-namespace OobeTerms\r
+namespace Oobe.Terms\r
{\r
public class Class1\r
{\r
-<Project Sdk="Microsoft.NET.Sdk">\r
+<Project Sdk="Microsoft.NET.Sdk">\r
\r
<PropertyGroup>\r
<OutputType>Library</OutputType>\r
</PropertyGroup>\r
\r
<ItemGroup>\r
- <PackageReference Include="Tizen.NET" Version="8.0.0.15106">\r
- <ExcludeAssets>Runtime</ExcludeAssets>\r
- </PackageReference>\r
+ <PackageReference Include="Tizen.NET" Version="8.0.0.15114" />\r
+ <PackageReference Include="Tizen.NET.Sdk" Version="1.0.9" />\r
</ItemGroup>\r
</Project>\r
using System;\r
\r
-namespace OobeWelcome\r
+namespace Oobe.Welcome\r
{\r
public class Class1\r
{\r
-<Project Sdk="Microsoft.NET.Sdk">\r
+<Project Sdk="Microsoft.NET.Sdk">\r
\r
<PropertyGroup>\r
<OutputType>Library</OutputType>\r
</PropertyGroup>\r
\r
<ItemGroup>\r
- <PackageReference Include="Tizen.NET" Version="8.0.0.15106">\r
- <ExcludeAssets>Runtime</ExcludeAssets>\r
- </PackageReference>\r
+ <PackageReference Include="Tizen.NET" Version="8.0.0.15114" />\r
+ <PackageReference Include="Tizen.NET.Sdk" Version="1.0.9" />\r
</ItemGroup>\r
</Project>\r
+++ /dev/null
-using System;\r
-\r
-namespace OobeWifi\r
-{\r
- public class Class1\r
- {\r
- }\r
-}\r
--- /dev/null
+using System.Collections.Generic;
+using System.Linq;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Oobe.Wifi.Controls
+{
+ public class ListView : ScrollableBase
+ {
+ private List<View> items;
+
+ private View LayoutView
+ {
+ get
+ {
+ if (this.Children.Any() == false)
+ {
+ this.Add(new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ BackgroundColor = new Color(0.7f, 0.7f, 0.7f, 1f),
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ });
+ }
+ return this.Children.First();
+ }
+ }
+
+ public ListView()
+ {
+ this.ScrollingDirection = ScrollableBase.Direction.Vertical;
+ }
+
+ public IEnumerable<View> Items
+ {
+ get
+ {
+ return items;
+ }
+ set
+ {
+ if (value != items)
+ {
+ Clear();
+ items = value.ToList();
+ AttachItems(items);
+ }
+ }
+ }
+
+ private void Clear()
+ {
+ foreach (var child in LayoutView.Children.ToList())
+ {
+ LayoutView.Remove(child);
+ }
+ }
+
+ private void AttachItems(IEnumerable<View> items)
+ {
+ foreach (var item in items)
+ {
+ LayoutView.Add(item);
+ }
+ }
+ }
+}
--- /dev/null
+using System.Collections.Generic;
+using System.Linq;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace Oobe.Wifi.Controls
+{
+ public class WifiView
+ {
+ private View view = null;
+
+ private static View CreateViewAbsolute(string s)
+ {
+ View mainView = new View()
+ {
+ BackgroundColor = Color.Green,
+ Layout = new AbsoluteLayout(),
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ };
+ TextLabel text = new TextLabel(s);
+ text.WidthResizePolicy = ResizePolicyType.UseNaturalSize;
+ text.HorizontalAlignment = HorizontalAlignment.Begin;
+ text.VerticalAlignment = VerticalAlignment.Center;
+ text.TextColor = new Color(0.4f, 1 / (float)((s.GetHashCode() % 10) + 1), 1 / (float)((s.GetHashCode() % 20) + 1), 1);
+ text.PointSize = 88.0f;
+ text.BackgroundColor = Color.Yellow;
+ text.PivotPoint = new Position(0.0f, 0.5f);
+ text.PositionUsesPivotPoint = true;
+ text.ParentOrigin = new Position(0.0f, 0.5f);
+
+ mainView.Add(text);
+ return mainView;
+ }
+
+ public static IEnumerable<View> CreateViews()
+ {
+ foreach (var item in Enumerable.Range(1, 100))
+ {
+ yield return CreateViewAbsolute($"{item}");
+ }
+ }
+
+ public View View
+ {
+ get
+ {
+ if( view == null )
+ {
+ view = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ };
+ view.Add(CreateText("Header"));
+ view.Add(new ListView()
+ {
+ Items = CreateViews(),
+ Size = new Size(360, 360),
+ });
+ }
+ return view;
+ }
+ }
+
+ private static TextLabel CreateText(string text)
+ {
+ TextLabel text2 = new TextLabel(text);
+ text2.BackgroundColor = Color.Green;
+ text2.TextColor = Color.Black;
+ text2.PointSize = 51.0f;
+ return text2;
+ }
+ }
+}
-<Project Sdk="Microsoft.NET.Sdk">\r
+<Project Sdk="Microsoft.NET.Sdk">\r
\r
<PropertyGroup>\r
<OutputType>Library</OutputType>\r
</PropertyGroup>\r
\r
<ItemGroup>\r
- <PackageReference Include="Tizen.NET" Version="8.0.0.15106">\r
- <ExcludeAssets>Runtime</ExcludeAssets>\r
- </PackageReference>\r
+ <PackageReference Include="Tizen.NET" Version="8.0.0.15114" />\r
+ <PackageReference Include="Tizen.NET.Sdk" Version="1.0.9" />\r
+ </ItemGroup>\r
+\r
+ <ItemGroup>\r
+ <ProjectReference Include="..\OobeCommon\OobeCommon.csproj" />\r
</ItemGroup>\r
</Project>\r
--- /dev/null
+using Oobe.Common.Interfaces;
+using Oobe.Wifi.Controls;
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Oobe.Wifi
+{
+ public class WifiStep : ProcessStep
+ {
+ public override View CreateView(IProcessNavigation nav)
+ {
+ var view = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Horizontal,
+ },
+ };
+ view.Add(CreateText("left"));
+ view.Add(new WifiView().View);
+ view.Add(CreateText("right"));
+ return view;
+ }
+
+ private static TextLabel CreateText(string text)
+ {
+ TextLabel text2 = new TextLabel(text);
+ text2.BackgroundColor = Color.Green;
+ text2.TextColor = Color.Black;
+ text2.PointSize = 51.0f;
+ return text2;
+ }
+ }
+}