Apply all xaml sp changes.
authorYurii Zinchuk/Tizen Services & IoT (PLT) /SRPOL/Engineer/Samsung Electronics <y.zinchuk@samsung.com>
Thu, 19 May 2022 07:51:50 +0000 (09:51 +0200)
committerPiotr Czaja <p.czaja@samsung.com>
Wed, 1 Jun 2022 12:05:53 +0000 (14:05 +0200)
91 files changed:
Oobe/Oobe.Common/Controls/CarouselPicker.cs
Oobe/Oobe.Common/Controls/CustomButton.cs [new file with mode: 0644]
Oobe/Oobe.Common/Controls/ListView.cs [new file with mode: 0644]
Oobe/Oobe.Common/Controls/ListViewCell.cs [moved from Oobe/Oobe.Wifi/Controls/Wifi/ApView.cs with 54% similarity]
Oobe/Oobe.Common/Controls/PasswordEntry.cs [moved from Oobe/Oobe.Wifi/Controls/Wifi/PasswordEntry.cs with 90% similarity]
Oobe/Oobe.Common/Controls/SecurityTypeView.cs [moved from Oobe/Oobe.Wifi/Controls/Wifi/SecurityTypeView.cs with 52% similarity]
Oobe/Oobe.Common/Controls/SequenceFlexLayout.cs [moved from Oobe/Oobe.Wifi/Controls/SequenceLinearLayout.cs with 68% similarity]
Oobe/Oobe.Common/Interfaces/ProcessStep.cs
Oobe/Oobe.Common/Oobe.Common.csproj
Oobe/Oobe.Common/Pages/BasePage.cs [deleted file]
Oobe/Oobe.Common/Pages/OneButtonPage.cs [deleted file]
Oobe/Oobe.Common/Pages/TwoButtonsPage.cs [deleted file]
Oobe/Oobe.Common/Resources/Wifi/Translations.Designer.cs [new file with mode: 0644]
Oobe/Oobe.Common/Resources/Wifi/Translations.ko-KR.resx [new file with mode: 0644]
Oobe/Oobe.Common/Resources/Wifi/Translations.pl-PL.resx [new file with mode: 0644]
Oobe/Oobe.Common/Resources/Wifi/Translations.resx [new file with mode: 0644]
Oobe/Oobe.Common/Styles/ButtonStyles.cs [deleted file]
Oobe/Oobe.Common/Styles/ButtonsExtensions.cs [deleted file]
Oobe/Oobe.Common/Styles/CarouselPickerStyles.cs
Oobe/Oobe.Common/Utils/ScreenSizeUtils.cs
Oobe/Oobe.Common/ViewModels/BasePageViewModel.cs [new file with mode: 0644]
Oobe/Oobe.Common/ViewModels/BaseViewModel.cs [new file with mode: 0644]
Oobe/Oobe.Common/Views/AddNewNetworkPupupView.cs [new file with mode: 0644]
Oobe/Oobe.Common/Views/BasePage.xaml.cs [new file with mode: 0644]
Oobe/Oobe.Common/Views/ChangeSecurityTypePopupView.cs [new file with mode: 0644]
Oobe/Oobe.Common/Views/Extensions/ComponentSizeExtension.cs [new file with mode: 0644]
Oobe/Oobe.Common/Views/Extensions/ExtentsExtension.cs [new file with mode: 0644]
Oobe/Oobe.Common/Views/Extensions/FontSizeExtension.cs [new file with mode: 0644]
Oobe/Oobe.Common/Views/Extensions/PaddingExtension.cs [new file with mode: 0644]
Oobe/Oobe.Common/Views/Extensions/Size2DExtension.cs [new file with mode: 0644]
Oobe/Oobe.Common/Views/Extensions/WifiUISecurityTypeExtensions.cs [new file with mode: 0644]
Oobe/Oobe.Common/Views/TermsView.cs [new file with mode: 0644]
Oobe/Oobe.Common/Views/WifiPasswordPopupView.cs [new file with mode: 0644]
Oobe/Oobe.Common/Views/WifiView.cs [new file with mode: 0644]
Oobe/Oobe.Common/res/button/02_butt_2_empty_action.svg [new file with mode: 0644]
Oobe/Oobe.Common/res/button/02_butt_2_empty_disabled.svg [new file with mode: 0644]
Oobe/Oobe.Common/res/button/02_butt_2_empty_pressed.svg [new file with mode: 0644]
Oobe/Oobe.Common/res/examl/Oobe.Common.Views.TermsXamlView.examl [new file with mode: 0644]
Oobe/Oobe.Common/res/layout/AddNewNetworkPupupView.xaml [new file with mode: 0644]
Oobe/Oobe.Common/res/layout/BasePage.xaml [new file with mode: 0644]
Oobe/Oobe.Common/res/layout/ChangeSecurityTypePopupView.xaml [new file with mode: 0644]
Oobe/Oobe.Common/res/layout/TermsView.xaml [new file with mode: 0644]
Oobe/Oobe.Common/res/layout/WifiPasswordPopupView.xaml [new file with mode: 0644]
Oobe/Oobe.Common/res/layout/WifiView.xaml [new file with mode: 0644]
Oobe/Oobe.Common/res/switch/07_check_off_active.png [new file with mode: 0644]
Oobe/Oobe.Common/res/switch/07_check_off_disabled.png [new file with mode: 0644]
Oobe/Oobe.Common/res/switch/07_check_on_active.png [new file with mode: 0644]
Oobe/Oobe.Common/res/theme/RegularTheme.xaml [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/07_radiobutton_off_active.svg [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/07_radiobutton_on_active.svg [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/08_popup_body.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/12_back_active.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/12_icon_addnetwork.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/12_icon_addnetwork_pressed.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/12_icon_eye_pw_hidden.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/12_icon_eye_pw_visible.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/12_icon_scan.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/12_icon_scan_disabled.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/12_icon_scan_pressed.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/12_icon_scanning.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/12_icon_wifioff.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/12_icon_wifioff_disabled.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/12_icon_wifion.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/12_icon_wifion_disabled.png [new file with mode: 0644]
Oobe/Oobe.Common/res/wifi/Rectangle_918.png [new file with mode: 0644]
Oobe/Oobe.Language/LanguageStep.cs
Oobe/Oobe.Language/Model/LanguageManager.cs [moved from Oobe/Oobe.Language/Model/LanguageManger.cs with 96% similarity]
Oobe/Oobe.Language/Oobe.Language.csproj
Oobe/Oobe.Region/Oobe.Region.csproj
Oobe/Oobe.Region/RegionStep.cs
Oobe/Oobe.Terms/Oobe.Terms.csproj
Oobe/Oobe.Terms/Styles/ButtonStyles.cs [deleted file]
Oobe/Oobe.Terms/Styles/TextLabelStyles.cs [deleted file]
Oobe/Oobe.Terms/TermsStep.cs
Oobe/Oobe.Terms/Views/TermsView.cs [deleted file]
Oobe/Oobe.Welcome/Oobe.Welcome.csproj
Oobe/Oobe.Welcome/WelcomeStep.cs
Oobe/Oobe.Wifi/Controls/ListView.cs [deleted file]
Oobe/Oobe.Wifi/Controls/Wifi/AddNewNetworkPupup.cs [deleted file]
Oobe/Oobe.Wifi/Controls/Wifi/ApManager.cs
Oobe/Oobe.Wifi/Controls/Wifi/ButtonStyles.cs [deleted file]
Oobe/Oobe.Wifi/Controls/Wifi/ChangeSecurityTypePopup.cs [deleted file]
Oobe/Oobe.Wifi/Controls/Wifi/WifiPasswordPopup.cs [deleted file]
Oobe/Oobe.Wifi/Controls/Wifi/WifiView.cs [deleted file]
Oobe/Oobe.Wifi/Oobe.Wifi.csproj
Oobe/Oobe.Wifi/WifiStep.cs
Oobe/Oobe/Managers/ProcessManager.cs
Oobe/Oobe/Oobe.csproj
Oobe/Oobe/Oobe.csproj.bak [new file with mode: 0644]
Oobe/Oobe/ScalableUI/OrientationalView.cs
Oobe/Oobe/Views/MainView.cs

index cc990d7..7b0dc00 100644 (file)
@@ -27,6 +27,20 @@ namespace Oobe.Common.Controls
 {\r
     public class CarouselPicker : Control\r
     {\r
+        public static BindableProperty SelectedItemIndexProperty = BindableProperty.Create(\r
+            propertyName: "SelectedItemIndex",\r
+            returnType: typeof(int),\r
+            defaultValue: default(int),\r
+            declaringType: typeof(CarouselPicker),\r
+            propertyChanged: OnSelectedItemIndexChanged);\r
+\r
+        public static BindableProperty ItemsProperty = BindableProperty.Create(\r
+            propertyName: "Items",\r
+            returnType: typeof(IEnumerable<CarouselPickerItemData>),\r
+            defaultValue: default(IEnumerable<CarouselPickerItemData>),\r
+            declaringType: typeof(CarouselPicker),\r
+            propertyChanged: OnItemsChanged);\r
+\r
         private Oobe.Common.Controls.ScrollableBase scrollableBase;\r
         private View itemsListView;\r
         private View upperLine;\r
@@ -37,9 +51,6 @@ namespace Oobe.Common.Controls
 \r
         private float textCenterOpacity;\r
         private float textOuterOpacity;\r
-        private int selectedItemIndex = 0;\r
-\r
-        private List<CarouselPickerItemData> items = new List<CarouselPickerItemData>();\r
 \r
         public CarouselPicker()\r
             : base()\r
@@ -51,6 +62,7 @@ namespace Oobe.Common.Controls
         {\r
             // TODO fix a bug with style not properly applied by base class\r
             ApplyStyle(style);\r
+            FlexLayout.SetFlexAlignmentSelf(this, FlexLayout.AlignmentType.Center);\r
         }\r
 \r
         public event EventHandler SelectedItemChanged;\r
@@ -59,19 +71,39 @@ namespace Oobe.Common.Controls
 \r
         public int SelectedItemIndex\r
         {\r
-            get\r
+            get => (int)GetValue(SelectedItemIndexProperty);\r
+            set => SetValue(SelectedItemIndexProperty, value);\r
+        }\r
+\r
+        public List<CarouselPickerItemData> Items\r
+        {\r
+            get => GetValue(ItemsProperty) as List<CarouselPickerItemData>;\r
+            set => SetValue(ItemsProperty, value);\r
+        }\r
+\r
+        private static void OnSelectedItemIndexChanged(BindableObject bindable, object oldValue, object newValue)\r
+        {\r
+            if (oldValue.Equals(newValue))\r
             {\r
-                return selectedItemIndex;\r
+                return;\r
             }\r
 \r
-            set\r
+            if (bindable is CarouselPicker picker && newValue is int index)\r
             {\r
-                // always scroll\r
-                scrollableBase.ScrollToIndex(value);\r
-                if (selectedItemIndex != value)\r
+                picker.SelectedItemIndex = (int)newValue;\r
+                picker.scrollableBase.ScrollToIndex((int)newValue);\r
+                picker.SelectedItemChanged?.Invoke(picker, null);\r
+            }\r
+        }\r
+\r
+        private static void OnItemsChanged(BindableObject bindable, object oldValue, object newValue)\r
+        {\r
+            if (bindable is CarouselPicker picker && newValue is IEnumerable<CarouselPickerItemData> items)\r
+            {\r
+                picker.itemsListView.Children.Clear();\r
+                foreach (var item in items)\r
                 {\r
-                    SelectedItemChanged?.Invoke(this, null);\r
-                    selectedItemIndex = value;\r
+                    picker?.AddItem(item);\r
                 }\r
             }\r
         }\r
@@ -80,14 +112,6 @@ namespace Oobe.Common.Controls
         {\r
             var view = CreateItemView(item);\r
             itemsListView.Add(view);\r
-            items.Add(item);\r
-        }\r
-\r
-        public void RemoveItem(CarouselPickerItemData item)\r
-        {\r
-            var index = items.IndexOf(item);\r
-            items.Remove(item);\r
-            itemsListView.Children.RemoveAt(index);\r
         }\r
 \r
         public override void ApplyStyle(ViewStyle viewStyle)\r
@@ -152,10 +176,9 @@ namespace Oobe.Common.Controls
                 };\r
                 scrollableBase.ScrollAnimationEndEvent += (sender, args) =>\r
                 {\r
-                    if (selectedItemIndex != scrollableBase.CurrentPage)\r
+                    if (SelectedItemIndex != scrollableBase.CurrentPage)\r
                     {\r
-                        selectedItemIndex = scrollableBase.CurrentPage;\r
-                        SelectedItemChanged?.Invoke(this, null);\r
+                        SelectedItemIndex = scrollableBase.CurrentPage;\r
                     }\r
                 };\r
 \r
@@ -168,7 +191,7 @@ namespace Oobe.Common.Controls
                 upperLine = new View()\r
                 {\r
                     BackgroundColor = Style.LinesColor,\r
-                    Size2D = SpUtils.ToPixels(new Size2D(0, 1)),\r
+                    Size = SpUtils.ToPixels(new Size2D(0, 1)),\r
                     WidthResizePolicy = ResizePolicyType.FillToParent,\r
                     Position2D = SpUtils.ToPixels(new Position2D(0, 93)),\r
                     Opacity = 0.95f,\r
@@ -183,7 +206,7 @@ namespace Oobe.Common.Controls
                 lowerLine = new View()\r
                 {\r
                     BackgroundColor = Style.LinesColor,\r
-                    Size2D = SpUtils.ToPixels(new Size2D(0, 1)),\r
+                    Size = SpUtils.ToPixels(new Size2D(0, 1)),\r
                     WidthResizePolicy = ResizePolicyType.FillToParent,\r
                     Position2D = SpUtils.ToPixels(new Position2D(0, 93)),\r
                     Opacity = 0.95f,\r
diff --git a/Oobe/Oobe.Common/Controls/CustomButton.cs b/Oobe/Oobe.Common/Controls/CustomButton.cs
new file mode 100644 (file)
index 0000000..b0debe5
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.ComponentModel;
+using Tizen.NUI;
+using Tizen.NUI.Components;
+
+namespace Oobe.Common.Controls
+{
+    public partial class CustomButton: Button
+    {
+        public CustomButton()
+        {
+            PropertyChanged += OnPropertyChanged;
+            Hide();
+        }
+
+        /// <summary>
+        /// Called when one of properties is changed.
+        /// </summary>
+        private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+        {
+            if (e.PropertyName == "Command" && Command != null)
+            {
+                FlexLayout.SetFlexShrink(this, 0);
+                Show();
+            }
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Controls/ListView.cs b/Oobe/Oobe.Common/Controls/ListView.cs
new file mode 100644 (file)
index 0000000..c6d1681
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Collections.ObjectModel;
+using System.Linq;
+using Oobe.Common.Styles;
+using Oobe.Common.Utils;
+using Oobe.Common.Views;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Oobe.Common.Controls
+{
+    public partial class ListView : Tizen.NUI.Components.ScrollableBase
+    {
+        public View Context = null;
+
+        private ObservableCollection<View> items;
+        private View footer = null;
+
+        public ObservableCollection<View> Items
+        {
+            get => items;
+
+            set
+            {
+                if (value != items)
+                {
+                    DetachItems();
+                    items = value;
+                    AttachItems();
+                }
+            }
+        }
+
+        public ListView()
+            : base()
+        {
+            Scrollbar = new Scrollbar(ScrollbarStyles.Default);
+            CreateContextView();
+        }
+
+        private void CreateContextView()
+        {
+            if (Context != null)
+            {
+                return;
+            }
+
+            Context = new View()
+            {
+                Padding = new Extents(
+                    (ushort)SpUtils.ToPixels(40), (ushort)SpUtils.ToPixels(40), 0, 0),
+                Layout = new SequenceFlexLayout()
+                {
+                    Direction = FlexLayout.FlexDirection.Column,
+                    Alignment = FlexLayout.AlignmentType.Stretch,
+                },
+            };
+            Add(Context);
+        }
+
+        public void CreateFooter()
+        {
+            if (Context.Children.Contains(footer))
+            {
+                return;
+            }
+
+            footer = new View()
+            {
+                Margin = new Extents(0, 0, (ushort)SpUtils.ToPixels(21), (ushort)SpUtils.ToPixels(16)),
+                HeightResizePolicy = ResizePolicyType.FitToChildren,
+                Layout = new LinearLayout()
+                {
+                    LinearOrientation = LinearLayout.Orientation.Horizontal,
+                    LinearAlignment = LinearLayout.Alignment.Center,
+                },
+            };
+
+            Button button = new Button()
+            {
+                StyleName = "AddWifi",
+                Size = SpUtils.ToPixels(new Size(42, 42)),
+                Margin = new Extents(0, (ushort)SpUtils.ToPixels(16), 0, 0),
+            };
+            button.Clicked += (s, e) => ShowAddNetworkPopup();
+
+            TextLabel textLabel = new TextLabel()
+            {
+                TranslatableText = "WIFI_ADD_NEW_NETWORK",
+                FontFamily = "BreezeSans",
+                VerticalAlignment = VerticalAlignment.Center,
+                HorizontalAlignment = HorizontalAlignment.Center,
+                PixelSize = SpUtils.ToPixels(20f),
+                TextColor = new Color(0, 0x0C / 255f, 0x2B / 255f, 1.0f),
+                FontStyle = new PropertyMap().AddRegularFontStyle(),
+                FontSizeScale = FontSizeScale.UseSystemSetting,
+            };
+
+            footer.Add(button);
+            footer.Add(textLabel);
+            Context.Add(footer);
+            (Context.Layout as SequenceFlexLayout)?.KeepAsLast(footer.Layout);
+        }
+
+        private static void ShowAddNetworkPopup()
+        {
+            var view = new AddNewNetworkPupupView();
+            var popup = new Utils.Popup(view, centered: true);
+            view.PositionY = SpUtils.ToPixels(-130);
+            view.OnDismiss += popup.Dismiss;
+            popup.Show();
+        }
+
+        private void DetachItems()
+        {
+            if (items != null)
+            {
+                items.CollectionChanged -= OnCollectionChanged;
+            }
+        }
+
+        private void AttachItems()
+        {
+            if (items != null)
+            {
+                items.CollectionChanged += OnCollectionChanged;
+            }
+        }
+
+        private void OnCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
+        {
+            if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
+            {
+                var items = e.NewItems.OfType<View>().ToList();
+                if (items.Count > 0)
+                {
+                    foreach (var item in items)
+                    {
+                        Context.Add(item);
+                    }
+                }
+            }
+            else if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Remove)
+            {
+                var items = e.OldItems.OfType<View>().ToList();
+                if (items.Count > 0)
+                {
+                    foreach (var item in items)
+                    {
+                        Context.Remove(item);
+                    }
+                }
+            }
+            else if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Reset)
+            {
+                foreach (var child in Context.Children.Where(x => x != footer).ToList())
+                {
+                    Context.Remove(child);
+                }
+            }
+        }
+    }
+}
similarity index 54%
rename from Oobe/Oobe.Wifi/Controls/Wifi/ApView.cs
rename to Oobe/Oobe.Common/Controls/ListViewCell.cs
index 6c8ea36..b37b9e7 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*
  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,63 +21,92 @@ using Tizen.Network.Connection;
 using Tizen.Network.WiFi;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
-using Tizen.System;
 
-namespace Oobe.Wifi.Controls.Wifi
+namespace Oobe.Common.Controls
 {
-    public class ApView : View
+    public partial class ListViewCell: View
     {
-        private TextLabel detail = null;
-        private View range = null;
+        public event Action Tapped;
 
-        // detectors have to be kept separately because of GC, there is no link by ref between View and Detector
+        private TextLabel status = null;
+        private View signal = null;
         private TapGestureDetector detector;
 
-        public ApView()
+        public ListViewCell()
         {
-            Size = SpUtils.ToPixels(new Size(WifiView.ListItemWidth, WifiView.ListItemHeight));
-            Layout = new AbsoluteLayout();
+            Layout = new LinearLayout()
+            {
+                LinearOrientation = LinearLayout.Orientation.Vertical,
+            };
+            FlexLayout.SetFlexAlignmentSelf(this, FlexLayout.AlignmentType.Stretch);
         }
 
-        public event Action Tapped;
-
         public void Update(WiFiAP wifiAp)
         {
-            if (range == null)
+            if (signal is null)
             {
                 var userScale1 = ScreenSizeUtils.GetFootnoteFontSizeScaleMaxLarge();
-                range = new View()
+
+                View cell = new View()
+                {
+                    Margin = new Extents(0, 0, (ushort)SpUtils.ToPixels(21), (ushort)SpUtils.ToPixels(21)),
+                    Layout = new LinearLayout()
+                    {
+                        LinearOrientation = LinearLayout.Orientation.Horizontal,
+                    },
+                };
+                FlexLayout.SetFlexAlignmentSelf(cell, FlexLayout.AlignmentType.Stretch);
+
+                signal = new View()
                 {
-                    Position = SpUtils.ToPixels(new Position(48, 21)),
-                    Size = SpUtils.ToPixels(new Size(userScale1 * 32, userScale1 * 24)),
                     BackgroundImage = GetRangeImage(wifiAp),
+                    Margin = new Extents((ushort)SpUtils.ToPixels(5), (ushort)SpUtils.ToPixels(userScale1 * 32), (ushort)SpUtils.ToPixels(5), 0),
+                    Size = SpUtils.ToPixels(new Size(userScale1 * 32, userScale1 * 24)),
+                };
+
+                View detail = new View()
+                {
+                    HeightResizePolicy = ResizePolicyType.FitToChildren,
+                    Layout = new LinearLayout()
+                    {
+                        LinearOrientation = LinearLayout.Orientation.Vertical,
+                        LinearAlignment = LinearLayout.Alignment.Begin,
+                    },
                 };
-                this.Add(range);
+                FlexLayout.SetFlexAlignmentSelf(detail, FlexLayout.AlignmentType.FlexStart);
 
-                var userScale2 = TextUtils.GetFontSizeScale(SystemSettings.FontSize);
-                float positionX = 110 * Math.Max(1.0f, userScale1);
-                float positionY = (float)((-11.3 * userScale2) + 28.3);
-                this.Add(new TextLabel(wifiAp.NetworkInformation.Essid)
+                TextLabel network = new TextLabel(wifiAp.NetworkInformation.Essid)
                 {
-                    Position = SpUtils.ToPixels(new Position(positionX, positionY)),
                     PixelSize = SpUtils.ToPixels(20f),
                     TextColor = new Color(0, 0x0C / 255f, 0x2B / 255f, 1.0f),
                     FontFamily = "BreezeSans",
                     FontStyle = new PropertyMap().AddLightFontStyle(),
                     FontSizeScale = FontSizeScale.UseSystemSetting,
-                });
+                };
 
-                detail = new TextLabel(GetDetailInfo(wifiAp))
+                status = new TextLabel(GetDetailInfo(wifiAp))
                 {
-                    WidthSpecification = LayoutParamPolicies.WrapContent,
-                    Position = SpUtils.ToPixels(new Position(positionX, 45)),
                     PixelSize = SpUtils.ToPixels(14f),
                     TextColor = new Color(0, 0x0C / 255f, 0x2B / 255f, 1.0f),
                     FontFamily = "BreezeSans",
                     FontStyle = new PropertyMap().AddRegularFontStyle(),
                     FontSizeScale = FontSizeScale.UseSystemSetting,
                 };
-                this.Add(detail);
+                FlexLayout.SetFlexAlignmentSelf(status, FlexLayout.AlignmentType.Stretch);
+
+                View separator = new View()
+                {
+                    Size = SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? new Size(744, 1) : new Size(1000, 1)),
+                    BackgroundColor = new Color(0xC3 / 255f, 0xCA / 255f, 0xD2 / 255f, 1.0f),
+                };
+                FlexLayout.SetFlexAlignmentSelf(separator, FlexLayout.AlignmentType.Stretch);
+
+                detail.Add(network);
+                detail.Add(status);
+                cell.Add(signal);
+                cell.Add(detail);
+                Add(cell);
+                Add(separator);
 
                 detector = new TapGestureDetector();
                 detector.Detected += (s, e) => Tapped?.Invoke();
@@ -85,21 +114,27 @@ namespace Oobe.Wifi.Controls.Wifi
             }
             else
             {
-                range.BackgroundImage = GetRangeImage(wifiAp);
-                detail.Text = GetDetailInfo(wifiAp);
-                detail.WidthSpecification = LayoutParamPolicies.WrapContent;
+                signal.BackgroundImage = GetRangeImage(wifiAp);
+                status.Text = GetDetailInfo(wifiAp);
             }
         }
 
+
+        private static string GetRangeImage(WiFiAP wifiAp)
+        {
+            return System.IO.Path.Combine(
+                    NUIApplication.Current.DirectoryInfo.Resource,
+                    $"12_icon_wifi{(int)wifiAp.NetworkInformation.RssiLevel}.png");
+        }
+
         private static string GetDetailInfo(WiFiAP wifiAp)
         {
-            // state
+            //state
             if (wifiAp.NetworkInformation.ConnectionState == WiFiConnectionState.Connected)
             {
                 return "Connected";
             }
-
-            if (wifiAp.NetworkInformation.ConnectionState == WiFiConnectionState.Association)
+            else if (wifiAp.NetworkInformation.ConnectionState == WiFiConnectionState.Association)
             {
                 return "Connecting...";
             } // security
@@ -116,12 +151,5 @@ namespace Oobe.Wifi.Controls.Wifi
                 return "Secured";
             }
         }
-
-        private static string GetRangeImage(WiFiAP wifiAp)
-        {
-            return System.IO.Path.Combine(
-                    NUIApplication.Current.DirectoryInfo.Resource,
-                    $"12_icon_wifi{(int)wifiAp.NetworkInformation.RssiLevel}.png");
-        }
     }
 }
similarity index 90%
rename from Oobe/Oobe.Wifi/Controls/Wifi/PasswordEntry.cs
rename to Oobe/Oobe.Common/Controls/PasswordEntry.cs
index fa6963e..97236df 100644 (file)
@@ -16,7 +16,7 @@
 
 using Tizen.NUI;
 
-namespace Oobe.Wifi.Controls.Wifi
+namespace Oobe.Common.Controls
 {
     public class PasswordEntry : Tizen.NUI.BaseComponents.TextField
     {
@@ -39,9 +39,9 @@ namespace Oobe.Wifi.Controls.Wifi
                     HidePassword();
                 }
 
-#pragma warning disable S1656
-                Text = Text; // for refreshing - causes resetting cursor
-#pragma warning restore S1656
+                var text = new string(Text);
+                Text = string.Empty;
+                Text = text; // for refreshing - causes resetting cursor
             }
         }
 
 using System;
 using Oobe.Common.Styles;
 using Oobe.Common.Utils;
-using Tizen.Network.WiFi;
+using Oobe.Common.Views.Extensions;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Components;
+using Tizen.System;
 
-namespace Oobe.Wifi.Controls.Wifi
+namespace Oobe.Common.Controls
 {
     public class SecurityTypeView : View
     {
-        private TextLabel descriptionTextLabel = null;
+        public SecurityRadioButton RadioButton;
+        public WifiUISecurityType WifiUISecurityType;
+
+        public event Action Activated;
 
         private TapGestureDetector detector;
 
         public SecurityTypeView(WifiUISecurityType wifiUISecurityType)
         {
-            Size = SpUtils.ToPixels(new Size(1024, 108));
-            Layout = new AbsoluteLayout();
-            this.WifiUISecurityType = wifiUISecurityType;
-
-            InitializeSubelements();
+            WifiUISecurityType = wifiUISecurityType;
+            Layout = new FlexLayout()
+            {
+                Direction = FlexLayout.FlexDirection.Column,
+            };
+            FlexLayout.SetFlexAlignmentSelf(this, FlexLayout.AlignmentType.Stretch);
+            CreateComponent();
         }
 
-        public event Action Activated;
+        private void CreateComponent()
+        {
+            View cell = new View()
+            {
+                Margin = new Extents(0, 0, (ushort)SpUtils.ToPixels(20), (ushort)SpUtils.ToPixels(20)),
+                Layout = new FlexLayout()
+                {
+                    Direction = FlexLayout.FlexDirection.Row,
+                },
+            };
+            FlexLayout.SetFlexAlignmentSelf(cell, FlexLayout.AlignmentType.Stretch);
 
-        public WifiUISecurityType WifiUISecurityType { get; set; }
+            var userScale = TextUtils.GetFontSizeScale(SystemSettings.FontSize);
 
-        public SecurityRadioButton Button { get; set; }
+            ButtonStyle radioButtonStyle = new ButtonStyle
+            {
+                Icon = new ImageViewStyle
+                {
+                    Size = new Size(SpUtils.ToPixels(20 + (10 * userScale)), SpUtils.ToPixels(20 + (10 * userScale))),
+                    ResourceUrl = new Selector<string>
+                    {
+                        Normal = NUIApplication.Current.DirectoryInfo.Resource + "wifi/07_radiobutton_off_active.svg",
+                        Selected = NUIApplication.Current.DirectoryInfo.Resource + "wifi/07_radiobutton_on_active.svg",
+                    },
+                },
+            };
 
-        private void InitializeSubelements()
-        {
-            Button = new SecurityRadioButton
+            RadioButton = new SecurityRadioButton
             {
+                IsSelectable = true,
                 IsSelected = false,
-                PositionX = SpUtils.ToPixels(36),
                 CellHorizontalAlignment = HorizontalAlignmentType.Center,
                 CellVerticalAlignment = VerticalAlignmentType.Center,
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.CenterLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft,
+                Margin = new Extents(0, (ushort)SpUtils.ToPixels(25), 0, 0),
             };
-            this.Add(Button);
+            RadioButton.ApplyStyle(radioButtonStyle);
+            FlexLayout.SetFlexAlignmentSelf(RadioButton, FlexLayout.AlignmentType.Center);
 
-            descriptionTextLabel = new TextLabel
+            TextLabel descriptionTextLabel = new TextLabel
             {
-                PositionX = SpUtils.ToPixels(108),
                 PixelSize = SpUtils.ToPixels(20),
-                TranslatableText = WifiUISecurityType.GetUIName(),
+                TranslatableText = WifiUISecurityTypeExtensions.GetUIName(WifiUISecurityType),
                 FontFamily = "BreezeSans",
                 FontStyle = new PropertyMap().AddLightFontStyle(),
                 TextColor = new Color(0.0f, 0x14 / 255.0f, 0x47 / 255.0f, 1.0f),
                 HorizontalAlignment = HorizontalAlignment.Begin,
                 VerticalAlignment = VerticalAlignment.Center,
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.CenterLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft,
                 FontSizeScale = FontSizeScale.UseSystemSetting,
             };
-            this.Add(descriptionTextLabel);
+            FlexLayout.SetFlexAlignmentSelf(descriptionTextLabel, FlexLayout.AlignmentType.Center);
+
+            View separator = new View()
+            {
+                Size = SpUtils.ToPixels(new Size(1000, 1)),
+                BackgroundColor = new Color(0xC3 / 255f, 0xCA / 255f, 0xD2 / 255f, 1.0f),
+            };
+            FlexLayout.SetFlexAlignmentSelf(separator, FlexLayout.AlignmentType.Stretch);
+
+
+            cell.Add(RadioButton);
+            cell.Add(descriptionTextLabel);
+            Add(cell);
+            Add(separator);
 
             detector = new TapGestureDetector();
             detector.Detected += OnClicked;
             detector.Attach(this);
         }
 
+        public void SelectItem()
+        {
+            RadioButton.SetSelectionProgramatically(true);
+        }
+
         private void OnClicked(object sender, TapGestureDetector.DetectedEventArgs args)
         {
-            var selectedIndex = Button.ItemGroup.SelectedIndex;
+            var selectedIndex = RadioButton.ItemGroup.SelectedIndex;
+
             Tizen.Log.Debug("oobe", $"Selected index {selectedIndex}");
-            if (Button.ItemGroup.GetItem(selectedIndex) is SecurityRadioButton selectedView)
+            if (RadioButton.ItemGroup.GetItem(selectedIndex) is SecurityRadioButton selectedView)
             {
                 selectedView.SetSelectionProgramatically(false);
-                Button.SetSelectionProgramatically(true);
+                RadioButton.SetSelectionProgramatically(true);
                 Activated?.Invoke();
             }
         }
@@ -17,9 +17,9 @@
 using System.Linq;
 using Tizen.NUI;
 
-namespace Oobe.Wifi.Controls
+namespace Oobe.Common.Controls
 {
-    public class SequenceLinearLayout : LinearLayout
+    public class SequenceFlexLayout : FlexLayout
     {
         private LayoutItem lastItem = null;
 
@@ -28,25 +28,19 @@ namespace Oobe.Wifi.Controls
             lastItem = item;
             if (item != null && item != LayoutChildren.Last())
             {
-                if (LayoutChildren.Remove(item))
-                {
-                    LayoutChildren.Add(item);
-                    RequestLayout();
-                }
+                Remove(lastItem);
+                Add(lastItem);
             }
         }
 
         protected override void OnChildAdd(LayoutItem child)
         {
             base.OnChildAdd(child);
-            if (lastItem != null)
+            if (lastItem != null && lastItem != LayoutChildren.Last())
             {
-                // remove by position, or find from the end
-                if (LayoutChildren.Remove(lastItem))
-                {
-                    LayoutChildren.Add(lastItem);
-                }
+                Remove(lastItem);
+                Add(lastItem);
             }
         }
     }
-}
+}
\ No newline at end of file
index 606d4f1..385a1f8 100644 (file)
@@ -14,9 +14,6 @@
  * limitations under the License.
  */
 
-using System;
-using Oobe.Common.Interfaces;
-using Oobe.Common.Pages;
 using Tizen.NUI.BaseComponents;
 
 namespace Oobe.Common.Interfaces
@@ -66,7 +63,7 @@ namespace Oobe.Common.Interfaces
         {
         }
 
-        public virtual BasePage CreateView(IProcessNavigation nav)
+        public virtual View CreateXamlView(IProcessNavigation nav)
         {
             return null;
         }
index 56bf483..26e6f3c 100644 (file)
@@ -8,14 +8,21 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="10.0.0.17007">
-      <ExcludeAssets>Runtime</ExcludeAssets>
-    </PackageReference>
-    <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
-    <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
+    <None Remove="res\layout\AddNewNetworkPupupView.xaml" />
+    <None Remove="res\layout\ChangeSecurityTypePopupView.xaml" />
+    <None Remove="res\layout\TermsView.xaml" />
+    <None Remove="res\layout\WifiPasswordPopupView.xaml" />
+    <None Remove="res\layout\WifiView.xaml" />
+  </ItemGroup>
+
+  <ItemGroup>
+         <PackageReference Include="Tizen.NET" Version="10.0.0.17172" />
+         <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
+         <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
       <PrivateAssets>all</PrivateAssets>
     </PackageReference>
+    <PackageReference Include="Tizen.NUI.XamlBuild" Version="1.0.11" />
   </ItemGroup>
 
   <ItemGroup>
       <AutoGen>True</AutoGen>
       <DependentUpon>Translations.resx</DependentUpon>
     </Compile>
+    <Compile Update="Resources\Wifi\Translations.Designer.cs">
+      <DependentUpon>Translations.resx</DependentUpon>
+      <DesignTime>True</DesignTime>
+      <AutoGen>True</AutoGen>
+    </Compile>
   </ItemGroup>
 
   <ItemGroup>
       <Generator>PublicResXFileCodeGenerator</Generator>
       <LastGenOutput>Translations.Designer.cs</LastGenOutput>
     </EmbeddedResource>
+    <EmbeddedResource Update="Resources\Wifi\Translations.ko-KR.resx">
+      <Generator>PublicResXFileCodeGenerator</Generator>
+    </EmbeddedResource>
+    <EmbeddedResource Update="Resources\Wifi\Translations.pl-PL.resx">
+      <Generator>PublicResXFileCodeGenerator</Generator>
+    </EmbeddedResource>
+    <EmbeddedResource Update="Resources\Wifi\Translations.resx">
+      <LastGenOutput>Translations.Designer.cs</LastGenOutput>
+      <Generator>PublicResXFileCodeGenerator</Generator>
+    </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>
     <AdditionalFiles Include="../stylecop.json" />
     <AdditionalFiles Include="../Settings.StyleCop" />
   </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="res\layout\BasePage.xaml">
+      <Generator></Generator>
+    </EmbeddedResource>
+    <EmbeddedResource Include="res\layout\AddNewNetworkPupupView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </EmbeddedResource>
+    <EmbeddedResource Include="res\layout\ChangeSecurityTypePopupView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </EmbeddedResource>
+    <EmbeddedResource Include="res\layout\WifiPasswordPopupView.xaml">
+      <Generator>MSBuild:Compile</Generator>
+    </EmbeddedResource>
+    <EmbeddedResource Include="res\layout\TermsView.xaml">
+      <Generator>MSBuild:Compile</Generator>
+    </EmbeddedResource>
+    <EmbeddedResource Include="res\layout\WifiView.xaml">
+      <Generator>MSBuild:Compile</Generator>
+    </EmbeddedResource>
+    <EmbeddedResource Include="res\theme\RegularTheme.xaml">
+      <Generator></Generator>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Pages\" />
+  </ItemGroup>
 </Project>
diff --git a/Oobe/Oobe.Common/Pages/BasePage.cs b/Oobe/Oobe.Common/Pages/BasePage.cs
deleted file mode 100644 (file)
index 2ef8059..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Oobe.Common.Styles;
-using Oobe.Common.Utils;
-using System;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace Oobe.Common.Pages
-{
-    /// <summary>
-    /// Basic OOBE Layout
-    /// </summary>
-    public class BasePage : View
-    {
-        private const string hdBackgroundFile = "hd_whitebg.9.png";
-        private const string fhdBackgroundFile = "fhd_whitebg.9.png";
-        private const string uhdBackgroundFile = "uhd_whitebg.9.png";
-        private View content;
-        private View dimView;
-
-        /// <summary>
-        /// Constructs new BasePageLayout object
-        /// </summary>
-        public BasePage()
-            : base()
-        {
-            dimView = new View()
-            {
-                HeightResizePolicy = ResizePolicyType.FillToParent,
-                WidthResizePolicy = ResizePolicyType.FillToParent,
-            };
-
-            dimView.Layout = new AbsoluteLayout();
-            Title = new TextLabel
-            {
-                PositionUsesPivotPoint = true,
-                PivotPoint = new Position(0.5f, 0.0f),
-                ParentOrigin = new Position(0.5f, ScreenSizeUtils.IsPortrait ? 0.333f : 0.183f),
-                WidthResizePolicy = ResizePolicyType.FillToParent,
-                TextColor = new Color(0, 20.0f / 255.0f, 71.0f / 255.0f, 1.0f),
-                HorizontalAlignment = HorizontalAlignment.Center,
-                Ellipsis = false,
-                PixelSize = SpUtils.ToPixels(40.0f),
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddLightFontStyle(),
-                FontSizeScale = FontSizeScale.UseSystemSetting,
-            };
-            dimView.Add(Title);
-            Add(dimView);
-            SetBackground();
-        }
-
-        private void SetBackground()
-        {
-            var visualMap = new NPatchVisual();
-            visualMap.URL = GetBackgroundUrl();
-            Background = visualMap.OutputVisualMap;
-            visualMap?.Dispose();
-        }
-
-        private string GetBackgroundUrl()
-        {
-            string filename = hdBackgroundFile;
-            int biggerEdge = Math.Max(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height);
-            if (biggerEdge > 3000)
-            {
-                filename = fhdBackgroundFile;
-            }
-            else if (biggerEdge < 1500)
-            {
-                filename = uhdBackgroundFile;
-            }
-
-            string bgUrl = NUIApplication.Current.DirectoryInfo.Resource + $"page/{filename}";
-            return bgUrl;
-        }
-
-        /// <summary>
-        /// TextLabel placed top of layout
-        /// </summary>
-        public TextLabel Title { get; private set; }
-
-        /// <summary>
-        /// Content View, which will be placed int the center of layout.
-        /// When new content is set, the old one will be Disposed.
-        /// </summary>
-        public View Content
-        {
-            get => content;
-            set
-            {
-                if (value != content)
-                {
-                    if (content != null)
-                    {
-                        dimView.Remove(content);
-                    }
-
-                    content?.Dispose();
-                    content = value;
-                    if (content == null)
-                    {
-                        return;
-                    }
-
-                    content.PositionUsesPivotPoint = true;
-                    content.PivotPoint = new Position(0.5f, 0.5f);
-                    content.ParentOrigin = new Position(0.5f, 0.5f);
-                    dimView.Add(content);
-                }
-            }
-        }
-    }
-}
diff --git a/Oobe/Oobe.Common/Pages/OneButtonPage.cs b/Oobe/Oobe.Common/Pages/OneButtonPage.cs
deleted file mode 100644 (file)
index 11ae1f5..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Oobe.Common.Styles;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace Oobe.Common.Pages
-{
-    /// <summary>
-    /// OOBE Layout with single center-positioned Button
-    /// </summary>
-    public class OneButtonPage : BasePage
-    {
-        /// <summary>
-        /// Constructs new OneButtonLayout object
-        /// </summary>
-        public OneButtonPage()
-            : base()
-        {
-            NextButton = new Button(ButtonStyles.Next);
-            NextButton.PositionUsesPivotPoint = true;
-            NextButton.PivotPoint = new Position(0.5f, 1.0f);
-            NextButton.ParentOrigin = new Position(0.5f, 0.936f);
-            NextButton.SetFontStyle(new PropertyMap().AddRegularFontStyle());
-
-            Add(NextButton);
-            Relayout += OneButtonPage_Relayout;
-        }
-
-        private void OneButtonPage_Relayout(object sender, System.EventArgs e)
-        {
-            Relayout -= OneButtonPage_Relayout;
-
-            NextButton.IsEnabled = !NextButton.IsEnabled;
-            NextButton.IsEnabled = !NextButton.IsEnabled;
-        }
-
-        /// <summary>
-        /// NextButton
-        /// </summary>
-        public Button NextButton { get; private set; }
-    }
-}
diff --git a/Oobe/Oobe.Common/Pages/TwoButtonsPage.cs b/Oobe/Oobe.Common/Pages/TwoButtonsPage.cs
deleted file mode 100644 (file)
index be9fbdf..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Oobe.Common.Styles;
-using Oobe.Common.Utils;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace Oobe.Common.Pages
-{
-    /// <summary>
-    /// OOBE Layout with two Buttons, positioned at left and right bottom.
-    /// </summary>
-    public class TwoButtonsPage
-        : BasePage
-    {
-        /// <summary>
-        /// Constructs new TwoButtonLayout object
-        /// </summary>
-        public TwoButtonsPage()
-            : base()
-        {
-            NextButton = new Button(ButtonStyles.Next);
-            NextButton.PositionUsesPivotPoint = true;
-            NextButton.PivotPoint = new Position(1.0f, 1.0f);
-            NextButton.ParentOrigin = new Position(ScreenSizeUtils.IsPortrait ? 0.933f : 0.942f, ScreenSizeUtils.IsPortrait ? 0.955f : 0.916f);
-            NextButton.SetFontStyle(new PropertyMap().AddRegularFontStyle());
-            NextButton.TextLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
-
-            PreviousButton = new Button(ButtonStyles.Previous);
-            PreviousButton.PositionUsesPivotPoint = true;
-            PreviousButton.PivotPoint = new Position(0.0f, 1.0f);
-            PreviousButton.ParentOrigin = new Position(ScreenSizeUtils.IsPortrait ? 0.067f : 0.058f, ScreenSizeUtils.IsPortrait ? 0.955f : 0.916f);
-            PreviousButton.SetFontStyle(new PropertyMap().AddRegularFontStyle());
-            PreviousButton.TextLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
-
-            Add(NextButton);
-            Add(PreviousButton);
-            Relayout += TwoButtonsPage_Relayout;
-        }
-
-        private void TwoButtonsPage_Relayout(object sender, System.EventArgs e)
-        {
-            Relayout -= TwoButtonsPage_Relayout;
-
-            NextButton.IsEnabled = !NextButton.IsEnabled;
-            NextButton.IsEnabled = !NextButton.IsEnabled;
-        }
-
-        /// <summary>
-        /// NextButton
-        /// </summary>
-        public Button NextButton { get; private set; }
-
-        /// <summary>
-        /// PreviousButton
-        /// </summary>
-        public Button PreviousButton { get; private set; }
-    }
-}
diff --git a/Oobe/Oobe.Common/Resources/Wifi/Translations.Designer.cs b/Oobe/Oobe.Common/Resources/Wifi/Translations.Designer.cs
new file mode 100644 (file)
index 0000000..a2f1ee6
--- /dev/null
@@ -0,0 +1,279 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Oobe.Common.Resources.Wifi {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    public class Translations {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Translations() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        public static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Oobe.Common.Resources.Wifi.Translations", typeof(Translations).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        public static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to ADD.
+        /// </summary>
+        public static string WIFI_ADD {
+            get {
+                return ResourceManager.GetString("WIFI_ADD", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Add network.
+        /// </summary>
+        public static string WIFI_ADD_NETWORK {
+            get {
+                return ResourceManager.GetString("WIFI_ADD_NETWORK", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Add new....
+        /// </summary>
+        public static string WIFI_ADD_NEW_NETWORK {
+            get {
+                return ResourceManager.GetString("WIFI_ADD_NEW_NETWORK", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to CANCEL.
+        /// </summary>
+        public static string WIFI_CANCEL {
+            get {
+                return ResourceManager.GetString("WIFI_CANCEL", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Choose security type.
+        /// </summary>
+        public static string WIFI_CHOOSE_SECURITY_TYPE {
+            get {
+                return ResourceManager.GetString("WIFI_CHOOSE_SECURITY_TYPE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Connection failed..
+        /// </summary>
+        public static string WIFI_CONNECTION_FAILED {
+            get {
+                return ResourceManager.GetString("WIFI_CONNECTION_FAILED", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Enter password.
+        /// </summary>
+        public static string WIFI_ENTER_PASSWORD {
+            get {
+                return ResourceManager.GetString("WIFI_ENTER_PASSWORD", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Enter password to join &quot;{0}&quot;.
+        /// </summary>
+        public static string WIFI_ENTER_PASSWORD_TO_JOIN {
+            get {
+                return ResourceManager.GetString("WIFI_ENTER_PASSWORD_TO_JOIN", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid password.
+        /// </summary>
+        public static string WIFI_INVALID_PASSWORD {
+            get {
+                return ResourceManager.GetString("WIFI_INVALID_PASSWORD", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to OK.
+        /// </summary>
+        public static string WIFI_OK {
+            get {
+                return ResourceManager.GetString("WIFI_OK", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Password.
+        /// </summary>
+        public static string WIFI_PASSWORD {
+            get {
+                return ResourceManager.GetString("WIFI_PASSWORD", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Scanning....
+        /// </summary>
+        public static string WIFI_SCANNING {
+            get {
+                return ResourceManager.GetString("WIFI_SCANNING", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid password or security type.
+        /// </summary>
+        public static string WIFI_SECUIRTY_KEY_FAILURE {
+            get {
+                return ResourceManager.GetString("WIFI_SECUIRTY_KEY_FAILURE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Security Key.
+        /// </summary>
+        public static string WIFI_SECURITY_KEY {
+            get {
+                return ResourceManager.GetString("WIFI_SECURITY_KEY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Security type.
+        /// </summary>
+        public static string WIFI_SECURITY_TYPE {
+            get {
+                return ResourceManager.GetString("WIFI_SECURITY_TYPE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to EAP.
+        /// </summary>
+        public static string WIFI_SECURITY_TYPE_EAP {
+            get {
+                return ResourceManager.GetString("WIFI_SECURITY_TYPE_EAP", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Open.
+        /// </summary>
+        public static string WIFI_SECURITY_TYPE_OPEN {
+            get {
+                return ResourceManager.GetString("WIFI_SECURITY_TYPE_OPEN", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to WEP.
+        /// </summary>
+        public static string WIFI_SECURITY_TYPE_WEP {
+            get {
+                return ResourceManager.GetString("WIFI_SECURITY_TYPE_WEP", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to WPA2 PSK.
+        /// </summary>
+        public static string WIFI_SECURITY_TYPE_WPA2PSK {
+            get {
+                return ResourceManager.GetString("WIFI_SECURITY_TYPE_WPA2PSK", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to WPA PSK.
+        /// </summary>
+        public static string WIFI_SECURITY_TYPE_WPAPSK {
+            get {
+                return ResourceManager.GetString("WIFI_SECURITY_TYPE_WPAPSK", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Network name.
+        /// </summary>
+        public static string WIFI_SSID {
+            get {
+                return ResourceManager.GetString("WIFI_SSID", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Invalid name or security type.
+        /// </summary>
+        public static string WIFI_SSID_FAILURE {
+            get {
+                return ResourceManager.GetString("WIFI_SSID_FAILURE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to To see available networks, turn on Wi - Fi..
+        /// </summary>
+        public static string WIFI_TURN_ON_WIFI {
+            get {
+                return ResourceManager.GetString("WIFI_TURN_ON_WIFI", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Username.
+        /// </summary>
+        public static string WIFI_USERNAME {
+            get {
+                return ResourceManager.GetString("WIFI_USERNAME", resourceCulture);
+            }
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Resources/Wifi/Translations.ko-KR.resx b/Oobe/Oobe.Common/Resources/Wifi/Translations.ko-KR.resx
new file mode 100644 (file)
index 0000000..9c122eb
--- /dev/null
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="WIFI_ADD_NETWORK" xml:space="preserve">
+    <value>네트워크 추가</value>
+  </data>
+  <data name="WIFI_ADD_NEW_NETWORK" xml:space="preserve">
+    <value>네트워크 추가</value>
+  </data>
+  <data name="WIFI_CANCEL" xml:space="preserve">
+    <value>취소</value>
+  </data>
+  <data name="WIFI_CHOOSE_SECURITY_TYPE" xml:space="preserve">
+    <value>보안 유형을 선택하십시오</value>
+  </data>
+  <data name="WIFI_CONNECTION_FAILED" xml:space="preserve">
+    <value>네트워크에 연결하지 못했습니다.</value>
+  </data>
+  <data name="WIFI_ENTER_PASSWORD" xml:space="preserve">
+    <value>비밀번호를 입력하세요</value>
+  </data>
+  <data name="WIFI_ENTER_PASSWORD_TO_JOIN" xml:space="preserve">
+    <value>"{0}" 에 연결하려면 비밀번호를 입력하세요.</value>
+  </data>
+  <data name="WIFI_INVALID_PASSWORD" xml:space="preserve">
+    <value>잘못된 비밀번호</value>
+  </data>
+  <data name="WIFI_OK" xml:space="preserve">
+    <value>확인</value>
+  </data>
+  <data name="WIFI_SCANNING" xml:space="preserve">
+    <value>찾는 중...</value>
+  </data>
+  <data name="WIFI_SECUIRTY_KEY_FAILURE" xml:space="preserve">
+    <value>잘못된 비밀번호 또는 보안 유형</value>
+  </data>
+  <data name="WIFI_SECURITY_KEY" xml:space="preserve">
+    <value>보안 키</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE" xml:space="preserve">
+    <value>보안 유형</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_EAP" xml:space="preserve">
+    <value>EAP</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_OPEN" xml:space="preserve">
+    <value>Open</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_WEP" xml:space="preserve">
+    <value>WEP</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_WPA2PSK" xml:space="preserve">
+    <value>WPA2 PSK</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_WPAPSK" xml:space="preserve">
+    <value>WPA PSK</value>
+  </data>
+  <data name="WIFI_SSID" xml:space="preserve">
+    <value>네트워크 이름</value>
+  </data>
+  <data name="WIFI_SSID_FAILURE" xml:space="preserve">
+    <value>잘못된 이름 또는 보안 유형</value>
+  </data>
+  <data name="WIFI_TURN_ON_WIFI" xml:space="preserve">
+    <value>연결 가능한 네트워크를 보려면 Wi-Fi를 켜세요.</value>
+  </data>
+  <data name="WIFI_USERNAME" xml:space="preserve">
+    <value>사용자 이름</value>
+  </data>
+  <data name="WIFI_PASSWORD" xml:space="preserve">
+    <value>암호</value>
+  </data>
+</root>
diff --git a/Oobe/Oobe.Common/Resources/Wifi/Translations.pl-PL.resx b/Oobe/Oobe.Common/Resources/Wifi/Translations.pl-PL.resx
new file mode 100644 (file)
index 0000000..ec8c4f9
--- /dev/null
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="WIFI_ADD_NEW_NETWORK" xml:space="preserve">
+    <value>Dodaj nową...</value>
+  </data>
+  <data name="WIFI_CANCEL" xml:space="preserve">
+    <value>ANULUJ</value>
+  </data>
+  <data name="WIFI_ADD" xml:space="preserve">
+    <value>DODAJ</value>
+  </data>
+  <data name="WIFI_CONNECTION_FAILED" xml:space="preserve">
+    <value>Połączenie nieudane.</value>
+  </data>
+  <data name="WIFI_ENTER_PASSWORD" xml:space="preserve">
+    <value>Wprowadź hasło</value>
+  </data>
+  <data name="WIFI_ENTER_PASSWORD_TO_JOIN" xml:space="preserve">
+    <value>Wprowadź hasło aby połączyć z "{0}"</value>
+  </data>
+  <data name="WIFI_INVALID_PASSWORD" xml:space="preserve">
+    <value>Hasło nieprawidłowe</value>
+  </data>
+  <data name="WIFI_OK" xml:space="preserve">
+    <value>ZATWIERDŹ</value>
+  </data>
+  <data name="WIFI_SCANNING" xml:space="preserve">
+    <value>Skanowanie...</value>
+  </data>
+  <data name="WIFI_TURN_ON_WIFI" xml:space="preserve">
+    <value>Aby zobaczyć dostępne sieci, włącz Wi - Fi.</value>
+  </data>
+  <data name="WIFI_ADD_NETWORK">
+       <value>Dodaj sieć</value>
+  </data>
+  <data name="WIFI_CHOOSE_SECURITY_TYPE">
+       <value>Wybierz typ zabezpieczeń</value>
+  </data>
+  <data name="WIFI_SSID">
+       <value>Nazwa sieci</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE">
+       <value>Wybierz typ zabezpieczeń</value>
+  </data>
+  <data name="WIFI_USERNAME">
+       <value>Nazwa użytkownika</value>
+  </data>
+  <data name="WIFI_SECURITY_KEY">
+       <value>Klucz zabezpieczeń</value>
+  </data>
+  <data name="WIFI_SSID_FAILURE">
+       <value>Nieprawidłowa nazwa sieci lub typ zabezpieczeń</value>
+  </data>
+  <data name="WIFI_SECUIRTY_KEY_FAILURE">
+       <value>Nieprawidłowy klucz lub typ zabezpieczeń</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_OPEN" xml:space="preserve">
+    <value>Otwarte</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_EAP" xml:space="preserve">
+    <value>EAP</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_WEP" xml:space="preserve">
+    <value>WEP</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_WPAPSK" xml:space="preserve">
+    <value>WPA PSK</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_WPA2PSK" xml:space="preserve">
+    <value>WPA2 PSK</value>
+  </data>
+</root>
\ No newline at end of file
diff --git a/Oobe/Oobe.Common/Resources/Wifi/Translations.resx b/Oobe/Oobe.Common/Resources/Wifi/Translations.resx
new file mode 100644 (file)
index 0000000..c8aef66
--- /dev/null
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="WIFI_ADD_NEW_NETWORK" xml:space="preserve">
+    <value>Add new...</value>
+  </data>
+  <data name="WIFI_CANCEL" xml:space="preserve">
+    <value>CANCEL</value>
+  </data>
+  <data name="WIFI_ADD" xml:space="preserve">
+    <value>ADD</value>
+  </data>
+  <data name="WIFI_CONNECTION_FAILED" xml:space="preserve">
+    <value>Connection failed.</value>
+  </data>
+  <data name="WIFI_ENTER_PASSWORD" xml:space="preserve">
+    <value>Enter password</value>
+  </data>
+  <data name="WIFI_ENTER_PASSWORD_TO_JOIN" xml:space="preserve">
+    <value>Enter password to join "{0}"</value>
+  </data>
+  <data name="WIFI_INVALID_PASSWORD" xml:space="preserve">
+    <value>Invalid password</value>
+  </data>
+  <data name="WIFI_OK" xml:space="preserve">
+    <value>OK</value>
+  </data>
+  <data name="WIFI_SCANNING" xml:space="preserve">
+    <value>Scanning...</value>
+  </data>
+  <data name="WIFI_TURN_ON_WIFI" xml:space="preserve">
+    <value>To see available networks, turn on Wi - Fi.</value>
+  </data>
+  <data name="WIFI_ADD_NETWORK">
+       <value>Add network</value>
+  </data>
+  <data name="WIFI_CHOOSE_SECURITY_TYPE">
+       <value>Choose security type</value>
+  </data>
+  <data name="WIFI_SSID">
+       <value>Network name</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE">
+       <value>Security type</value>
+  </data>
+  <data name="WIFI_USERNAME">
+       <value>Username</value>
+  </data>
+  <data name="WIFI_SECURITY_KEY">
+       <value>Security Key</value>
+  </data>
+  <data name="WIFI_SSID_FAILURE">
+       <value>Invalid name or security type</value>
+  </data>
+  <data name="WIFI_SECUIRTY_KEY_FAILURE">
+       <value>Invalid password or security type</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_OPEN" xml:space="preserve">
+    <value>Open</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_EAP" xml:space="preserve">
+    <value>EAP</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_WEP" xml:space="preserve">
+    <value>WEP</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_WPAPSK" xml:space="preserve">
+    <value>WPA PSK</value>
+  </data>
+  <data name="WIFI_SECURITY_TYPE_WPA2PSK" xml:space="preserve">
+    <value>WPA2 PSK</value>
+  </data>
+  <data name="WIFI_PASSWORD" xml:space="preserve">
+    <value>Password</value>
+  </data>
+</root>
diff --git a/Oobe/Oobe.Common/Styles/ButtonStyles.cs b/Oobe/Oobe.Common/Styles/ButtonStyles.cs
deleted file mode 100644 (file)
index 3406137..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Oobe.Common.Utils;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace Oobe.Common.Styles
-{
-    public class ButtonStyles
-    {
-        private static ButtonStyle next = GetNextButtonStyle();
-
-        private static ButtonStyle previous = GetPreviousButtonStyle();
-
-        private static ButtonStyle skip = GetSkipButtonStyle();
-
-        public static ButtonStyle Next { get => next; }
-
-        public static ButtonStyle Previous { get => previous; }
-
-        public static ButtonStyle Skip { get => skip; }
-
-        private static ButtonStyle GetPreviousButtonStyle() => new ButtonStyle
-        {
-            BackgroundImage = new Selector<string>
-            {
-                Normal = NUIApplication.Current.DirectoryInfo.Resource + "button/02_butt_2_empty_action.png",
-                Pressed = NUIApplication.Current.DirectoryInfo.Resource + "button/02_butt_2_empty_pressed.png",
-                Disabled = NUIApplication.Current.DirectoryInfo.Resource + "button/02_butt_2_empty_disabled.png",
-            },
-            Text = new TextLabelStyle
-            {
-                PixelSize = new Selector<float?>
-                {
-                    Normal = SpUtils.ToPixels(32.0f),
-                    Pressed = SpUtils.ToPixels(34.0f),
-                },
-                EnableMarkup = true,
-                TranslatableText = "PREVIOUS",
-                TextColor = new Selector<Color>
-                {
-                    Normal = new Color(0.0f, 20.0f / 255.0f, 71 / 255.0f, 1.0f),
-                    Pressed = new Color(41.0f / 255.0f, 91.0f / 255.0f, 178 / 255.0f, 1.0f),
-                },
-                FontFamily = GetNavigationFont(),
-            },
-            Size2D = SpUtils.ToPixels(new Size2D(342, 104)),
-        };
-
-        private static ButtonStyle GetSkipButtonStyle()
-        {
-            var style = GetNextButtonStyle();
-            style.Text.TranslatableText = "SKIP";
-            return style;
-        }
-
-        private static ButtonStyle GetNextButtonStyle() => new ButtonStyle
-        {
-            BackgroundImage = new Selector<string>
-            {
-                Normal = NUIApplication.Current.DirectoryInfo.Resource + "button/02_CTA_empty_active.svg",
-                Pressed = NUIApplication.Current.DirectoryInfo.Resource + "button/02_CTA_empty_selected.svg",
-                Disabled = NUIApplication.Current.DirectoryInfo.Resource + "button/02_CTA_empty_disabled.svg",
-            },
-            Text = new TextLabelStyle
-            {
-                PixelSize = new Selector<float?>
-                {
-                    Normal = SpUtils.ToPixels(32.0f),
-                    Pressed = SpUtils.ToPixels(34.0f),
-                },
-                TextColor = Color.White,
-                TranslatableText = "CONTINUE",
-                FontFamily = GetNavigationFont(),
-            },
-            Size2D = SpUtils.ToPixels(new Size2D(342, 104)),
-        };
-
-        private static Selector<string> GetNavigationFont()
-        {
-            return new Selector<string>
-            {
-                Normal = "BreezeSans",
-            };
-        }
-    }
-}
diff --git a/Oobe/Oobe.Common/Styles/ButtonsExtensions.cs b/Oobe/Oobe.Common/Styles/ButtonsExtensions.cs
deleted file mode 100644 (file)
index 144cecc..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace Oobe.Common.Styles
-{
-    public static class ButtonsExtensions
-    {
-        public static PropertyMap GetFontStyle(this Button button)
-        {
-            // workaround for limitation of settings FontStyle of button text
-            // throught TextLabelStyle class
-            foreach (View child in button.Children)
-            {
-                if (child is TextLabel label)
-                {
-                    return label.FontStyle;
-                }
-            }
-
-            return null;
-        }
-
-        public static void SetFontStyle(this Button button, PropertyMap map)
-        {
-            // workaround for limitation of settings FontStyle of button text
-            // throught TextLabelStyle class
-            foreach (View child in button.Children)
-            {
-                if (child is TextLabel label)
-                {
-                    label.FontStyle = map;
-                    break;
-                }
-            }
-        }
-    }
-}
index 90acecf..862f5aa 100644 (file)
@@ -18,7 +18,6 @@ using Oobe.Common.Controls;
 using Oobe.Common.Utils;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
 
 namespace Oobe.Common.Styles
 {
index 8356ccb..23db12f 100644 (file)
@@ -54,7 +54,5 @@ namespace Oobe.Common.Utils
                 return (textLabel.LineCount - 1) * textLabel.SizeHeight / textLabel.LineCount;
             }
         }
-
-
     }
-}
\ No newline at end of file
+}
diff --git a/Oobe/Oobe.Common/ViewModels/BasePageViewModel.cs b/Oobe/Oobe.Common/ViewModels/BasePageViewModel.cs
new file mode 100644 (file)
index 0000000..cec9faa
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Windows.Input;
+using Oobe.Common.Styles;
+using Tizen.NUI;
+
+namespace Oobe.Common.ViewModels
+{
+    public partial class BasePageViewModel : BaseViewModel
+    {
+        private const string hdBackgroundFile = "hd_whitebg.9.png";
+        private const string fhdBackgroundFile = "fhd_whitebg.9.png";
+        private const string uhdBackgroundFile = "uhd_whitebg.9.png";
+
+        public BasePageViewModel()
+        {
+            SetTheme("Regular");
+            SetBackground();
+            ConfigureTitle();
+            ConfigureButtons();
+        }
+
+        public ICommand CommandNext { get; set; }
+
+        public ICommand CommandBack { get; set; }
+
+        public ICommand CommandStart { get; set; }
+
+        private string nextButtonStyle { get; set; }
+
+        public string NextButtonStyle
+        {
+            get => nextButtonStyle;
+            set
+            {
+                if (nextButtonStyle != value)
+                {
+                    nextButtonStyle = value;
+                    RaisePropertyChanged();
+                }
+            }
+        }
+
+        public string PreviousButtonStyle { get; private set; }
+
+        public string StartButtonStyle { get; private set; }
+
+        public PropertyMap TitleFontStyle { get; private set; }
+
+        public string TitleTranslatableText { get; set; }
+
+        public PropertyMap ViewBackground { get; private set; }
+
+        private bool isNextButtonEnabled = true;
+
+        public bool IsNextButtonEnabled
+        {
+            get => isNextButtonEnabled;
+            set
+            {
+                if (isNextButtonEnabled != value)
+                {
+                    isNextButtonEnabled = value;
+                    RaisePropertyChanged();
+                }
+            }
+        }
+
+        private void ConfigureTitle()
+        {
+            TitleFontStyle = new PropertyMap().AddLightFontStyle();
+        }
+
+        private void ConfigureButtons()
+        {
+            NextButtonStyle = "NextButton";
+            PreviousButtonStyle = "PreviousButton";
+            StartButtonStyle = "StartButton";
+        }
+
+        private void SetBackground()
+        {
+            var visualMap = new NPatchVisual();
+            visualMap.URL = GetBackgroundUrl();
+            ViewBackground = visualMap.OutputVisualMap;
+        }
+
+        private string GetBackgroundUrl()
+        {
+            string filename = hdBackgroundFile;
+            int biggerEdge = Math.Max(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height);
+            if (biggerEdge > 3000)
+            {
+                filename = fhdBackgroundFile;
+            }
+            else if (biggerEdge < 1500)
+            {
+                filename = uhdBackgroundFile;
+            }
+
+            string bgUrl = NUIApplication.Current.DirectoryInfo.Resource + $"page/{filename}";
+            return bgUrl;
+        }
+
+        private void SetTheme(string name)
+        {
+            ThemeManager.ApplyTheme(new Theme(NUIApplication.Current.DirectoryInfo.Resource + $"theme/{name}Theme.xaml"));
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/ViewModels/BaseViewModel.cs b/Oobe/Oobe.Common/ViewModels/BaseViewModel.cs
new file mode 100644 (file)
index 0000000..802e775
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+
+namespace Oobe.Common.ViewModels
+{
+    public abstract class BaseViewModel : INotifyPropertyChanged
+    {
+        public event PropertyChangedEventHandler PropertyChanged;
+
+        public void BackButtonPressed()
+        {
+            OnBackButtonPressed();
+        }
+
+        /// <summary>
+        /// Raises PropertyChanged event.
+        /// </summary>
+        protected void RaisePropertyChanged([CallerMemberName] string propertyName = null)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+        }
+
+        /// <summary>
+        /// Called when back button is pressed.
+        /// </summary>
+        protected virtual void OnBackButtonPressed()
+        {
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Views/AddNewNetworkPupupView.cs b/Oobe/Oobe.Common/Views/AddNewNetworkPupupView.cs
new file mode 100644 (file)
index 0000000..3286ecc
--- /dev/null
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Oobe.Common.Styles;
+using Oobe.Common.Utils;
+using Oobe.Common.Views.Extensions;
+using Tizen.Network.WiFi;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.System;
+
+namespace Oobe.Common.Views
+{
+    public partial class AddNewNetworkPupupView : View
+    {
+        public Action OnDismiss;
+        private WifiUISecurityType currentSecurityType;
+        private TapGestureDetector securityTypeDetector;
+
+        public AddNewNetworkPupupView()
+        {
+            InitializeComponent();
+            ConfigureFonts();
+            ConfigureSize();
+
+            CancelButton.Relayout += (s, e) => { Title.Margin = new Extents(0, 0, (ushort)(40 - (TextUtils.GetFontSizeScale(SystemSettings.FontSize) * 16)), 0); };
+            SsidEntry.TextChanged += (s, e) => AddButton.IsEnabled = SsidEntry.Text.Length > 0;
+            Reveal.Clicked += (s, e) => PassEntry.Revealed = !PassEntry.Revealed;
+            securityTypeDetector = new TapGestureDetector();
+            securityTypeDetector.Detected += (s, e) => OpenSecurityTypePopup();
+            securityTypeDetector.Attach(SecurityTypeView);
+            CancelButton.Clicked += (s, e) => OnDismiss?.Invoke();
+            AddButton.Clicked += async (s, e) => await СonnectingToNetwork();
+
+            ResetViewTo(WifiUISecurityType.None);
+        }
+
+        private void ConfigureFonts()
+        {
+            Title.FontStyle = new PropertyMap().AddLightFontStyle();
+            SsidEntry.FontStyle = new PropertyMap().AddRegularFontStyle();
+            SecurityTypeLabel.FontStyle = new PropertyMap().AddRegularFontStyle();
+            FailurePassLabel.FontStyle = new PropertyMap().AddRegularFontStyle();
+            FailureSsidLabel.FontStyle = new PropertyMap().AddRegularFontStyle();
+
+            Title.FontSizeScale = FontSizeScale.UseSystemSetting;
+            SsidEntry.FontSizeScale = FontSizeScale.UseSystemSetting;
+            FailurePassLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
+            FailureSsidLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
+            PassEntry.FontSizeScale = FontSizeScale.UseSystemSetting;
+            SecurityTypeLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
+        }
+
+        private void OpenSecurityTypePopup()
+        {
+            var view = new ChangeSecurityTypePopupView(currentSecurityType);
+            var popup = new Oobe.Common.Utils.Popup(view, backgroundOpacity: 0f, centered: true);
+            view.PositionY = SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? -28 : 0);
+            view.OnDismiss += () =>
+            {
+                ResetViewTo(view.WifiUISecurityType);
+                popup.Dismiss();
+            };
+            popup.Show();
+        }
+
+        private void ResetViewTo(WifiUISecurityType securityType)
+        {
+            Tizen.Log.Debug("oobe", $"Reseting view to {securityType.GetUIName()}");
+            FailureSsidLabel.Hide();
+            ResetPassword();
+            currentSecurityType = securityType;
+            SecurityTypeLabel.TranslatableText = securityType.GetUIName();
+            switch (securityType)
+            {
+                case WifiUISecurityType.None:
+                    ResetViewToNoPassword();
+                    break;
+                case WifiUISecurityType.EAP:
+                case WifiUISecurityType.WEP:
+                case WifiUISecurityType.WPAPSK:
+                case WifiUISecurityType.WPA2PSK:
+                    ResetViewToPasswordOnly();
+                    break;
+                default:
+                    throw new NotImplementedException($"UI for Security type {securityType.GetUIName()} was not implemented");
+            }
+        }
+
+        private void ResetViewToPasswordOnly()
+        {
+            ContextView.Size = SpUtils.ToPixels(new Size2D(ScreenSizeUtils.IsPortrait ? 1016 : 1184, ScreenSizeUtils.IsPortrait ? 250 : 270));
+            Size = SpUtils.ToPixels(new Size2D(ScreenSizeUtils.IsPortrait ? 1016 : 1184, 547));
+            ContextView.Add(EntryPassView);
+        }
+
+        private void ResetViewToNoPassword()
+        {
+            EntryPassView.Unparent();
+            ContextView.Unparent();
+            ButtonsView.Unparent();
+            Size = SpUtils.ToPixels(new Size2D(ScreenSizeUtils.IsPortrait ? 1016 : 1184, ScreenSizeUtils.IsPortrait ? 459 : 456));
+            ContextView.Size = SpUtils.ToPixels(new Size2D(ScreenSizeUtils.IsPortrait ? 1016 : 1184, 228));
+            Add(ContextView);
+            Add(ButtonsView);
+        }
+
+        private void ResetPassword()
+        {
+            PassEntry.Revealed = false;
+            PassEntry.Text = string.Empty;
+            FailurePassLabel.Hide();
+        }
+
+        private async Task СonnectingToNetwork()
+        {
+            Tizen.Log.Debug("oobe", $"Scanning for SSID = {SsidEntry.Text}");
+            IEnumerable<WiFiAP> aps = null;
+            try
+            {
+                await WiFiManager.ScanSpecificAPAsync(SsidEntry.Text);
+                aps = WiFiManager.GetFoundSpecificAPs();
+                Tizen.Log.Debug("oobe", $"Found {aps.Count()} potential APs");
+            }
+            catch
+            {
+                FailurePassLabel.Show();
+                return;
+            }
+
+            bool success = false;
+            if (aps is null || aps.Count() == 0)
+            {
+                FailureSsidLabel.Show();
+                return;
+            }
+
+            foreach (var wifiAp in aps)
+            {
+                string message = $"Trying to add new network: SSID: " +
+                    $"{wifiAp.NetworkInformation.Bssid} ({wifiAp.NetworkInformation.Essid}), " +
+                    $"Password: {(PassEntry is null ? "not set" : "XXXXXXXX")}, " +
+                    $"Security type: {currentSecurityType.GetUIName()}";
+                Tizen.Log.Debug("oobe", message);
+                wifiAp.SecurityInformation.SecurityType = currentSecurityType.GetApSecurityType();
+                if (!(PassEntry is null))
+                {
+                    wifiAp.SecurityInformation.SetPassphrase(PassEntry.Password);
+                }
+
+                Task<bool> task = null;
+                try
+                {
+                    var orginal_task = wifiAp.ConnectAsync();
+                    task = orginal_task as Task<bool>;
+                }
+                catch (Exception connectionException)
+                {
+                    string errorMessage = $"Failed to connect to WiFI {wifiAp.NetworkInformation.Bssid} ({wifiAp.NetworkInformation.Essid})" +
+                        $"Password: {(PassEntry is null ? "not set" : "XXXXXXXX")}, " +
+                        $"Security type: {currentSecurityType.GetUIName()} " +
+                        connectionException.Message;
+                    Tizen.Log.Error("oobe", errorMessage);
+                    continue;
+                }
+
+                if (task is null)
+                {
+                    Tizen.Log.Error("oobe", "Failed to cast connection task");
+                    OnDismiss?.Invoke();
+                    continue;
+                }
+
+                try
+                {
+                    if (await task)
+                    {
+                        success = true;
+                        break;
+                    }
+                }
+                catch (Exception connectionException)
+                {
+                    string errorMessage = $"Failed to connect to WiFI {wifiAp.NetworkInformation.Bssid} ({wifiAp.NetworkInformation.Essid})" +
+                        $"Password: {(PassEntry is null ? "not set" : "XXXXXXXX")}, " +
+                        $"Security type: {currentSecurityType.GetUIName()} " +
+                        connectionException.Message;
+                    Tizen.Log.Error("oobe", errorMessage);
+                    continue;
+                }
+            }
+
+            if (success)
+            {
+                OnDismiss?.Invoke();
+            }
+            else
+            {
+                FailurePassLabel.Show();
+            }
+        }
+
+        private void ConfigureSize()
+        {
+            var userScale = TextUtils.GetFontSizeScale(SystemSettings.FontSize);
+            PassEntry.Size = SpUtils.ToPixels(new Size(ScreenSizeUtils.IsPortrait ? 860 : 1028, userScale * 27));
+            SsidEntry.Size = SpUtils.ToPixels(new Size(ScreenSizeUtils.IsPortrait ? 856 : 1024, userScale * 27));
+            Reveal.Size = SpUtils.ToPixels(new Size(userScale * 48, userScale * 48));
+            EntryPassView.Margin = new Extents(0, 0, (ushort)SpUtils.ToPixels(80 - (userScale * 32)), 0);
+            SecurityTypeView.SizeHeight = SpUtils.ToPixels(userScale * 27);
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Views/BasePage.xaml.cs b/Oobe/Oobe.Common/Views/BasePage.xaml.cs
new file mode 100644 (file)
index 0000000..ce24015
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Oobe.Common.Styles;
+using Oobe.Common.Utils;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace Oobe.Common.Views
+{
+    public partial class BasePage : View
+    {
+        public BasePage(int titleTopMargin = 0, bool isAbsolutePosition = false)
+        {
+            InitializeComponent();
+            TitleConfiguration(titleTopMargin);
+
+            if (ScreenSizeUtils.IsPortrait)
+            {
+                Buttons.Margin = new Extents((ushort)SpUtils.ToPixels(64), (ushort)SpUtils.ToPixels(64), 0, (ushort)SpUtils.ToPixels(80));
+            }
+
+            if (isAbsolutePosition)
+            {
+                FlexLayout.SetFlexPositionType(Content, FlexLayout.PositionType.Absolute);
+                Content.HeightSpecification = LayoutParamPolicies.MatchParent;
+            }
+
+            Buttons.Relayout += (s, e) =>
+            {
+                float agreeLabelExtraSizeHeight = ScreenSizeUtils.GetExtraSizeHeight(Title);
+                Title.Margin = new Extents(0, 0, (ushort)(titleTopMargin - (agreeLabelExtraSizeHeight > 0 ? Title.SizeHeight / 2 : 0)), 0);
+            };
+        }
+
+        private void TitleConfiguration(int topMargin)
+        {
+            float agreeLabelExtraSizeHeight = ScreenSizeUtils.GetExtraSizeHeight(Title);
+            Title.Margin = new Extents(0, 0, (ushort)topMargin, 0);
+            Title.FontStyle = new PropertyMap().AddLightFontStyle();
+            Title.FontSizeScale = FontSizeScale.UseSystemSetting;
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Views/ChangeSecurityTypePopupView.cs b/Oobe/Oobe.Common/Views/ChangeSecurityTypePopupView.cs
new file mode 100644 (file)
index 0000000..2205266
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using Oobe.Common.Controls;
+using Oobe.Common.Styles;
+using Oobe.Common.Views.Extensions;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Oobe.Common.Views
+{
+    public partial class ChangeSecurityTypePopupView : View
+    {
+        public Action OnDismiss;
+
+        public WifiUISecurityType WifiUISecurityType { get; private set; }
+
+        private WifiUISecurityType originalWifUISecurityType;
+        private RadioButtonGroup radioButtonGroup = new RadioButtonGroup();
+
+        public ChangeSecurityTypePopupView(WifiUISecurityType currentSecurityType)
+        {
+            originalWifUISecurityType = currentSecurityType;
+            InitializeComponent();
+
+            CreateOptions();
+
+            Title.FontSizeScale = FontSizeScale.UseSystemSetting;
+            Title.FontStyle = new PropertyMap().AddLightFontStyle();
+            ListView.Context.Padding = new Extents(0, 40, 0, 0);
+            OkButton.Clicked += (o, e) => OnDismiss?.Invoke();
+
+            CancelButton.Clicked += (s, e) =>
+            {
+                WifiUISecurityType = originalWifUISecurityType;
+                OnDismiss?.Invoke();
+            };
+        }
+
+        private void CreateOptions()
+        {
+            foreach (WifiUISecurityType type in Enum.GetValues(WifiUISecurityType.GetType()))
+            {
+                var view = new SecurityTypeView(type);
+                view.Activated += () => WifiUISecurityType = view.WifiUISecurityType;
+                radioButtonGroup.Add(view.RadioButton);
+                ListView.Context.Add(view);
+
+                if (originalWifUISecurityType == type)
+                {
+                    view.RadioButton.IsSelected = true;
+                    view.RadioButton.SetSelectionProgramatically(true);
+                }
+            }
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Views/Extensions/ComponentSizeExtension.cs b/Oobe/Oobe.Common/Views/Extensions/ComponentSizeExtension.cs
new file mode 100644 (file)
index 0000000..016ffb0
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using Oobe.Common.Utils;
+using Tizen.NUI;
+using Tizen.NUI.Xaml;
+
+namespace Oobe.Common.Views.Extensions
+{
+    /// <summary>
+    /// Converts Components's Size by edge screen ratio.
+    /// </summary>
+    public class ComponentSizeExtension : IMarkupExtension
+    {
+        /// <summary>
+        /// Gets or sets the width.
+        /// </summary>
+        public int Width { get; set; }
+
+        /// <summary>
+        /// Gets or sets the height.
+        /// </summary>
+        public int Height { get; set; }
+
+        /// <summary>
+        /// Gets or sets the portrait width.
+        /// </summary>
+        public int WidthPortrait { get; set; }
+
+        /// <summary>
+        /// Gets or sets the portrait height.
+        /// </summary>
+        public int HeightPortrait { get; set; }
+
+        public bool ChangeOnPortraitMode { get; set; }
+
+        public object ProvideValue(IServiceProvider serviceProvider)
+        {
+            if (ScreenSizeUtils.IsPortrait && ChangeOnPortraitMode)
+            {
+                return new Size(SpUtils.ToPixels(WidthPortrait), SpUtils.ToPixels(HeightPortrait));
+            }
+
+            return new Size(SpUtils.ToPixels(Width), SpUtils.ToPixels(Height));
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Views/Extensions/ExtentsExtension.cs b/Oobe/Oobe.Common/Views/Extensions/ExtentsExtension.cs
new file mode 100644 (file)
index 0000000..315ebec
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using Oobe.Common.Utils;
+using Tizen.NUI;
+using Tizen.NUI.Xaml;
+
+namespace Oobe.Common.Views.Extensions
+{
+    public class ExtentsExtension : IMarkupExtension
+    {
+        public int Start { get; set; }
+
+        public int End { get; set; }
+
+        public int Top { get; set; }
+
+        public int Bottom { get; set; }
+
+        public object ProvideValue(IServiceProvider serviceProvider)
+        {
+            return new Extents(
+                (ushort)SpUtils.ToPixels(Start),
+                (ushort)SpUtils.ToPixels(End),
+                (ushort)SpUtils.ToPixels(Top),
+                (ushort)SpUtils.ToPixels(Bottom));
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Views/Extensions/FontSizeExtension.cs b/Oobe/Oobe.Common/Views/Extensions/FontSizeExtension.cs
new file mode 100644 (file)
index 0000000..f1bbfc4
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using Oobe.Common.Utils;
+using Tizen.NUI;
+using Tizen.NUI.Xaml;
+using Tizen.System;
+
+namespace Oobe.Common.Views.Extensions
+{
+    /// <summary>
+    /// Converts Components's FontSize by edge screen ratio or/and dpi.
+    /// </summary>
+    public class FontSizeExtension : IMarkupExtension
+    {
+        /// <summary>
+        /// Gets or sets the value.
+        /// </summary>
+        public int Value { get; set; }
+
+        public bool UseDpi { get; set; }
+
+        public object ProvideValue(IServiceProvider serviceProvider)
+        {
+            return UseDpi ? SpUtils.ToPixels(Value * GetEmUnit() * 72 / Window.Instance.Dpi.X) : SpUtils.ToPixels((float)Value);
+        }
+
+        private float GetEmUnit()
+        {
+            switch (SystemSettings.FontSize)
+            {
+                case SystemSettingsFontSize.Small: return 0.8333f;
+                case SystemSettingsFontSize.Normal: return 1f;
+                case SystemSettingsFontSize.Large: return 1.5f;
+                case SystemSettingsFontSize.Huge: return 1.9f;
+                case SystemSettingsFontSize.Giant: return 2.5f;
+                default: return 1f;
+            }
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Views/Extensions/PaddingExtension.cs b/Oobe/Oobe.Common/Views/Extensions/PaddingExtension.cs
new file mode 100644 (file)
index 0000000..73fc097
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using Oobe.Common.Utils;
+using Tizen.NUI;
+using Tizen.NUI.Xaml;
+
+namespace Oobe.Common.Views.Extensions
+{
+    public class PaddingExtension : IMarkupExtension
+    {
+        public int Start { get; set; }
+
+        public int End { get; set; }
+
+        public int Top { get; set; }
+
+        public int Bottom { get; set; }
+
+        public object ProvideValue(IServiceProvider serviceProvider)
+        {
+            return new Extents((ushort)Start, (ushort)End, (ushort)Top, (ushort)Bottom);
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Views/Extensions/Size2DExtension.cs b/Oobe/Oobe.Common/Views/Extensions/Size2DExtension.cs
new file mode 100644 (file)
index 0000000..ee9365b
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using Oobe.Common.Utils;
+using Tizen.NUI;
+using Tizen.NUI.Xaml;
+
+namespace Oobe.Common.Views.Extensions
+{
+    public class Size2DExtension : IMarkupExtension
+    {
+        public int Width { get; set; }
+
+        public int Height { get; set; }
+
+        public object ProvideValue(IServiceProvider serviceProvider)
+        {
+            return SpUtils.ToPixels(new Size2D((int)(ScreenSizeUtils.GetFootnoteFontSizeScaleMaxLarge() * Width), (int)(ScreenSizeUtils.GetFootnoteFontSizeScaleMaxLarge() * Height)));
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Views/Extensions/WifiUISecurityTypeExtensions.cs b/Oobe/Oobe.Common/Views/Extensions/WifiUISecurityTypeExtensions.cs
new file mode 100644 (file)
index 0000000..524f15d
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using Tizen.Network.Connection;
+
+namespace Oobe.Common.Views.Extensions
+{
+    public enum WifiUISecurityType
+    {
+        None,
+        EAP,
+        WEP,
+        WPAPSK,
+        WPA2PSK,
+    }
+
+    public static class WifiUISecurityTypeExtensions
+    {
+        public static string GetUIName(this WifiUISecurityType type)
+        {
+            switch (type)
+            {
+                case WifiUISecurityType.None: return "WIFI_SECURITY_TYPE_OPEN";
+                case WifiUISecurityType.EAP: return "WIFI_SECURITY_TYPE_EAP";
+                case WifiUISecurityType.WEP: return "WIFI_SECURITY_TYPE_WEP";
+                case WifiUISecurityType.WPAPSK: return "WIFI_SECURITY_TYPE_WPAPSK";
+                case WifiUISecurityType.WPA2PSK: return "WIFI_SECURITY_TYPE_WPA2PSK";
+                default:
+                    throw new ArgumentException("Unknown security type");
+            }
+        }
+
+        public static WiFiSecurityType GetApSecurityType(this WifiUISecurityType type)
+        {
+            switch (type)
+            {
+                case WifiUISecurityType.None: return WiFiSecurityType.None;
+                case WifiUISecurityType.EAP: return WiFiSecurityType.Eap;
+                case WifiUISecurityType.WEP: return WiFiSecurityType.Wep;
+                case WifiUISecurityType.WPAPSK: return WiFiSecurityType.WpaPsk;
+                case WifiUISecurityType.WPA2PSK: return WiFiSecurityType.Wpa2Psk;
+                default:
+                    throw new ArgumentException("Unknown security type");
+            }
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Views/TermsView.cs b/Oobe/Oobe.Common/Views/TermsView.cs
new file mode 100644 (file)
index 0000000..35f87b4
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using Oobe.Common.Styles;
+using Oobe.Common.Utils;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+using Tizen.System;
+
+namespace Oobe.Common.Views
+{
+    public partial class TermsView : View
+    {
+        private TapGestureDetector tapGestureDetector;
+
+        public TermsView(string terms, Action<bool> action)
+        {
+            tapGestureDetector = new TapGestureDetector();
+            InitializeComponent();
+            ConfigureFonts();
+            ConfigureSize();
+
+            GuideLabel.Relayout += (s, e) => { AgreeCheckBox.PositionY -= ScreenSizeUtils.GetExtraSizeHeight(AgreeLabel); };
+            TermsLabel.Text = terms;
+
+            Scroller.Scrollbar = new Scrollbar(ScrollbarStyles.Default);
+            Scroller.Scrolling += (object sender, ScrollEventArgs args) =>
+             {
+                 if (AgreeCheckBox.IsEnabled)
+                 {
+                     return;
+                 }
+
+                 if (args.ScrollPosition.Y >= TermsLabel.SizeHeight - Scroller.Scrollbar.SizeHeight - 1.0f)
+                 {
+                     AgreeLabel.TextColor = new Color(0, 20.0f / 255.0f, 71.0f / 255.0f, 1.0f);
+                     AgreeCheckBox.IsEnabled = true;
+
+                     tapGestureDetector.Detected += (object source, TapGestureDetector.DetectedEventArgs e) =>
+                     {
+                         if (e.TapGesture.Type == Gesture.GestureType.Tap)
+                         {
+                             AgreeCheckBox.IsSelected = !AgreeCheckBox.IsSelected;
+                         }
+                     };
+                     tapGestureDetector.Attach(AgreeLabel);
+                 }
+             };
+
+            AgreeCheckBox.ControlStateChangedEvent += (object sender, ControlStateChangedEventArgs e) =>
+            {
+                if (e.CurrentState.Contains(ControlState.Selected) != e.PreviousState.Contains(ControlState.Selected))
+                {
+                    action?.Invoke(AgreeCheckBox.IsSelected);
+                }
+            };
+            Bounding.HeightSpecification = LayoutParamPolicies.MatchParent;
+        }
+
+        private void ConfigureFonts()
+        {
+            GuideLabel.FontStyle = new PropertyMap().AddRegularFontStyle();
+            AgreeLabel.FontStyle = new PropertyMap().AddRegularFontStyle();
+
+            TermsLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
+            GuideLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
+            AgreeLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
+        }
+
+        private void ConfigureSize()
+        {
+            var userScale = TextUtils.GetFontSizeScale(SystemSettings.FontSize);
+            float h2 = (48 * userScale) + (ScreenSizeUtils.IsPortrait ? 72 : 63);
+            float h1 = (48 * userScale) + 55;
+            int bounding_height = (int)((ScreenSizeUtils.IsPortrait ? 1616 : 776) - h2 - h1);
+
+            Bounding.Size = SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? new Size2D(824, bounding_height) : new Size2D(1664, bounding_height));
+            Footnote.SizeWidth = SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? 680 : 1520);
+            Linear.CellPadding = SpUtils.ToPixels(new Size2D(20, 20));
+            AgreeCheckBox.Size2D = SpUtils.ToPixels(new Size2D((int)(userScale * 24), (int)(userScale * 24)));
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Views/WifiPasswordPopupView.cs b/Oobe/Oobe.Common/Views/WifiPasswordPopupView.cs
new file mode 100644 (file)
index 0000000..96d70d0
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Threading.Tasks;
+using Oobe.Common.Resources.Wifi;
+using Oobe.Common.Styles;
+using Oobe.Common.Utils;
+using Tizen.Network.WiFi;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.System;
+
+namespace Oobe.Common.Views
+{
+    public partial class WifiPasswordPopupView : View
+    {
+        public Action OnDismiss;
+        private const int MinPasswordLength = 8;
+        private bool isConnecting = false;
+
+        public WifiPasswordPopupView(WiFiAP wifiAp)
+        {
+            InitializeComponent();
+
+            Relayout += WifiPasswordPopup_Relayout;
+            ConfigureSize();
+            ConfigureFonts();
+
+            Title.Text = string.Format(Translations.WIFI_ENTER_PASSWORD_TO_JOIN, wifiAp.NetworkInformation.Essid);
+            ConnectionFailure.Hide();
+
+            Entry.TextChanged += (s, e) => UpdateOKButton();
+            Reveal.Clicked += (s, e) => TogglePasswordVisibility();
+            CancelButton.Clicked += (s, e) => OnDismiss.Invoke();
+
+            OkButton.Clicked += async (s, e) =>
+            {
+                isConnecting = true;
+                UpdateOKButton();
+                try
+                {
+                    Tizen.Log.Debug("oobe", $"connecting to wifi {wifiAp.NetworkInformation.Essid} with password {"XXXXXXXX"}");
+                    wifiAp.SecurityInformation.SetPassphrase(Entry.Password);
+                    var task = wifiAp.ConnectAsync();
+                    await task;
+                    if (task.Status == TaskStatus.Faulted)
+                    {
+                        throw task.Exception;
+                    }
+                    else
+                    {
+                        OnDismiss.Invoke();
+                    }
+                }
+                catch (Exception ex)
+                {
+                    Tizen.Log.Error("oobe", $"{ex.ToString()}");
+                    ConnectionFailure.Show();
+                }
+                finally
+                {
+                    isConnecting = false;
+                    UpdateOKButton();
+                }
+            };
+        }
+
+        private void ConfigureFonts()
+        {
+            Title.FontStyle = new PropertyMap().AddRegularFontStyle();
+            Entry.FontStyle = new PropertyMap().AddRegularFontStyle();
+            ConnectionFailure.FontStyle = new PropertyMap().AddRegularFontStyle();
+
+            Title.FontSizeScale = FontSizeScale.UseSystemSetting;
+            Entry.FontSizeScale = FontSizeScale.UseSystemSetting;
+            ConnectionFailure.FontSizeScale = FontSizeScale.UseSystemSetting;
+        }
+
+        private void UpdateOKButton()
+        {
+            OkButton.IsEnabled = (Entry.Password.Length >= MinPasswordLength) && (isConnecting == false);
+        }
+
+        private void TogglePasswordVisibility()
+        {
+            Entry.Revealed = !Entry.Revealed;
+        }
+
+        private void WifiPasswordPopup_Relayout(object sender, EventArgs e)
+        {
+            float popupTitleExtraSizeHeight = ScreenSizeUtils.GetExtraSizeHeight(Title);
+            if (popupTitleExtraSizeHeight > 0)
+            {
+                Relayout -= WifiPasswordPopup_Relayout;
+            }
+
+            SizeHeight += popupTitleExtraSizeHeight;
+        }
+
+        private void ConfigureSize()
+        {
+            var userScale = TextUtils.GetFontSizeScale(SystemSettings.FontSize);
+            Size = SpUtils.ToPixels(new Size(ScreenSizeUtils.IsPortrait ? 1016 : 1184, ScreenSizeUtils.IsPortrait ? 356 + (48 * userScale) : 353 + (48 * userScale)));
+            Reveal.Size = SpUtils.ToPixels(new Size(userScale * 48, userScale * 48));
+            Entry.Size = SpUtils.ToPixels(new Size(680, userScale * 27));
+            Reveal.Margin = new Extents(0, 0, 0, (ushort)SpUtils.ToPixels(userScale * 8));
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/Views/WifiView.cs b/Oobe/Oobe.Common/Views/WifiView.cs
new file mode 100644 (file)
index 0000000..e822f0e
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using Oobe.Common.Styles;
+using Oobe.Common.Utils;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.System;
+
+namespace Oobe.Common.Views
+{
+    public partial class WifiView : View
+    {
+        public WifiView(bool state)
+        {
+            InitializeComponent();
+
+            Progress.Size = SpUtils.ToPixels(new Size(TextUtils.GetFontSizeScale(SystemSettings.FontSize) * 25, TextUtils.GetFontSizeScale(SystemSettings.FontSize) * 26));
+            Scan.Relayout += (s, e) => { ListView.SizeHeight = ScreenSizeUtils.IsPortrait ? SpUtils.ToPixels(780) : SizeHeight - TopPanel.SizeHeight - 10; };
+
+            ConfigureFonts();
+            ScanningAnimation();
+            FinishScan();
+
+            if (state)
+            {
+                TurnOn(state);
+            }
+            else
+            {
+                TurnOff("WIFI_TURN_ON_WIFI", state);
+            }
+        }
+
+        public void TurnOn(bool state)
+        {
+            ListView.CreateFooter();
+            PromptView.Hide();
+            ListView.Show();
+            Scan.IsEnabled = state;
+            WifiOff.IsSelected = state;
+        }
+
+        public void TurnOff(string message, bool state)
+        {
+            ListView.Hide();
+            Prompt.TranslatableText = message;
+            PromptView.Show();
+            Scan.IsEnabled = state;
+            WifiOff.IsSelected = state;
+        }
+
+        public void StartScan()
+        {
+            WifiLabel.Hide();
+            WifiScanningPlaceHolder.Show();
+        }
+
+        public void FinishScan()
+        {
+            WifiScanningPlaceHolder.Hide();
+            WifiLabel.Show();
+        }
+
+        private void ConfigureFonts()
+        {
+            WifiLabel.FontStyle = new PropertyMap().AddRegularFontStyle();
+            ScanningLabel.FontStyle = new PropertyMap().AddRegularFontStyle();
+            Prompt.FontStyle = new PropertyMap().AddRegularFontStyle();
+
+            ScanningLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
+            WifiLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
+        }
+
+        private void ScanningAnimation()
+        {
+            Animation animation = null;
+            Progress.VisibilityChanged += (s, e) =>
+            {
+                if (e.Visibility == false)
+                {
+                    animation?.Stop();
+                    animation?.Clear();
+                    animation?.Dispose();
+                    animation = null;
+                    Progress.Orientation = new Rotation(new Radian(new Degree(0)), new Vector3(0, 0, -1));
+                }
+                else if (animation == null)
+                {
+                    animation = new Animation(1_000);
+                    animation.Looping = true;
+                    animation.AnimateTo(Progress, "Orientation", new Rotation(new Radian(new Degree(180)), new Vector3(0, 0, -1)), new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear));
+                    animation.Play();
+                }
+            };
+        }
+    }
+}
diff --git a/Oobe/Oobe.Common/res/button/02_butt_2_empty_action.svg b/Oobe/Oobe.Common/res/button/02_butt_2_empty_action.svg
new file mode 100644 (file)
index 0000000..4f40809
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- Generator: Gravit.io --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="0 0 240 72" width="240pt" height="72pt"><defs><clipPath id="_clipPath_nbhFBGvVkBNMvUci8kbOPOT3v1v0mQgF"><rect width="240" height="72"/></clipPath></defs><g clip-path="url(#_clipPath_nbhFBGvVkBNMvUci8kbOPOT3v1v0mQgF)"><path d="M 28 0 L 212 0 C 227.454 0 240 12.546 240 28 L 240 44 C 240 59.454 227.454 72 212 72 L 28 72 C 12.546 72 0 59.454 0 44 L 0 28 C 0 12.546 12.546 0 28 0 Z" style="stroke:none;fill:#FFFFFF;stroke-miterlimit:10;"/><clipPath id="_clipPath_CTzoHZ7WtdCX4Qis1L5i5osYmUq7vECh"><path d="M 28 0 L 212 0 C 227.454 0 240 12.546 240 28 L 240 44 C 240 59.454 227.454 72 212 72 L 28 72 C 12.546 72 0 59.454 0 44 L 0 28 C 0 12.546 12.546 0 28 0 Z" style="stroke:none;fill:#FFFFFF;stroke-miterlimit:10;"/></clipPath><g clip-path="url(#_clipPath_CTzoHZ7WtdCX4Qis1L5i5osYmUq7vECh)"><path d="M 28 1 L 212 1 C 226.902 1 239 13.098 239 28 L 239 44 C 239 58.902 226.902 71 212 71 L 28 71 C 13.098 71 1 58.902 1 44 L 1 28 C 1 13.098 13.098 1 28 1 Z" style="fill:none;stroke:#0A0E4A;stroke-width:2;stroke-miterlimit:2;"/></g></g></svg>
\ No newline at end of file
diff --git a/Oobe/Oobe.Common/res/button/02_butt_2_empty_disabled.svg b/Oobe/Oobe.Common/res/button/02_butt_2_empty_disabled.svg
new file mode 100644 (file)
index 0000000..bd4f629
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- Generator: Gravit.io --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="0 0 240 72" width="240pt" height="72pt"><defs><clipPath id="_clipPath_mnF8FmjufQYcrQME4NRb7XSvTv7Sndnj"><rect width="240" height="72"/></clipPath></defs><g clip-path="url(#_clipPath_mnF8FmjufQYcrQME4NRb7XSvTv7Sndnj)"><path d="M 28 0 L 212 0 C 227.454 0 240 12.546 240 28 L 240 44 C 240 59.454 227.454 72 212 72 L 28 72 C 12.546 72 0 59.454 0 44 L 0 28 C 0 12.546 12.546 0 28 0 Z" style="stroke:none;fill:#FFFFFF;stroke-miterlimit:10;"/><clipPath id="_clipPath_03r5ZqdslIDab6rT3yG4MChpWd2FtBA6"><path d="M 28 0 L 212 0 C 227.454 0 240 12.546 240 28 L 240 44 C 240 59.454 227.454 72 212 72 L 28 72 C 12.546 72 0 59.454 0 44 L 0 28 C 0 12.546 12.546 0 28 0 Z" style="stroke:none;fill:#FFFFFF;stroke-miterlimit:10;"/></clipPath><g clip-path="url(#_clipPath_03r5ZqdslIDab6rT3yG4MChpWd2FtBA6)"><path d="M 28 1 L 212 1 C 226.902 1 239 13.098 239 28 L 239 44 C 239 58.902 226.902 71 212 71 L 28 71 C 13.098 71 1 58.902 1 44 L 1 28 C 1 13.098 13.098 1 28 1 Z" style="fill:none;stroke:#C3CAD2;stroke-width:2;stroke-miterlimit:2;"/></g></g></svg>
\ No newline at end of file
diff --git a/Oobe/Oobe.Common/res/button/02_butt_2_empty_pressed.svg b/Oobe/Oobe.Common/res/button/02_butt_2_empty_pressed.svg
new file mode 100644 (file)
index 0000000..b472d23
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- Generator: Gravit.io --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="0 0 240 72" width="240pt" height="72pt"><defs><clipPath id="_clipPath_4Ot7tcxoCYRmO085hyIwPdsrOaBNEmMJ"><rect width="240" height="72"/></clipPath></defs><g clip-path="url(#_clipPath_4Ot7tcxoCYRmO085hyIwPdsrOaBNEmMJ)"><path d="M 28 0 L 212 0 C 227.454 0 240 12.546 240 28 L 240 44 C 240 59.454 227.454 72 212 72 L 28 72 C 12.546 72 0 59.454 0 44 L 0 28 C 0 12.546 12.546 0 28 0 Z" style="stroke:none;fill:#FFFFFF;stroke-miterlimit:10;"/><clipPath id="_clipPath_HUrORK8rEuTNp1PTEsy0ApifwGJ1cvpK"><path d="M 28 0 L 212 0 C 227.454 0 240 12.546 240 28 L 240 44 C 240 59.454 227.454 72 212 72 L 28 72 C 12.546 72 0 59.454 0 44 L 0 28 C 0 12.546 12.546 0 28 0 Z" style="stroke:none;fill:#FFFFFF;stroke-miterlimit:10;"/></clipPath><g clip-path="url(#_clipPath_HUrORK8rEuTNp1PTEsy0ApifwGJ1cvpK)"><path d="M 28 1 L 212 1 C 226.902 1 239 13.098 239 28 L 239 44 C 239 58.902 226.902 71 212 71 L 28 71 C 13.098 71 1 58.902 1 44 L 1 28 C 1 13.098 13.098 1 28 1 Z" style="fill:none;stroke:#2B5FB9;stroke-width:2;stroke-miterlimit:2;"/></g></g></svg>
\ No newline at end of file
diff --git a/Oobe/Oobe.Common/res/examl/Oobe.Common.Views.TermsXamlView.examl b/Oobe/Oobe.Common/res/examl/Oobe.Common.Views.TermsXamlView.examl
new file mode 100644 (file)
index 0000000..706ccd2
--- /dev/null
@@ -0,0 +1,213 @@
+(d0d  ("Oobe.Common, " ))
+(d0d  ("Tizen.NUI, " ))
+(d0d  ("Tizen.NUI.Components, " ))
+(d1d  (d0d "Oobe.Common.Views.TermsXamlView"))
+(d1d  (d1d "Tizen.NUI.BaseComponents.View"))
+(d1d  (d1d "Tizen.NUI.FlexLayout"))
+(d1d  (d1d "Tizen.NUI.ResizePolicyType"))
+(d1d  (d1d "Tizen.NUI.BaseComponents.LayoutParamPolicies"))
+(d1d  (d0d "Oobe.Common.Views.Extensions.ExtentsExtension"))
+(d1d  (d1d "Tizen.NUI.LinearLayout"))
+(d1d  (d0d "Oobe.Common.Views.Extensions.FontSizeExtension"))
+(d1d  (d1d "Tizen.NUI.BaseComponents.TextLabel"))
+(d1d  (d2d "Tizen.NUI.Components.ScrollableBase"))
+(d1d  (d2d "Tizen.NUI.Components.CheckBox"))
+(d1d  (d2d "Tizen.NUI.Components.Button"))
+(d1d  (d1d "Tizen.NUI.FlexLayout+AlignmentType"))
+(d1d  (d1d "Tizen.NUI.FlexLayout+FlexDirection"))
+(d1d  (d1d "Tizen.NUI.FlexLayout+FlexJustification"))
+(d1d  (d1d "Tizen.NUI.Binding.Vector4TypeConverter"))
+(d1d  (d1d "Tizen.NUI.Vector4"))
+(d1d  (d1d "Tizen.NUI.Binding.ColorTypeConverter"))
+(d1d  (d1d "Tizen.NUI.Color"))
+(d1d  (d1d "Tizen.NUI.LineWrapMode"))
+(d1d  (d1d "Tizen.NUI.LinearLayout+Orientation"))
+(d1d  (d1d "Tizen.NUI.LinearLayout+Alignment"))
+(d1d  (d1d "Tizen.NUI.HorizontalAlignment"))
+(d2d  (d1d  "HeightResizePolicy" ))
+(d2d  (d1d  "WidthResizePolicy" ))
+(d2d  (d1d  "HeightSpecification" ))
+(d2d  (d1d  "Layout" ))
+(d2d  (d5d  "Top" ))
+(d2d  (d2d  "Direction" ))
+(d2d  (d2d  "Justification" ))
+(d2d  (d5d  "Start" ))
+(d2d  (d5d  "End" ))
+(d2d  (d5d  "Bottom" ))
+(d2d  (d7d  "Value" ))
+(d2d  (d8d  "TextColor" ))
+(d2d  (d8d  "LineWrapMode" ))
+(d2d  (d1d  "BackgroundColor" ))
+(d2d  (d8d  "EnableMarkup" ))
+(d2d  (d1d  "Focusable" ))
+(d2d  (d8d  "MultiLine" ))
+(d2d  (d9d  "HideScrollbar" ))
+(d2d  (d1d  "CornerRadius" ))
+(d2d  (d6d  "LinearOrientation" ))
+(d2d  (d6d  "LinearAlignment" ))
+(d2d  (d11d  "IsSelected" ))
+(d2d  (d11d  "IsEnabled" ))
+(d2d  (d1d  "StyleName" ))
+(d2d  (d8d  "Ellipsis" ))
+(d2d  (d8d  "TranslatableText" ))
+(d2d  (d8d  "HorizontalAlignment" ))
+(d4d  (d1d  "Add"  (d1d  )))
+(d4d  (d9d  "Add"  (d1d  )))
+(d5d  (d2d  "FlexAlignmentSelfProperty" ))
+(d5d  (d1d  "PaddingProperty" ))
+(d5d  (d8d  "PixelSizeProperty" ))
+(d5d  (d2d  "FlexShrinkProperty" ))
+(d5d  (d1d  "MarginProperty" ))
+(d6d  (d0d  d-1d ))
+(d9d  (d3d  zz  "FillToParent" ))
+(d9d  (d3d  zz  "FillToParent" ))
+(d9d  (d4d  zz  "MatchParent" ))
+(d6d  (d5d  d-1d ))
+(d6d  (d2d  d-1d ))
+(d9d  (d3d  zz  "FillToParent" ))
+(d6d  (d5d  d-1d ))
+(d6d  (d5d  d-1d ))
+(d6d  (d6d  d-1d ))
+(d9d  (d3d  zz  "FillToParent" ))
+(d6d  (d5d  d-1d ))
+(d6d  (d6d  d-1d ))
+(d9d  (d3d  zz  "FillToParent" ))
+(d6d  (d7d  d-1d ))
+(d6d  (d8d  d-1d ))
+(d6d  (d1d  d-1d ))
+(d6d  (d9d  d-1d ))
+(d6d  (d1d  d-1d ))
+(d6d  (d5d  d-1d ))
+(d6d  (d5d  d-1d ))
+(d6d  (d6d  d-1d ))
+(d6d  (d5d  d-1d ))
+(d6d  (d10d  d-1d ))
+(d6d  (d6d  d-1d ))
+(d6d  (d7d  d-1d ))
+(d9d  (d3d  zz  "FillToParent" ))
+(d6d  (d8d  d-1d ))
+(d6d  (d7d  d-1d ))
+(d9d  (d3d  zz  "FillToParent" ))
+(d6d  (d8d  d-1d ))
+(d6d  (d1d  d-1d ))
+(d6d  (d1d  d-1d ))
+(d23d  (a5a  "BaseLayout" ))
+(d23d  (a18a  "Bounding" ))
+(d23d  (a17a  "Scroller" ))
+(d23d  (a16a  "ScrollerView" ))
+(d23d  (a15a  "TermsLabel" ))
+(d23d  (a21a  "Linear" ))
+(d23d  (a23a  "AgreeCheckBox" ))
+(d23d  (a31a  "Footnote" ))
+(d23d  (a27a  "GuideLabel" ))
+(d23d  (a30a  "AgreeLabel" ))
+(d12d  (d12d  "Stretch" ))
+(d15d  (d0d  d0d  a33a ))
+(d14d  (d0d  d0d  a1a ))
+(d14d  (d0d  d1d  a2a ))
+(d14d  (d0d  d2d  a3a ))
+(d14d  (d4d  d4d  d22d ))
+(d15d  (d0d  d1d  a4a ))
+(d12d  (d13d  "Column" ))
+(d14d  (d5d  d5d  a34a ))
+(d12d  (d14d  "SpaceBetween" ))
+(d14d  (d5d  d6d  a35a ))
+(d14d  (d0d  d3d  a5a ))
+(d6d  (d15d  d-1d ))
+(d11d  (a36a  "25" ))
+(d14d  (d18d  d18d  a37a ))
+(d6d  (d17d  d-1d ))
+(d11d  (a38a  "White" ))
+(d14d  (d18d  d13d  a39a ))
+(d15d  (d18d  d3d  j1j ))
+(d14d  (d18d  d1d  a6a ))
+(d14d  (d7d  d7d  d64d ))
+(d14d  (d7d  d8d  d64d ))
+(d15d  (d18d  d4d  a7a ))
+(d14d  (d8d  d4d  d26d ))
+(d14d  (d8d  d9d  d26d ))
+(d15d  (d18d  d1d  a8a ))
+(d14d  (d18d  d3d  a9a ))
+(d14d  (d17d  d17d  mFalsem ))
+(d14d  (d17d  d1d  a10a ))
+(d12d  (d3d  "FillToParent" ))
+(d14d  (d17d  d0d  a40a ))
+(d12d  (d3d  "FillToParent" ))
+(d14d  (d16d  d1d  a41a ))
+(d12d  (d3d  "FillToParent" ))
+(d14d  (d16d  d0d  a42a ))
+(d11d  (a38a  "#FFFFFF" ))
+(d14d  (d16d  d13d  a43a ))
+(d14d  (d11d  d7d  d40d ))
+(d14d  (d11d  d8d  d40d ))
+(d15d  (d16d  d1d  a11a ))
+(d14d  (d16d  d3d  a12a ))
+(d11d  (a38a  "#001447" ))
+(d14d  (d15d  d11d  a44a ))
+(d12d  (d19d  "Word" ))
+(d14d  (d15d  d12d  a45a ))
+(d11d  (a38a  "#FFFFFF" ))
+(d14d  (d15d  d13d  a46a ))
+(d14d  (d15d  d14d  mTruem ))
+(d14d  (d15d  d15d  mFalsem ))
+(d14d  (d15d  d16d  mTruem ))
+(d12d  (d3d  "FillToParent" ))
+(d14d  (d15d  d0d  a47a ))
+(d14d  (d15d  d1d  a13a ))
+(d14d  (d14d  d10d  d29d ))
+(d15d  (d15d  d2d  a14a ))
+(d19d  (d16d  a15a  d0d ))
+(d19d  (d17d  a16a  d1d ))
+(d19d  (d18d  a17a  d0d ))
+(d19d  (d0d  a18a  d0d ))
+(d12d  (d3d  "FillToParent" ))
+(d14d  (d32d  d1d  a48a ))
+(d15d  (d32d  d3d  j0j ))
+(d14d  (d19d  d4d  d24d ))
+(d14d  (d19d  d9d  d24d ))
+(d15d  (d32d  d4d  a19a ))
+(d14d  (d20d  d7d  d90d ))
+(d14d  (d20d  d8d  d64d ))
+(d15d  (d32d  d1d  a20a ))
+(d12d  (d20d  "Horizontal" ))
+(d14d  (d21d  d19d  a49a ))
+(d12d  (d21d  "Bottom" ))
+(d14d  (d21d  d20d  a50a ))
+(d14d  (d32d  d3d  a21a ))
+(d14d  (d23d  d21d  mFalsem ))
+(d14d  (d23d  d22d  mFalsem ))
+(d14d  (d23d  d23d  "CheckBox" ))
+(d14d  (d22d  d9d  d2d ))
+(d15d  (d23d  d4d  a22a ))
+(d19d  (d32d  a23a  d0d ))
+(d12d  (d20d  "Vertical" ))
+(d14d  (d24d  d19d  a51a ))
+(d12d  (d21d  "Bottom" ))
+(d14d  (d24d  d20d  a52a ))
+(d14d  (d31d  d3d  a24a ))
+(d14d  (d25d  d10d  d18d ))
+(d15d  (d27d  d2d  a25a ))
+(d14d  (d27d  d24d  mFalsem ))
+(d12d  (d19d  "Word" ))
+(d14d  (d27d  d12d  a53a ))
+(d14d  (d27d  d16d  mTruem ))
+(d14d  (d27d  d1d  a26a ))
+(d11d  (a38a  "#707070" ))
+(d14d  (d27d  d11d  a54a ))
+(d14d  (d27d  d25d  "YOU_MUST_SCROLL_DOWN_AND_READ_THE_WHOLE_TEXT_ABOVE" ))
+(d19d  (d31d  a27a  d0d ))
+(d14d  (d28d  d10d  d22d ))
+(d15d  (d30d  d2d  a28a ))
+(d14d  (d30d  d24d  mFalsem ))
+(d12d  (d19d  "Word" ))
+(d14d  (d30d  d12d  a55a ))
+(d14d  (d30d  d16d  mTruem ))
+(d14d  (d30d  d1d  a29a ))
+(d12d  (d22d  "Begin" ))
+(d14d  (d30d  d26d  a56a ))
+(d11d  (a38a  "#707070" ))
+(d14d  (d30d  d11d  a57a ))
+(d14d  (d30d  d25d  "I_HAVE_READ_AND_AGREE_TO_TERMS_AND_CONDITIONS" ))
+(d19d  (d31d  a30a  d0d ))
+(d19d  (d32d  a31a  d0d ))
+(d19d  (d0d  a32a  d0d ))
diff --git a/Oobe/Oobe.Common/res/layout/AddNewNetworkPupupView.xaml b/Oobe/Oobe.Common/res/layout/AddNewNetworkPupupView.xaml
new file mode 100644 (file)
index 0000000..5b97c80
--- /dev/null
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Oobe.Common.Views.AddNewNetworkPupupView"
+      xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+      xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
+      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+      xmlns:ext="clr-namespace:Oobe.Common.Views.Extensions"
+      xmlns:ctrl="clr-namespace:Oobe.Common.Controls"
+      xmlns:nui="clr-namespace:Tizen.NUI.Components;assembly=Tizen.NUI.Components"
+      BackgroundImage="*Resource*/wifi/08_popup_body.png"
+      HeightResizePolicy="Fixed"
+      Size="{ext:ComponentSize Width=1184, Height=456, WidthPortrait=1016, HeightPortrait=459, ChangeOnPortraitMode=true}"
+      Padding="{ext:Extents Bottom=40}" >
+    <View.Layout>
+        <FlexLayout Justification="SpaceBetween" />
+    </View.Layout>
+
+    <TextLabel x:Name="Title"
+               FlexLayout.FlexAlignmentSelf="Center"
+               PixelSize="{ext:FontSize Value=40}"
+               TextColor="#001447"
+               FlexLayout.FlexShrink="0"
+               FontFamily="BreezeSans"
+               TranslatableText="WIFI_ADD_NETWORK"
+               HorizontalAlignment="Center"
+               VerticalAlignment="Top" />
+    <View x:Name="ContextView"
+          Margin="{ext:Extents Bottom=10}"
+          Padding="{ext:Extents Start=80, End=80}">
+        
+        <View.Layout>
+            <FlexLayout Direction="Column" Justification="Center"/>
+        </View.Layout>
+
+        <TextField x:Name="SsidEntry"
+                   MaxLength="63"
+                   FlexLayout.FlexShrink="0"
+                   PixelSize="{ext:FontSize Value=22}"
+                   Size="{ext:ComponentSize Width=1024, Height=27, WidthPortrait=856, HeightPortrait=27, ChangeOnPortraitMode=true}"
+                   TextColor="#000C2B"
+                   FontFamily="BreezeSans"
+                   TranslatablePlaceholderText="WIFI_SSID" />
+
+
+        <View BackgroundColor="#C3CAD2"
+              Size="{ext:ComponentSize Width=1024, Height=1, WidthPortrait=856, HeightPortrait=1, ChangeOnPortraitMode=true}" />
+
+        <TextLabel x:Name="FailureSsidLabel"
+                   FlexLayout.FlexAlignmentSelf="FlexStart"
+                   PixelSize="{ext:FontSize Value=12}"
+                   TextColor="#AA1818"
+                   FontFamily="BreezeSans"
+                   VerticalAlignment="Center"
+                   TranslatableText="WIFI_SSID_FAILURE" />
+
+        <View x:Name="SecurityTypeView"
+              Margin="{ext:Extents Top=10}"
+              Size="{ext:ComponentSize Width=1024, Height=27, WidthPortrait=856, HeightPortrait=27, ChangeOnPortraitMode=true}">
+
+            <View.Layout>
+                <FlexLayout Direction="Row" Justification="SpaceBetween" />
+            </View.Layout>
+
+            <TextLabel x:Name="SecurityTypeLabel"
+                       FlexLayout.FlexAlignmentSelf="Center"
+                       WidthResizePolicy="FillToParent"
+                       PixelSize="{ext:FontSize Value=22}"
+                       TextColor="#001447"
+                       FontFamily="BreezeSans"
+                       TranslatableText="WIFI_ADD_NETWORK"
+                       HorizontalAlignment="Begin" />
+
+            <View x:Name="SecurityTypeButton" 
+                  BackgroundImage="*Resource*/wifi/12_back_active.png" 
+                  FlexLayout.FlexAlignmentSelf="Center" />
+        </View>
+
+        <View x:Name="EntryPassView" 
+              HeightResizePolicy="FitToChildren"
+              FlexLayout.FlexAlignmentSelf="Stretch"
+              WidthSpecification="MatchParent">
+            <View.Layout>
+                <FlexLayout Direction="Row" Justification="SpaceBetween" />
+            </View.Layout>
+
+            <View FlexLayout.FlexAlignmentSelf="Center"
+                  WidthSpecification="MatchParent"
+                  Margin="{ext:Extents Top=24}">
+                <View.Layout>
+                    <FlexLayout Direction="Column" />
+                </View.Layout>
+
+                <ctrl:PasswordEntry x:Name="PassEntry"
+                                    FlexLayout.FlexShrink="0"
+                                    MaxLength="63"
+                                    PixelSize="{ext:FontSize Value=22}"
+                                    TextColor="#000C2B"
+                                    FontFamily="BreezeSans"
+                                    Revealed="False"
+                                    TranslatablePlaceholderText="WIFI_PASSWORD" />
+
+                
+                <View BackgroundColor="#C3CAD2"
+                      Margin="{ext:Extents Top=2}"
+                      Size="{ext:ComponentSize Width=1024, Height=1, WidthPortrait=856, HeightPortrait=1, ChangeOnPortraitMode=true}" />
+
+                <TextLabel x:Name="FailurePassLabel"
+                       FlexLayout.FlexAlignmentSelf="Center"
+                       PixelSize="{ext:FontSize Value=12}"
+                       TextColor="#AA1818"
+                       FontFamily="BreezeSans"
+                       VerticalAlignment="Center"
+                       TranslatableText="WIFI_INVALID_PASSWORD" />
+            </View>
+
+            <Button x:Name="Reveal" 
+                StyleName="Reveal"
+                FlexLayout.FlexAlignmentSelf="Center"
+                IsSelectable="True"
+                Size="{ext:ComponentSize Width=48, Height=48}" />
+        </View>
+    </View>
+
+    <View Margin="{ext:Extents Start=80, End=80}"
+          x:Name="ButtonsView"
+          WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+        <View.Layout>
+            <FlexLayout Direction="Row" Justification="SpaceBetween" />
+        </View.Layout>
+
+        <Button x:Name="CancelButton"
+                StyleName="Cancel"
+                PointSize="{ext:FontSize Value=22, UseDpi=true}"
+                Command="{Binding CommandBack}"  
+                Size="{ext:ComponentSize Width=318, Height=96}" />
+
+        <Button x:Name="AddButton"
+                StyleName="Add"
+                PointSize="{ext:FontSize Value=22, UseDpi=true}"
+                Size="{ext:ComponentSize Width=318, Height=96}" 
+                IsEnabled="False" />
+    </View>
+</View>
+
diff --git a/Oobe/Oobe.Common/res/layout/BasePage.xaml b/Oobe/Oobe.Common/res/layout/BasePage.xaml
new file mode 100644 (file)
index 0000000..cc98385
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<View xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
+      xmlns:nui="clr-namespace:Tizen.NUI.Components;assembly=Tizen.NUI.Components"
+      x:Class="Oobe.Common.Views.BasePage"
+      xmlns:vm="clr-namespace:Oobe.Common.ViewModels"
+      xmlns:ctrl="clr-namespace:Oobe.Common.Controls"
+      xmlns:ext="clr-namespace:Oobe.Common.Views.Extensions"
+      HeightResizePolicy="{Static ResizePolicyType.FillToParent}" 
+      WidthResizePolicy="{Static ResizePolicyType.FillToParent}"
+      Background="{Binding ViewBackground}">
+
+    <View WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+          HeightSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+        <View.Layout>
+            <FlexLayout Justification="SpaceBetween" />
+        </View.Layout>
+
+        <TextLabel x:Name="Title"
+                   TextColor="#001447"
+                   HorizontalAlignment="Center"
+                   VerticalAlignment="Bottom"
+                   WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+                   Ellipsis="False"
+                   LineWrapMode="Word"
+                   MultiLine="True"
+                   FlexLayout.FlexShrink="0"
+                   TranslatableText="{Binding TitleTranslatableText}"
+                   StyleName="{Binding TitleStyle}"
+                   FontFamily="BreezeSans"
+                   PixelSize="{ext:FontSize Value=40}"            
+                   FontStyle="{Binding TitleFontStyle}" />
+
+        <View x:Name="Content"
+              WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+            <View.Layout>
+                <FlexLayout Alignment="Stretch" Justification="Center" />
+            </View.Layout>
+        </View>
+
+        <View x:Name="Buttons" Margin="{ext:Extents Start=104, End=104, Bottom=80}"
+              WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+            <View.Layout>
+                <FlexLayout Direction="Row" Justification="SpaceBetween" Alignment="Center" />
+            </View.Layout>
+
+            <ctrl:CustomButton StyleName="{Binding PreviousButtonStyle}"
+                               PointSize="{ext:FontSize Value=32, UseDpi=true}"
+                               Command="{Binding CommandBack}"                             
+                               Size="{ext:ComponentSize Width=342, Height=104}"
+                               FlexLayout.FlexShrink="1" />
+
+            <ctrl:CustomButton StyleName="{Binding StartButtonStyle}"
+                               PointSize="{ext:FontSize Value=32}"
+                               Command="{Binding CommandStart}"
+                               Size="{ext:ComponentSize Width=342, Height=104}"
+                               FlexLayout.FlexShrink="1" />
+
+            <ctrl:CustomButton StyleName="{Binding NextButtonStyle}"
+                               PointSize="{ext:FontSize Value=32, UseDpi=true}"
+                               Command="{Binding CommandNext}"
+                               Size="{ext:ComponentSize Width=342, Height=104}" 
+                               IsEnabled="{Binding IsNextButtonEnabled}" 
+                               FlexLayout.FlexShrink="1" />
+        </View>
+    </View>
+</View>
+    
\ No newline at end of file
diff --git a/Oobe/Oobe.Common/res/layout/ChangeSecurityTypePopupView.xaml b/Oobe/Oobe.Common/res/layout/ChangeSecurityTypePopupView.xaml
new file mode 100644 (file)
index 0000000..cb0cfdf
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Oobe.Common.Views.ChangeSecurityTypePopupView"
+      xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+      xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
+      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+      xmlns:ext="clr-namespace:Oobe.Common.Views.Extensions"
+      xmlns:ctrl="clr-namespace:Oobe.Common.Controls"
+      xmlns:nui="clr-namespace:Tizen.NUI.Components;assembly=Tizen.NUI.Components"
+      BackgroundImage="*Resource*/wifi/08_popup_body.png"
+      Size="{ext:ComponentSize Width=1184, Height=632, WidthPortrait=1016, HeightPortrait=632, ChangeOnPortraitMode=true}"
+      Padding="{ext:Extents Top=40, Bottom=40}" >
+    
+    <View.Layout>
+        <FlexLayout Justification="SpaceBetween" />
+    </View.Layout>
+
+    <TextLabel x:Name="Title"
+               FlexLayout.FlexAlignmentSelf="Center"
+               PixelSize="{ext:FontSize Value=40}"
+               TextColor="#001447"
+               TranslatableText="WIFI_CHOOSE_SECURITY_TYPE"
+               FontFamily="BreezeSans"
+               HorizontalAlignment="Center"
+               VerticalAlignment="Center" />
+
+    <View x:Name="EntryView" 
+          HeightResizePolicy="FitToChildren"
+          FlexLayout.FlexAlignmentSelf="Stretch"
+          WidthSpecification="MatchParent">
+        <View.Layout>
+            <FlexLayout Direction="Column" Justification="SpaceBetween" />
+        </View.Layout>
+
+        <ctrl:ListView x:Name="ListView" 
+                           FlexLayout.FlexAlignmentSelf="Center"
+                           Size="{ext:ComponentSize Width=1024, Height=324, WidthPortrait=856, HeightPortrait=324, ChangeOnPortraitMode=true}"
+                           HideScrollbar="False">
+        </ctrl:ListView>
+    </View>
+
+    <View Margin="{ext:Extents Start=80, End=80}"
+          WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+        <View.Layout>
+            <FlexLayout Direction="Row" Justification="SpaceBetween" />
+        </View.Layout>
+
+        <Button x:Name="CancelButton"
+                StyleName="Cancel"
+                PointSize="{ext:FontSize Value=22, UseDpi=true}"
+                Command="{Binding CommandBack}"  
+                Size="{ext:ComponentSize Width=318, Height=96}" />
+
+        <Button x:Name="OkButton"
+                StyleName="WifiOk"
+                PointSize="{ext:FontSize Value=22, UseDpi=true}"
+                Size="{ext:ComponentSize Width=318, Height=96}" />
+    </View>
+</View>
+
diff --git a/Oobe/Oobe.Common/res/layout/TermsView.xaml b/Oobe/Oobe.Common/res/layout/TermsView.xaml
new file mode 100644 (file)
index 0000000..8bfbc81
--- /dev/null
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Oobe.Common.Views.TermsView"
+      xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+      xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
+      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+      xmlns:ext="clr-namespace:Oobe.Common.Views.Extensions"
+      xmlns:ctrl="clr-namespace:Oobe.Common.Controls"
+      xmlns:nui="clr-namespace:Tizen.NUI.Components;assembly=Tizen.NUI.Components"
+      xmlns:base="clr-namespace:Tizen.NUI.BaseComponents;assembly=Tizen.NUI"  
+      FlexLayout.FlexAlignmentSelf="Stretch"   
+      HeightResizePolicy="{Static ResizePolicyType.FillToParent}" 
+      WidthResizePolicy="{Static ResizePolicyType.FillToParent}"
+      HeightSpecification="{Static LayoutParamPolicies.MatchParent}"
+      Padding="{ext:Extents Top=22}">
+    
+    <View.Layout>
+        <FlexLayout x:Name="BaseLayout" Direction="Column" Justification="SpaceBetween"  />
+    </View.Layout>
+
+    <View x:Name="Bounding" CornerRadius="25"
+          BackgroundColor="White"
+          FlexLayout.FlexShrink="1"
+          WidthResizePolicy="{Static ResizePolicyType.FillToParent}"
+          Margin="{ext:Extents Start=64, End=64}"
+          Padding="{ext:Extents Top=26, Bottom=26}">
+        
+        <View.Layout>
+            <LinearLayout />
+        </View.Layout>
+
+        <ScrollableBase x:Name="Scroller"
+                        HideScrollbar="False"
+                        WidthResizePolicy="{Static ResizePolicyType.FillToParent}"
+                        HeightResizePolicy="FillToParent">
+
+            <View x:Name="ScrollerView" 
+                  WidthResizePolicy="FillToParent"
+                  HeightResizePolicy="FillToParent"
+                  BackgroundColor="#FFFFFF"
+                  Padding="{ext:Extents Start=40, End=40}">
+
+                <View.Layout>
+                    <LinearLayout />
+                </View.Layout>
+
+                <TextLabel x:Name="TermsLabel" 
+                           TextColor="#001447"
+                           LineWrapMode="Word"
+                           BackgroundColor="#FFFFFF"
+                           EnableMarkup="True"
+                           Focusable="False"
+                           MultiLine="True"
+                           HeightResizePolicy="FillToParent"
+                           WidthResizePolicy="{Static ResizePolicyType.FillToParent}"
+                           PixelSize="{ext:FontSize Value=29}" />
+            </View>
+        </ScrollableBase>
+    </View>
+
+    <View WidthResizePolicy="FillToParent"
+          FlexLayout.FlexShrink="0"
+          Margin="{ext:Extents Top=24, Bottom=24}"
+          Padding="{ext:Extents Start=90, End=64}">
+
+        <View.Layout>
+            <LinearLayout x:Name="Linear" LinearOrientation="Horizontal"
+                          LinearAlignment="Bottom" />
+        </View.Layout>
+
+        <CheckBox x:Name="AgreeCheckBox"
+                  IsSelected="False"
+                  IsEnabled="False"
+                  StyleName="CheckBox"
+                  Margin="{ext:Extents Bottom=2}" />
+
+        <View x:Name="Footnote">
+            <View.Layout>
+                <LinearLayout LinearOrientation="Vertical"
+                              LinearAlignment="Bottom" />
+            </View.Layout>
+
+            <TextLabel x:Name="GuideLabel"
+                       PixelSize="{ext:FontSize Value=18}"
+                       Ellipsis="False"
+                       LineWrapMode="Word"
+                       MultiLine="True"
+                       WidthResizePolicy="{Static ResizePolicyType.FillToParent}"
+                       TextColor="#707070"
+                       TranslatableText="YOU_MUST_SCROLL_DOWN_AND_READ_THE_WHOLE_TEXT_ABOVE">
+            </TextLabel>
+
+            <TextLabel x:Name="AgreeLabel"
+                       PixelSize="{ext:FontSize Value=22}"
+                       Ellipsis="False"
+                       LineWrapMode="Word"
+                       MultiLine="True"
+                       WidthResizePolicy="{Static ResizePolicyType.FillToParent}"
+                       HorizontalAlignment="Begin"
+                       TextColor="#707070"
+                       TranslatableText="I_HAVE_READ_AND_AGREE_TO_TERMS_AND_CONDITIONS">
+            </TextLabel>
+        </View>
+    </View>
+</View>
diff --git a/Oobe/Oobe.Common/res/layout/WifiPasswordPopupView.xaml b/Oobe/Oobe.Common/res/layout/WifiPasswordPopupView.xaml
new file mode 100644 (file)
index 0000000..f0d0007
--- /dev/null
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Oobe.Common.Views.WifiPasswordPopupView"
+      xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+      xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
+      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+      xmlns:ext="clr-namespace:Oobe.Common.Views.Extensions"
+      xmlns:ctrl="clr-namespace:Oobe.Common.Controls"
+      xmlns:nui="clr-namespace:Tizen.NUI.Components;assembly=Tizen.NUI.Components"
+      BackgroundImage="*Resource*/wifi/08_popup_body.png"
+      Padding="{ext:Extents Top=37, Bottom=37}">
+
+    <View.Layout>
+        <FlexLayout Justification="SpaceBetween" />
+    </View.Layout>
+
+    <TextLabel x:Name="Title"
+               FlexLayout.FlexAlignmentSelf="Center"
+               PixelSize="{ext:FontSize Value=40}"
+               TextColor="#001447"
+               FontFamily="BreezeSans"
+               FlexLayout.FlexShrink="0"
+               WidthResizePolicy="{Static ResizePolicyType.FillToParent}"
+               MultiLine ="True"
+               Margin="{ext:Extents Start=80, End=80}"
+               LineWrapMode="Word"
+               HorizontalAlignment="Center"
+               VerticalAlignment="Center" />
+
+    <View x:Name="EntryView" 
+          HeightResizePolicy="FitToChildren"
+          FlexLayout.FlexAlignmentSelf="Stretch"
+          WidthSpecification="MatchParent"
+          Padding="{ext:Extents Start=80, End=80}">
+        <View.Layout>
+            <FlexLayout Direction="Row" Justification="SpaceBetween" />
+        </View.Layout>
+
+        <View FlexLayout.FlexAlignmentSelf="Center"
+              WidthSpecification="MatchParent"
+              Margin="{ext:Extents Top=24}">
+            <View.Layout>
+                <FlexLayout Direction="Column" />
+            </View.Layout>
+
+            <ctrl:PasswordEntry x:Name="Entry"
+                            MaxLength="63"
+                            PixelSize="{ext:FontSize Value=22}"
+                            Size="{ext:ComponentSize Width=680, Height=27}"
+                            TextColor="#000C2B"
+                            FontFamily="BreezeSans"
+                            Revealed="False"
+                            TranslatablePlaceholderText="WIFI_PASSWORD" />
+
+            <View Size="{ext:ComponentSize Width=1024, Height=1, WidthPortrait=856, HeightPortrait=1, ChangeOnPortraitMode=true}">
+                <View.Layout>
+                    <FlexLayout Direction="Row" Justification="SpaceBetween" />
+                </View.Layout>
+                <View BackgroundColor="#C3CAD2"
+                      Size="{ext:ComponentSize Width=1024, Height=1, WidthPortrait=856, HeightPortrait=1, ChangeOnPortraitMode=true}" />
+            </View>
+            
+            <TextLabel x:Name="ConnectionFailure"
+                       FlexLayout.FlexAlignmentSelf="FlexStart"
+                       PixelSize="{ext:FontSize Value=18}"
+                       TextColor="#AA1818"
+                       FontFamily="BreezeSans"
+                       VerticalAlignment="Center"
+                       TranslatableText="WIFI_INVALID_PASSWORD" />
+        </View>
+
+        <Button x:Name="Reveal" 
+                StyleName="Reveal"
+                FlexLayout.FlexAlignmentSelf="Center"
+                IsSelectable="True" />
+    </View>
+
+    <View Margin="{ext:Extents Start=80, End=80}"
+          WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+        <View.Layout>
+            <FlexLayout Direction="Row" Justification="SpaceBetween" />
+        </View.Layout>
+
+        <Button x:Name="CancelButton"
+                StyleName="Cancel"
+                PointSize="{ext:FontSize Value=22, UseDpi=true}"
+                Command="{Binding CommandBack}"  
+                Size="{ext:ComponentSize Width=320, Height=96}" />
+
+        <Button x:Name="OkButton"
+                StyleName="WifiOk"
+                PointSize="{ext:FontSize Value=22, UseDpi=true}"
+                Size="{ext:ComponentSize Width=320, Height=96}" 
+                IsEnabled="False" />
+    </View>
+</View>
+
diff --git a/Oobe/Oobe.Common/res/layout/WifiView.xaml b/Oobe/Oobe.Common/res/layout/WifiView.xaml
new file mode 100644 (file)
index 0000000..bd29f46
--- /dev/null
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Oobe.Common.Views.WifiView"
+      xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+      xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
+      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+      xmlns:ext="clr-namespace:Oobe.Common.Views.Extensions"
+      xmlns:ctrl="clr-namespace:Oobe.Common.Controls"
+      BackgroundImage="*Resource*/wifi/Rectangle_918.png"
+      FlexLayout.FlexAlignmentSelf="Center"
+      Margin="{ext:Extents Bottom=95, Top=20}"
+      Size="{ext:ComponentSize Width=1080, Height=568, WidthPortrait=824, HeightPortrait=880, ChangeOnPortraitMode=true}"
+      Padding="{ext:Extents Top=5, Bottom=5}">
+
+    <View.Layout>
+        <LinearLayout LinearOrientation="Vertical" />
+    </View.Layout>
+
+    <View x:Name="TopPanel" 
+          Size="{ext:ComponentSize Width=1080, Height=80, WidthPortrait=824, HeightPortrait=80, ChangeOnPortraitMode=true}"
+          Padding="{ext:Extents Start=40, End=40}">
+
+        <View.Layout>
+            <FlexLayout  Direction="Row" Justification="SpaceBetween" />
+        </View.Layout>
+
+        <View FlexLayout.FlexAlignmentSelf="Center">
+
+            <TextLabel x:Name="WifiLabel" 
+                   FontFamily="BreezeSans"
+                   Text="Wi-Fi"          
+                   PixelSize="{ext:FontSize Value=20}"
+                   TextColor="#000C2B" 
+                   FlexLayout.FlexAlignmentSelf="Center" />
+
+            <View x:Name="WifiScanningPlaceHolder">
+                <View.Layout>
+                    <LinearLayout LinearOrientation="Horizontal"/>
+                </View.Layout>
+
+                <View x:Name="Progress"
+                      BackgroundImage="*Resource*/wifi/12_icon_scanning.png"
+                      Margin="{ext:Extents End=16}" />
+
+                <TextLabel x:Name="ScanningLabel"
+                           FontFamily="BreezeSans"
+                           VerticalAlignment="Center"
+                           HorizontalAlignment="Begin"
+                           TranslatableText="WIFI_SCANNING"
+                           PixelSize="{ext:FontSize Value=20}"
+                           TextColor="#000C2B" />
+            </View>
+        </View>
+
+        <View FlexLayout.FlexAlignmentSelf="Center">
+            <View.Layout>
+                <LinearLayout LinearOrientation="Horizontal"/>
+            </View.Layout>
+
+            <Button x:Name="Scan" 
+                    StyleName="Scan"                  
+                    Margin="{ext:Extents End=21}"
+                    Size2D="{ext:Size2D Height=32, Width=72}"/>
+
+            <Button x:Name="WifiOff"
+                    StyleName="WifiOff"
+                    IsSelectable="True"
+                    Size2D="{ext:Size2D Height=32, Width=72}"/>
+        </View>
+    </View>
+
+    <View Padding="{ext:Extents Start=40, End=40}"
+          Size="{ext:ComponentSize Width=1080, Height=1, WidthPortrait=824, HeightPortrait=1, ChangeOnPortraitMode=true}">
+        <View.Layout>
+            <FlexLayout  Direction="Row" Justification="SpaceBetween" />
+        </View.Layout>
+        <View BackgroundColor="#C3CAD2"
+              Size="{ext:ComponentSize Width=1080, Height=1, WidthPortrait=824, HeightPortrait=1, ChangeOnPortraitMode=true}" />
+    </View>
+
+    <View>
+        <ctrl:ListView x:Name="ListView" 
+                       Size="{ext:ComponentSize Width=1080, Height=475, WidthPortrait=824, HeightPortrait=780, ChangeOnPortraitMode=true}"
+                       Margin="{ext:Extents End=5}"
+                       ScrollingDirection="Vertical"
+                       HideScrollbar="False" />
+
+        <View x:Name="PromptView" 
+              Size="{ext:ComponentSize Height=42}"            
+              WidthResizePolicy="FitToChildren"
+              Padding="{ext:Extents Start=40, End=40, Top=21}">
+            <View.Layout>
+                <LinearLayout LinearOrientation="Horizontal" LinearAlignment="Center"/>
+            </View.Layout>
+
+            <TextLabel x:Name="Prompt"
+                       TranslatableText="WIFI_TURN_ON_WIFI"
+                       FontFamily="BreezeSans"
+                       TextColor="#000C2B"
+                       VerticalAlignment="Center"
+                       HorizontalAlignment="Begin" 
+                       PixelSize="{ext:FontSize Value=22}" />
+        </View>
+    </View>
+</View>
diff --git a/Oobe/Oobe.Common/res/switch/07_check_off_active.png b/Oobe/Oobe.Common/res/switch/07_check_off_active.png
new file mode 100644 (file)
index 0000000..48f9485
Binary files /dev/null and b/Oobe/Oobe.Common/res/switch/07_check_off_active.png differ
diff --git a/Oobe/Oobe.Common/res/switch/07_check_off_disabled.png b/Oobe/Oobe.Common/res/switch/07_check_off_disabled.png
new file mode 100644 (file)
index 0000000..9d09cf4
Binary files /dev/null and b/Oobe/Oobe.Common/res/switch/07_check_off_disabled.png differ
diff --git a/Oobe/Oobe.Common/res/switch/07_check_on_active.png b/Oobe/Oobe.Common/res/switch/07_check_on_active.png
new file mode 100644 (file)
index 0000000..6ff251a
Binary files /dev/null and b/Oobe/Oobe.Common/res/switch/07_check_on_active.png differ
diff --git a/Oobe/Oobe.Common/res/theme/RegularTheme.xaml b/Oobe/Oobe.Common/res/theme/RegularTheme.xaml
new file mode 100644 (file)
index 0000000..09b0c40
--- /dev/null
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Theme xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+       xmlns:system="clr-namespace:System;assembly=netstandard"
+       xmlns:xtns="clr-namespace:Oobe.Common.Views.Extensions"
+       xmlns:static="clr-namespace:Oobe.Common.Utils"
+       xmlns:nui="clr-namespace:Tizen.NUI.Components;assembly=Tizen.NUI.Components"
+       xmlns:base="clr-namespace:Tizen.NUI.BaseComponents;assembly=Tizen.NUI">
+
+    <nui:ButtonStyle x:Key="NextButton">
+        <nui:ButtonStyle.Text>
+            <TextLabelStyle TranslatableText="CONTINUE">
+                <TextLabelStyle.FontFamily>
+                    <Selector x:TypeArguments="x:String" Normal="BreezeSans" />
+                </TextLabelStyle.FontFamily>
+            </TextLabelStyle>
+        </nui:ButtonStyle.Text>
+        <nui:ButtonStyle.BackgroundImage>
+            <Selector x:TypeArguments="x:String" 
+                      Normal="*Resource*/button/02_CTA_empty_active.svg" 
+                      Pressed="*Resource*/button/02_CTA_empty_selected.svg" 
+                      Disabled="*Resource*/button/02_CTA_empty_disabled.svg" />
+        </nui:ButtonStyle.BackgroundImage>
+    </nui:ButtonStyle>
+
+    <nui:ButtonStyle x:Key="StartButton">
+        <nui:ButtonStyle.Text>
+            <TextLabelStyle TranslatableText="GET_STARTED">
+                <TextLabelStyle.FontFamily>
+                    <Selector x:TypeArguments="x:String" Normal="BreezeSans" />
+                </TextLabelStyle.FontFamily>
+            </TextLabelStyle>
+        </nui:ButtonStyle.Text>
+        <nui:ButtonStyle.BackgroundImage>
+            <Selector x:TypeArguments="x:String" 
+                      Normal="*Resource*/button/02_CTA_empty_active.svg" 
+                      Pressed="*Resource*/button/02_CTA_empty_selected.svg" 
+                      Disabled="*Resource*/button/02_CTA_empty_disabled.svg" />
+        </nui:ButtonStyle.BackgroundImage>
+    </nui:ButtonStyle>
+
+    <nui:ButtonStyle x:Key="PreviousButton">
+        <nui:ButtonStyle.Text>
+            <TextLabelStyle TranslatableText="PREVIOUS">
+                <TextLabelStyle.TextColor>
+                    <Selector x:TypeArguments="Color" Normal="#001447" Pressed="#2B5FB9" />
+                </TextLabelStyle.TextColor>
+                <TextLabelStyle.FontFamily>
+                    <Selector x:TypeArguments="x:String" Normal="BreezeSans"/>
+                </TextLabelStyle.FontFamily>
+            </TextLabelStyle>
+        </nui:ButtonStyle.Text>
+        <nui:ButtonStyle.BackgroundImage>
+            <Selector x:TypeArguments="x:String" 
+                      Normal="*Resource*/button/02_butt_2_empty_action.svg" 
+                      Pressed="*Resource*/button/02_butt_2_empty_pressed.svg" 
+                      Disabled="*Resource*/button/02_butt_2_empty_disabled.svg" />
+        </nui:ButtonStyle.BackgroundImage>
+    </nui:ButtonStyle>
+
+    <nui:ButtonStyle x:Key="CheckBox" >
+        <nui:ButtonStyle.Icon >
+            <base:ImageViewStyle x:Key="Image" Size="24,24">
+                <base:ImageViewStyle.ResourceUrl>
+                    <Selector x:TypeArguments="x:String" 
+                              Normal="*Resource*/switch/07_check_off_active.png" 
+                              Selected="*Resource*/switch/07_check_on_active.png" 
+                              Disabled="*Resource*/switch/07_check_off_disabled.png"  />
+                </base:ImageViewStyle.ResourceUrl>
+            </base:ImageViewStyle>
+        </nui:ButtonStyle.Icon>
+    </nui:ButtonStyle>
+    
+    <nui:ButtonStyle x:Key="Scan" >
+        <nui:ButtonStyle.BackgroundImage>
+            <Selector x:TypeArguments="x:String" 
+                      Normal="*Resource*/wifi/12_icon_scan.png" 
+                      Pressed="*Resource*/wifi/12_icon_scan_pressed.png" 
+                      Disabled="*Resource*/wifi/12_icon_scan_disabled.png" />
+        </nui:ButtonStyle.BackgroundImage>
+    </nui:ButtonStyle>
+
+    <nui:ButtonStyle x:Key="WifiOff" >
+        <nui:ButtonStyle.BackgroundImage>
+            <Selector x:TypeArguments="x:String" 
+                      Normal="*Resource*/wifi/12_icon_wifioff.png" 
+                      Selected="*Resource*/wifi/12_icon_wifion.png" 
+                      Disabled="*Resource*/wifi/12_icon_wifioff_disabled.png"
+                      DisabledSelected="*Resource*/wifi/12_icon_wifion_disabled.png"/>
+        </nui:ButtonStyle.BackgroundImage>
+    </nui:ButtonStyle>
+
+    <nui:ButtonStyle x:Key="AddWifi" >
+        <nui:ButtonStyle.BackgroundImage>
+            <Selector x:TypeArguments="x:String" 
+                      Normal="*Resource*/wifi/12_icon_addnetwork.png" 
+                      Pressed="*Resource*/wifi/12_icon_addnetwork_pressed.png" />
+        </nui:ButtonStyle.BackgroundImage>
+    </nui:ButtonStyle>
+
+    <nui:ButtonStyle x:Key="Reveal" >
+        <nui:ButtonStyle.BackgroundImage>
+            <Selector x:TypeArguments="x:String" 
+                      Normal="*Resource*/wifi/12_icon_eye_pw_hidden.png" 
+                      Selected="*Resource*/wifi/12_icon_eye_pw_visible.png" />
+        </nui:ButtonStyle.BackgroundImage>
+    </nui:ButtonStyle>
+
+    <nui:ButtonStyle x:Key="Cancel">
+        <nui:ButtonStyle.Text>
+            <TextLabelStyle TranslatableText="WIFI_CANCEL">
+                <TextLabelStyle.TextColor>
+                    <Selector x:TypeArguments="Color" Normal="#001447" Pressed="#2B5FB9" />
+                </TextLabelStyle.TextColor>
+                <TextLabelStyle.FontFamily>
+                    <Selector x:TypeArguments="x:String" Normal="BreezeSans"/>
+                </TextLabelStyle.FontFamily>
+            </TextLabelStyle>
+        </nui:ButtonStyle.Text>
+        <nui:ButtonStyle.BackgroundImage>
+            <Selector x:TypeArguments="x:String" 
+                      Normal="*Resource*/button/02_butt_2_empty_action.svg" 
+                      Pressed="*Resource*/button/02_butt_2_empty_pressed.svg" 
+                      Disabled="*Resource*/button/02_butt_2_empty_disabled.svg" />
+        </nui:ButtonStyle.BackgroundImage>
+    </nui:ButtonStyle>
+
+    <nui:ButtonStyle x:Key="WifiOk">
+        <nui:ButtonStyle.Text>
+            <TextLabelStyle TranslatableText="WIFI_OK">
+                <TextLabelStyle.FontFamily>
+                    <Selector x:TypeArguments="x:String" Normal="BreezeSans" />
+                </TextLabelStyle.FontFamily>
+            </TextLabelStyle>
+        </nui:ButtonStyle.Text>
+        <nui:ButtonStyle.BackgroundImage>
+            <Selector x:TypeArguments="x:String" 
+                      Normal="*Resource*/button/02_CTA_empty_active.svg" 
+                      Pressed="*Resource*/button/02_CTA_empty_selected.svg" 
+                      Disabled="*Resource*/button/02_CTA_empty_disabled.svg" />
+        </nui:ButtonStyle.BackgroundImage>
+    </nui:ButtonStyle>
+
+    <nui:ButtonStyle x:Key="Add">
+        <nui:ButtonStyle.Text>
+            <TextLabelStyle TranslatableText="WIFI_ADD">
+                <TextLabelStyle.FontFamily>
+                    <Selector x:TypeArguments="x:String" Normal="BreezeSans" />
+                </TextLabelStyle.FontFamily>
+            </TextLabelStyle>
+        </nui:ButtonStyle.Text>
+        <nui:ButtonStyle.BackgroundImage>
+            <Selector x:TypeArguments="x:String" 
+                      Normal="*Resource*/button/02_CTA_empty_active.svg" 
+                      Pressed="*Resource*/button/02_CTA_empty_selected.svg" 
+                      Disabled="*Resource*/button/02_CTA_empty_disabled.svg" />
+        </nui:ButtonStyle.BackgroundImage>
+    </nui:ButtonStyle>
+
+    <nui:ButtonStyle x:Key="SkipButton">
+        <nui:ButtonStyle.Text>
+            <TextLabelStyle TranslatableText="SKIP">
+                <TextLabelStyle.FontFamily>
+                    <Selector x:TypeArguments="x:String" Normal="BreezeSans" />
+                </TextLabelStyle.FontFamily>
+            </TextLabelStyle>
+        </nui:ButtonStyle.Text>
+        <nui:ButtonStyle.BackgroundImage>
+            <Selector x:TypeArguments="x:String" 
+                      Normal="*Resource*/button/02_CTA_empty_active.svg" 
+                      Pressed="*Resource*/button/02_CTA_empty_selected.svg" 
+                      Disabled="*Resource*/button/02_CTA_empty_disabled.svg" />
+        </nui:ButtonStyle.BackgroundImage>
+    </nui:ButtonStyle>
+
+</Theme>
diff --git a/Oobe/Oobe.Common/res/wifi/07_radiobutton_off_active.svg b/Oobe/Oobe.Common/res/wifi/07_radiobutton_off_active.svg
new file mode 100644 (file)
index 0000000..bb4b05d
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- Generator: Gravit.io --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="0 0 26 26" width="26pt" height="26pt"><defs><clipPath id="_clipPath_shqrHl7A8C6WULOq3ggGOFIefxW0np6O"><rect width="26" height="26"/></clipPath></defs><g clip-path="url(#_clipPath_shqrHl7A8C6WULOq3ggGOFIefxW0np6O)"><path d=" M 13 24.5 C 9.928 24.5 7.04 23.304 4.868 21.132 C 2.696 18.96 1.5 16.072 1.5 13 C 1.5 9.928 2.696 7.04 4.868 4.868 C 7.04 2.696 9.928 1.5 13 1.5 C 16.072 1.5 18.96 2.696 21.132 4.868 C 23.304 7.04 24.5 9.928 24.5 13 C 24.5 16.072 23.304 18.96 21.132 21.132 C 18.96 23.304 16.072 24.5 13 24.5 Z " fill="rgb(255,255,255)"/><path d=" M 13 2 C 10.062 2 7.299 3.144 5.222 5.222 C 3.144 7.299 2 10.062 2 13 C 2 15.938 3.144 18.701 5.222 20.778 C 7.299 22.856 10.062 24 13 24 C 15.938 24 18.701 22.856 20.778 20.778 C 22.856 18.701 24 15.938 24 13 C 24 10.062 22.856 7.299 20.778 5.222 C 18.701 3.144 15.938 2 13 2 Z  M 13 1 C 19.627 1 25 6.373 25 13 C 25 19.627 19.627 25 13 25 C 6.373 25 1 19.627 1 13 C 1 6.373 6.373 1 13 1 Z " fill="rgb(195,202,210)"/></g></svg>
\ No newline at end of file
diff --git a/Oobe/Oobe.Common/res/wifi/07_radiobutton_on_active.svg b/Oobe/Oobe.Common/res/wifi/07_radiobutton_on_active.svg
new file mode 100644 (file)
index 0000000..de78012
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- Generator: Gravit.io --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="0 0 26 26" width="26pt" height="26pt"><defs><clipPath id="_clipPath_jePTIS7EidnyLF850LReOskymiMeZjrp"><rect width="26" height="26"/></clipPath></defs><g clip-path="url(#_clipPath_jePTIS7EidnyLF850LReOskymiMeZjrp)"><g><path d=" M 13 24.5 C 9.928 24.5 7.04 23.304 4.868 21.132 C 2.696 18.96 1.5 16.072 1.5 13 C 1.5 9.928 2.696 7.04 4.868 4.868 C 7.04 2.696 9.928 1.5 13 1.5 C 16.072 1.5 18.96 2.696 21.132 4.868 C 23.304 7.04 24.5 9.928 24.5 13 C 24.5 16.072 23.304 18.96 21.132 21.132 C 18.96 23.304 16.072 24.5 13 24.5 Z " fill="rgb(255,255,255)"/><path d=" M 13 2 C 10.062 2 7.299 3.144 5.222 5.222 C 3.144 7.299 2 10.062 2 13 C 2 15.938 3.144 18.701 5.222 20.778 C 7.299 22.856 10.062 24 13 24 C 15.938 24 18.701 22.856 20.778 20.778 C 22.856 18.701 24 15.938 24 13 C 24 10.062 22.856 7.299 20.778 5.222 C 18.701 3.144 15.938 2 13 2 Z  M 13 1 C 19.627 1 25 6.373 25 13 C 25 19.627 19.627 25 13 25 C 6.373 25 1 19.627 1 13 C 1 6.373 6.373 1 13 1 Z " fill="rgb(0,12,43)"/><circle vector-effect="non-scaling-stroke" cx="13" cy="13" r="8" fill="rgb(0,12,43)"/></g></g></svg>
\ No newline at end of file
diff --git a/Oobe/Oobe.Common/res/wifi/08_popup_body.png b/Oobe/Oobe.Common/res/wifi/08_popup_body.png
new file mode 100644 (file)
index 0000000..864a52a
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/08_popup_body.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/12_back_active.png b/Oobe/Oobe.Common/res/wifi/12_back_active.png
new file mode 100644 (file)
index 0000000..62cef3d
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/12_back_active.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/12_icon_addnetwork.png b/Oobe/Oobe.Common/res/wifi/12_icon_addnetwork.png
new file mode 100644 (file)
index 0000000..b04f4f1
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/12_icon_addnetwork.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/12_icon_addnetwork_pressed.png b/Oobe/Oobe.Common/res/wifi/12_icon_addnetwork_pressed.png
new file mode 100644 (file)
index 0000000..e5cb658
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/12_icon_addnetwork_pressed.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/12_icon_eye_pw_hidden.png b/Oobe/Oobe.Common/res/wifi/12_icon_eye_pw_hidden.png
new file mode 100644 (file)
index 0000000..72f3203
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/12_icon_eye_pw_hidden.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/12_icon_eye_pw_visible.png b/Oobe/Oobe.Common/res/wifi/12_icon_eye_pw_visible.png
new file mode 100644 (file)
index 0000000..a416a9f
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/12_icon_eye_pw_visible.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/12_icon_scan.png b/Oobe/Oobe.Common/res/wifi/12_icon_scan.png
new file mode 100644 (file)
index 0000000..3c87e08
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/12_icon_scan.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/12_icon_scan_disabled.png b/Oobe/Oobe.Common/res/wifi/12_icon_scan_disabled.png
new file mode 100644 (file)
index 0000000..8c15ba5
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/12_icon_scan_disabled.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/12_icon_scan_pressed.png b/Oobe/Oobe.Common/res/wifi/12_icon_scan_pressed.png
new file mode 100644 (file)
index 0000000..548ff10
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/12_icon_scan_pressed.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/12_icon_scanning.png b/Oobe/Oobe.Common/res/wifi/12_icon_scanning.png
new file mode 100644 (file)
index 0000000..6213c30
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/12_icon_scanning.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/12_icon_wifioff.png b/Oobe/Oobe.Common/res/wifi/12_icon_wifioff.png
new file mode 100644 (file)
index 0000000..5120fd2
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/12_icon_wifioff.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/12_icon_wifioff_disabled.png b/Oobe/Oobe.Common/res/wifi/12_icon_wifioff_disabled.png
new file mode 100644 (file)
index 0000000..26a807b
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/12_icon_wifioff_disabled.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/12_icon_wifion.png b/Oobe/Oobe.Common/res/wifi/12_icon_wifion.png
new file mode 100644 (file)
index 0000000..d4603d6
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/12_icon_wifion.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/12_icon_wifion_disabled.png b/Oobe/Oobe.Common/res/wifi/12_icon_wifion_disabled.png
new file mode 100644 (file)
index 0000000..4a775a0
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/12_icon_wifion_disabled.png differ
diff --git a/Oobe/Oobe.Common/res/wifi/Rectangle_918.png b/Oobe/Oobe.Common/res/wifi/Rectangle_918.png
new file mode 100644 (file)
index 0000000..a360a9e
Binary files /dev/null and b/Oobe/Oobe.Common/res/wifi/Rectangle_918.png differ
index 41428ee..fb00fb3 100644 (file)
  * limitations under the License.
  */
 
-using System;
-using System.Globalization;
-using System.Linq;
+using System.Collections.Generic;
 using Oobe.Common.Controls;
 using Oobe.Common.Interfaces;
-using Oobe.Common.Pages;
-using Oobe.Common.Resources;
 using Oobe.Common.Styles;
 using Oobe.Common.Utils;
+using Oobe.Common.ViewModels;
+using Oobe.Common.Views;
 using Oobe.Language.Model;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
+using Tizen.NUI.Binding;
 
 namespace Oobe.Language
 {
     public class LanguageStep : ProcessStep
     {
-        private LanguageManger manager;
+        private LanguageManager manager;
 
         public LanguageStep()
             : base()
@@ -41,53 +39,34 @@ namespace Oobe.Language
 
         public override void OnInitialized()
         {
-            manager = new LanguageManger();
+            manager = new LanguageManager();
         }
 
-        public override BasePage CreateView(IProcessNavigation nav)
+        public override View CreateXamlView(IProcessNavigation nav)
         {
-            var container = new TwoButtonsPage();
-
-            container.Title.TranslatableText = "CHOOSE_LANGUAGE";
-
-            var carousel = new CarouselPicker(CarouselPickerStyles.Default);
-            carousel.Size2D = SpUtils.ToPixels(new Size2D(400, 250));
-
-            foreach (LanguageInfo info in manager.Languages)
-            {
-                CarouselPickerItemData item = new CarouselPickerItemData();
-
-                item.Text = info.LocalName;
-                carousel.AddItem(item);
-            }
-
-            int currentIndex = manager.Languages.FindIndex(x => x == manager.CurrentLanguage);
-            carousel.SelectedItemIndex = currentIndex;
-
-            container.NextButton.Clicked += (obj, args) =>
+            var container = new BasePage(SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? 596 : 174), true)
             {
-                if (carousel.SelectedItemIndex >= 0 && carousel.SelectedItemIndex < manager.Languages.Count)
+                BindingContext = new BasePageViewModel()
                 {
-                    var lang = manager.Languages[carousel.SelectedItemIndex];
-                    manager.CurrentLanguage = lang;
-                }
-
-                nav.Next();
+                    TitleTranslatableText = "CHOOSE_LANGUAGE",
+                    CommandNext = new Command(nav.Next),
+                },
             };
 
-            carousel.SelectedItemChanged += (sender, args) =>
+            var carousel = new CarouselPicker(CarouselPickerStyles.Default)
+            {
+                Size = SpUtils.ToPixels(new Size2D(400, 250)),
+                Items = CreateCarouselPickerData(),
+            };
+            carousel.SelectedItemIndex = manager.Languages.FindIndex(x => x == manager.CurrentLanguage);
+            carousel.SelectedItemChanged += (sender, e) =>
             {
                 if (carousel.SelectedItemIndex >= 0 && carousel.SelectedItemIndex < manager.Languages.Count)
                 {
-                    string language = manager.Languages[carousel.SelectedItemIndex].Code.Replace("_", "-");
-                    var culture = CultureInfo.CreateSpecificCulture(language);
-                    container.Title.Text = Translations.ResourceManager.GetString("CHOOSE_LANGUAGE", culture);
-                    container.NextButton.Text = Translations.ResourceManager.GetString("CONTINUE", culture);
+                    manager.CurrentLanguage = manager.Languages[carousel.SelectedItemIndex];
                 }
             };
-
-            container.PreviousButton.Hide();
-            container.Content = carousel;
+            container.Content.Add(carousel);
 
             return container;
         }
@@ -96,5 +75,19 @@ namespace Oobe.Language
         {
             manager.Reset();
         }
+
+        private List<CarouselPickerItemData> CreateCarouselPickerData()
+        {
+            List<CarouselPickerItemData> items = new List<CarouselPickerItemData>();
+            foreach (LanguageInfo info in manager.Languages)
+            {
+                items.Add(new CarouselPickerItemData
+                {
+                    Text = info.LocalName,
+                });
+            }
+
+            return items;
+        }
     }
 }
similarity index 96%
rename from Oobe/Oobe.Language/Model/LanguageManger.cs
rename to Oobe/Oobe.Language/Model/LanguageManager.cs
index 0a1bcdb..7b87d3c 100644 (file)
@@ -22,9 +22,9 @@ using Oobe.Common.Services;
 
 namespace Oobe.Language.Model
 {
-    public class LanguageManger
+    public class LanguageManager
     {
-        public LanguageManger()
+        public LanguageManager()
         {
             var filename = Tizen.Applications.CoreApplication.Current.DirectoryInfo.Resource + "languages_OOBE.xml";
 
index 0490d6a..9d471ed 100644 (file)
@@ -8,25 +8,25 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="10.0.0.17007">
-      <ExcludeAssets>Runtime</ExcludeAssets>
-    </PackageReference>
-    <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
+    <Compile Remove="ViewModels\**" />
+    <Compile Remove="Views\**" />
+    <EmbeddedResource Remove="ViewModels\**" />
+    <EmbeddedResource Remove="Views\**" />
+    <None Remove="ViewModels\**" />
+    <None Remove="Views\**" />
+  </ItemGroup>
+
+  <ItemGroup>
+         <PackageReference Include="Tizen.NET" Version="10.0.0.17172" />
+         <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
     <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
       <PrivateAssets>all</PrivateAssets>
     </PackageReference>
+    <PackageReference Include="Tizen.NUI.XamlBuild" Version="1.0.11" />
   </ItemGroup>
 
   <ItemGroup>
     <ProjectReference Include="..\Oobe.Common\Oobe.Common.csproj" />
   </ItemGroup>
-
-  <ItemGroup>
-    <Folder Include="res\" />
-  </ItemGroup>
-  <ItemGroup>
-    <AdditionalFiles Include="../stylecop.json" />
-    <AdditionalFiles Include="../Settings.StyleCop" />
-  </ItemGroup>
 </Project>
index 4d9fa85..c46e2db 100644 (file)
@@ -8,10 +8,8 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="10.0.0.17007">
-      <ExcludeAssets>Runtime</ExcludeAssets>
-    </PackageReference>
-    <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
+         <PackageReference Include="Tizen.NET" Version="10.0.0.17172" />
+         <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
     <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
       <PrivateAssets>all</PrivateAssets>
index 1ba9779..ce9fc21 100644 (file)
  * limitations under the License.
  */
 
+using System.Collections.Generic;
 using Oobe.Common.Controls;
 using Oobe.Common.Interfaces;
-using Oobe.Common.Pages;
 using Oobe.Common.Styles;
 using Oobe.Common.Utils;
+using Oobe.Common.ViewModels;
+using Oobe.Common.Views;
 using Oobe.Region.Model;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
+using Tizen.NUI.Binding;
 
 namespace Oobe.Region
 {
@@ -40,40 +42,34 @@ namespace Oobe.Region
             manager = new RegionManager();
         }
 
-        public override BasePage CreateView(IProcessNavigation nav)
+        public override View CreateXamlView(IProcessNavigation nav)
         {
-            var container = new TwoButtonsPage();
-
-            container.Title.TranslatableText = "CHOOSE_REGION";
-
-            var carousel = new CarouselPicker(CarouselPickerStyles.Default);
-            carousel.Size2D = SpUtils.ToPixels(new Size2D(600, 250));
-
-            foreach (RegionInfo info in manager.Regions)
+            var container = new BasePage(SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? 596 : 174), true)
             {
-                CarouselPickerItemData item = new CarouselPickerItemData();
-                item.TranslatableText = info.Name;
-                carousel.AddItem(item);
-            }
+                BindingContext = new BasePageViewModel()
+                {
+                    TitleTranslatableText = "CHOOSE_REGION",
+                    CommandNext = new Command(nav.Next),
+                    CommandBack = new Command(nav.Previous),
+                },
+            };
 
-            container.NextButton.Clicked += (obj, args) =>
+            var carousel = new CarouselPicker(CarouselPickerStyles.Default)
+            {
+                Size = SpUtils.ToPixels(new Size2D(600, 250)),
+                Items = CreateCarouselPickerData(),
+            };
+            manager.CurrentRegion = manager.Regions[0];
+            carousel.SelectedItemChanged += (sender, e) =>
             {
                 if (carousel.SelectedItemIndex >= 0 && carousel.SelectedItemIndex < manager.Regions.Count)
                 {
                     var region = manager.Regions[carousel.SelectedItemIndex];
                     manager.CurrentRegion = region;
                 }
-
-                nav.Next();
             };
 
-            container.PreviousButton.Clicked += (obj, args) =>
-            {
-                nav.Previous();
-            };
-
-            container.Content = carousel;
-
+            container.Content.Add(carousel);
             return container;
         }
 
@@ -81,5 +77,20 @@ namespace Oobe.Region
         {
             manager.Reset();
         }
+
+        private List<CarouselPickerItemData> CreateCarouselPickerData()
+        {
+            List<CarouselPickerItemData> items = new List<CarouselPickerItemData>();
+
+            foreach (RegionInfo info in manager.Regions)
+            {
+                items.Add(new CarouselPickerItemData
+                {
+                    TranslatableText = info.Name,
+                });
+            }
+
+            return items;
+        }
     }
 }
index 0b8e2cc..6edc562 100644 (file)
@@ -8,10 +8,8 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="10.0.0.17007">
-      <ExcludeAssets>Runtime</ExcludeAssets>
-    </PackageReference>
-    <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
+         <PackageReference Include="Tizen.NET" Version="10.0.0.17172" />
+         <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
     <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
       <PrivateAssets>all</PrivateAssets>
diff --git a/Oobe/Oobe.Terms/Styles/ButtonStyles.cs b/Oobe/Oobe.Terms/Styles/ButtonStyles.cs
deleted file mode 100644 (file)
index 63b172e..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace Oobe.Terms.Styles
-{
-    public class ButtonStyles
-    {
-        private static ButtonStyle iHaveReadAndAgreeSwitchStyle = new ButtonStyle
-        {
-            Overlay = new ImageViewStyle
-            {
-                Size = new Size(24, 24),
-                ResourceUrl = new Selector<string>
-                {
-                    Normal = NUIApplication.Current.DirectoryInfo.Resource + "switch/07_check_off_active.png",
-                    Selected = NUIApplication.Current.DirectoryInfo.Resource + "switch/07_check_on_active.png",
-                    Disabled = NUIApplication.Current.DirectoryInfo.Resource + "switch/07_check_off_disabled.png",
-                },
-            },
-        };
-
-        public static ButtonStyle IHaveReadAndAgreeSwitchStyle { get => iHaveReadAndAgreeSwitchStyle; }
-    }
-}
diff --git a/Oobe/Oobe.Terms/Styles/TextLabelStyles.cs b/Oobe/Oobe.Terms/Styles/TextLabelStyles.cs
deleted file mode 100644 (file)
index de9ccda..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Oobe.Common.Utils;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace Oobe.Terms.Styles
-{
-    public class TextLabelStyles
-    {
-        private static TextLabelStyle iHaveReadAndAgreeTextStyle = new TextLabelStyle
-        {
-            TextColor = new Selector<Color>
-            {
-                Normal = new Color(0, 20.0f / 255.0f, 71.0f / 255.0f, 1.0f),
-                Disabled = new Color(112.0f / 255.0f, 112.0f / 255.0f, 112.0f / 255.0f, 1.0f),
-            },
-            PixelSize = SpUtils.ToPixels(22.0f),
-            HorizontalAlignment = HorizontalAlignment.Begin,
-            FontFamily = "BreezeSans",
-            Ellipsis = false,
-        };
-
-        // workaround for issue with TextLabelStyle State not being applied
-        private static TextLabelStyle iHaveReadAndAgreeTextStyleDisabled = new TextLabelStyle
-        {
-            TextColor = new Selector<Color>
-            {
-                Normal = new Color(112.0f / 255.0f, 112.0f / 255.0f, 112.0f / 255.0f, 1.0f),
-            },
-            PixelSize = SpUtils.ToPixels(22.0f),
-            HorizontalAlignment = HorizontalAlignment.Begin,
-            FontFamily = "BreezeSans",
-            Ellipsis = false,
-            MultiLine = true,
-            LineWrapMode = LineWrapMode.Word,
-            WidthResizePolicy = ResizePolicyType.FillToParent,
-        };
-
-        private static TextLabelStyle guideTextLabelStyle = new TextLabelStyle
-        {
-            PixelSize = SpUtils.ToPixels(18.0f),
-            Ellipsis = false,
-            MultiLine = true,
-            LineWrapMode = LineWrapMode.Word,
-            WidthResizePolicy = ResizePolicyType.FillToParent,
-            TextColor = new Selector<Color>
-            {
-                Normal = new Color(112.0f / 255.0f, 112.0f / 255.0f, 112.0f / 255.0f, 1.0f),
-            },
-        };
-
-        private static TextLabelStyle contentTextLabelStyle = new TextLabelStyle
-        {
-            TextColor = new Selector<Color>
-            {
-                Normal = new Color(0, 12.0f / 255.0f, 43.0f / 255.0f, 1.0f),
-            },
-            PointSize = 16.0f,
-            FontFamily = "BreezeSans",
-            LineWrapMode = LineWrapMode.Word,
-            EnableMarkup = true,
-            Focusable = false,
-            MultiLine = true,
-        };
-
-        public static TextLabelStyle IHaveReadAndAgreeTextStyle { get => iHaveReadAndAgreeTextStyle; }
-
-        public static TextLabelStyle IHaveReadAndAgreeTextStyleDisabled { get => iHaveReadAndAgreeTextStyleDisabled; }
-
-        public static TextLabelStyle GuideTextLabelStyle { get => guideTextLabelStyle; }
-
-        public static TextLabelStyle ContentTextLabelStyle { get => contentTextLabelStyle; }
-    }
-}
index 59b887e..beb7446 100644 (file)
  */\r
 \r
 using Oobe.Common.Interfaces;\r
-using Oobe.Common.Pages;\r
+using Oobe.Common.ViewModels;\r
+using Oobe.Common.Views;\r
 using Oobe.Terms.Model;\r
-using Oobe.Terms.Views;\r
 using Tizen.NUI.BaseComponents;\r
+using Tizen.NUI.Binding;\r
 \r
 namespace Oobe.Terms\r
 {\r
@@ -31,9 +32,25 @@ namespace Oobe.Terms
             provider = new TermsProvider();\r
         }\r
 \r
-        public override BasePage CreateView(IProcessNavigation nav)\r
+        public override View CreateXamlView(IProcessNavigation nav)\r
         {\r
-            return new TermsView(nav, provider);\r
+            var vm = new BasePageViewModel()\r
+            {\r
+                TitleTranslatableText = "TERMS_AND_CONDITIONS",\r
+                CommandNext = new Command(nav.Next),\r
+                CommandBack = new Command(nav.Previous),\r
+                IsNextButtonEnabled = false,\r
+            };\r
+\r
+            var container = new BasePage(25)\r
+            {\r
+                BindingContext = vm,\r
+            };\r
+\r
+            var context = new TermsView(provider.LoadTerms(), (enabled) => { vm.IsNextButtonEnabled = enabled; });\r
+            container.Content.Add(context);\r
+\r
+            return container;\r
         }\r
     }\r
 }\r
diff --git a/Oobe/Oobe.Terms/Views/TermsView.cs b/Oobe/Oobe.Terms/Views/TermsView.cs
deleted file mode 100644 (file)
index 3cd26a7..0000000
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Oobe.Common.Interfaces;
-using Oobe.Common.Pages;
-using Oobe.Common.Styles;
-using Oobe.Common.Utils;
-using Oobe.Terms.Model;
-using Oobe.Terms.Styles;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-using Tizen.System;
-
-namespace Oobe.Terms.Views
-{
-    public class TermsView : TwoButtonsPage
-    {
-        private TermsProvider termsProvider;
-
-        private TextLabel agreeLabel;
-        private CheckBox agreeCheckBox;
-        private TapGestureDetector tapGestureDetector;
-        private View bounding;
-        private ScrollableBase scroller;
-        private TextLabel termsContent;
-
-        private bool agreementCheckable;
-        private bool nextEnabled;
-        private View ihaveread;
-        private TextLabel guide;
-
-        public TermsView(IProcessNavigation nav, TermsProvider terms)
-        {
-            termsProvider = terms;
-            tapGestureDetector = new TapGestureDetector();
-
-            Title.ParentOrigin = new Position(0.5f, ScreenSizeUtils.IsPortrait ? 0.018f : 0.035f);
-            Title.TranslatableText = "TERMS_AND_CONDITIONS";
-
-            View content = new View
-            {
-                Layout = new LinearLayout
-                {
-                    LinearOrientation = LinearLayout.Orientation.Vertical,
-                    Padding = SpUtils.ToPixels(new Extents(0, 0, 0, 0)),
-                    CellPadding = SpUtils.ToPixels(new Size2D(0, ScreenSizeUtils.IsPortrait ? 32 : 23)),
-                },
-            };
-
-            float h2 = (48 * TextUtils.GetFontSizeScale(SystemSettings.FontSize)) + (ScreenSizeUtils.IsPortrait ? 72 : 63);
-            float h1 = (48 * TextUtils.GetFontSizeScale(SystemSettings.FontSize)) + 55;
-            int bounding_height = (int)((ScreenSizeUtils.IsPortrait ? 1616 : 776) - h2 - h1);
-            bounding = new View
-            {
-                BackgroundColor = Color.White,
-                CornerRadius = 25.0f,
-                Size2D = SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? new Size2D(824, bounding_height) : new Size2D(1664, bounding_height)),
-                Layout = new LinearLayout(),
-                Padding = SpUtils.ToPixels(new Extents(0, 0, 24, 24)),
-                Margin = SpUtils.ToPixels(new Extents(64, 64, 0, 0)),
-            };
-
-            scroller = new ScrollableBase
-            {
-                Scrollbar = new Scrollbar(ScrollbarStyles.Default),
-                HideScrollbar = false,
-                WidthResizePolicy = ResizePolicyType.FillToParent,
-                HeightResizePolicy = ResizePolicyType.FillToParent,
-            };
-
-            var scrollerContent = new View
-            {
-                Padding = SpUtils.ToPixels(new Extents(40, 40, 0, 0)),
-                WidthResizePolicy = ResizePolicyType.FillToParent,
-                HeightResizePolicy = ResizePolicyType.FitToChildren,
-                Layout = new LinearLayout(),
-            };
-            // Do not use style on content as it seriously impacts scrolling
-            // performance on ScrollableBase
-            termsContent = new TextLabel();
-            termsContent.TextColor = new Color(0, 12.0f / 255.0f, 43.0f / 255.0f, 1.0f);
-            termsContent.PixelSize = SpUtils.ToPixels(29.0f);
-            termsContent.FontFamily = "BreezeSans";
-            termsContent.Text = terms.LoadTerms();
-            termsContent.LineWrapMode = LineWrapMode.Word;
-            termsContent.EnableMarkup = true;
-            termsContent.Focusable = false;
-            termsContent.MultiLine = true;
-            termsContent.WidthResizePolicy = ResizePolicyType.FillToParent;
-            termsContent.FontSizeScale = FontSizeScale.UseSystemSetting;
-
-            scrollerContent.Add(termsContent);
-            scroller.Add(scrollerContent);
-            scroller.Scrolling += (object sender, ScrollEventArgs args) =>
-            {
-                if (IsScrolledToLastPage(args.Position))
-                {
-                    AgreementCheckable = true;
-                }
-            };
-
-            NextButton.State = States.Disabled;
-            NextButton.IsEnabled = false;
-            NextButton.Clicked += (obj, args) =>
-            {
-                terms.AcceptTerms();
-                nav.Next();
-            };
-
-            PreviousButton.Clicked += (obj, args) =>
-            {
-                nav.Previous();
-            };
-
-            guide = new TextLabel(TextLabelStyles.GuideTextLabelStyle);
-            guide.TranslatableText = "YOU_MUST_SCROLL_DOWN_AND_READ_THE_WHOLE_TEXT_ABOVE";
-            guide.FontSizeScale = FontSizeScale.UseSystemSetting;
-
-            agreeCheckBox = new CheckBox(Oobe.Terms.Styles.ButtonStyles.IHaveReadAndAgreeSwitchStyle);
-            agreeCheckBox.Size2D = SpUtils.ToPixels(new Size2D((int)(TextUtils.GetFontSizeScale(SystemSettings.FontSize) * 24), (int)(TextUtils.GetFontSizeScale(SystemSettings.FontSize) * 24)));
-            agreeCheckBox.Margin = SpUtils.ToPixels(new Extents(0, 0, 0, 2));
-            agreeCheckBox.IsSelected = false;
-            agreeCheckBox.IsEnabled = false;
-            agreeCheckBox.Clicked += (obj, args) =>
-            {
-                TermsToggle();
-            };
-
-            agreeLabel = new TextLabel(TextLabelStyles.IHaveReadAndAgreeTextStyleDisabled);
-            agreeLabel.State = States.Disabled;
-            agreeLabel.TranslatableText = "I_HAVE_READ_AND_AGREE_TO_TERMS_AND_CONDITIONS";
-            agreeLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
-
-            var footnote = new View
-            {
-                Padding = SpUtils.ToPixels(new Extents(104, 104, 0, 0)),
-                Layout = new LinearLayout
-                {
-                    LinearOrientation = LinearLayout.Orientation.Horizontal,
-                    LinearAlignment = LinearLayout.Alignment.Bottom,
-                    CellPadding = SpUtils.ToPixels(new Size2D(16, 0)),
-                },
-            };
-
-            ihaveread = new View
-            {
-                SizeWidth = SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? 680 : 1520),
-                Layout = new LinearLayout
-                {
-                    LinearOrientation = LinearLayout.Orientation.Vertical,
-                    LinearAlignment = LinearLayout.Alignment.Bottom,
-                },
-            };
-
-            ihaveread.Add(guide);
-            ihaveread.Add(agreeLabel);
-            bounding.Add(scroller);
-            footnote.Add(agreeCheckBox);
-            footnote.Add(ihaveread);
-
-            content.Add(bounding);
-            content.Add(footnote);
-
-            Content = content;
-            Content.PivotPoint = Position.PivotPointTopCenter;
-            Content.ParentOrigin = Position.ParentOriginTopCenter;
-
-            content.Position = new Position(0, SpUtils.ToPixels(55 + (48 * TextUtils.GetFontSizeScale(SystemSettings.FontSize))));
-
-            AgreementCheckable = false;
-            NextEnabled = false;
-
-            // workaround issue with license having only single page
-            // currently there is no way for gettings from ScrollableBase
-            // any information how many pages the scroller have. Moreover
-            // after creation the size of scroller content is zero, so we
-            // have to delay check to get proper measurements
-            Timer timer = new Timer(1000);
-            timer.Tick += (sender, args) =>
-            {
-                if (IsScrolledToLastPage(new Position()))
-                {
-                    AgreementCheckable = true;
-                }
-
-                return false;
-            };
-            timer.Start();
-            ihaveread.Relayout += Ihaveread_Relayout;
-        }
-
-        private void Ihaveread_Relayout(object sender, System.EventArgs e)
-        {
-            float agreeLabelExtraSizeHeight = ScreenSizeUtils.GetExtraSizeHeight(agreeLabel);
-            var boundingSizeCorrection = ScreenSizeUtils.GetExtraSizeHeight(guide) + agreeLabelExtraSizeHeight;
-            bounding.SizeHeight -= SpUtils.ToPixels(boundingSizeCorrection);
-            agreeCheckBox.PositionY -= agreeLabelExtraSizeHeight;
-        }
-
-        private bool NextEnabled
-        {
-            get
-            {
-                return nextEnabled;
-            }
-
-            set
-            {
-                if (nextEnabled == value)
-                {
-                    return;
-                }
-
-                if (value)
-                {
-                    NextButton.State = States.Normal;
-                    NextButton.IsEnabled = true;
-                    agreeCheckBox.IsSelected = true;
-                }
-                else
-                {
-                    NextButton.State = States.Disabled;
-                    NextButton.IsEnabled = false;
-                    agreeCheckBox.IsSelected = false;
-                }
-
-                nextEnabled = value;
-            }
-        }
-
-        private bool AgreementCheckable
-        {
-            get
-            {
-                return agreementCheckable;
-            }
-
-            set
-            {
-                if (value == agreementCheckable)
-                {
-                    return;
-                }
-
-                if (value)
-                {
-                    agreeLabel.State = States.Normal;
-
-                    // TODO workaround issue with TextLabel when Disabled style is not applied
-                    // when changing control state. Fix it by reapplying special style
-                    // remove below line when issue get fixed
-                    agreeLabel.ApplyStyle(TextLabelStyles.IHaveReadAndAgreeTextStyle);
-                    agreeCheckBox.IsEnabled = true;
-                    agreeCheckBox.State = States.Normal;
-                    tapGestureDetector.Detected += OnTapGestureDetected;
-                    tapGestureDetector.Attach(agreeLabel);
-                }
-                else
-                {
-                    agreeLabel.State = States.Disabled;
-
-                    // TODO workaround issue with TextLabel when Disabled style is not applied
-                    // when changing control state. Fix it by reapplying special style
-                    // remove below line when issue get fixed
-                    agreeLabel.ApplyStyle(TextLabelStyles.IHaveReadAndAgreeTextStyleDisabled);
-                    agreeCheckBox.IsEnabled = false;
-                    agreeCheckBox.State = States.Disabled;
-                    tapGestureDetector.Detected -= OnTapGestureDetected;
-                    tapGestureDetector.Detach(agreeLabel);
-                }
-
-                agreementCheckable = value;
-            }
-        }
-
-        private bool IsScrolledToLastPage(Position currentPos)
-        {
-            if (scroller != null && termsContent != null)
-            {
-                if ((termsContent.Position.Y + termsContent.Size2D.Height - scroller.CurrentSize.Height) + currentPos.Y < 1.0f)
-                {
-                    return true;
-                }
-            }
-
-            return false;
-        }
-
-        private void OnTapGestureDetected(object source, TapGestureDetector.DetectedEventArgs e)
-        {
-            if (e.TapGesture.Type == Gesture.GestureType.Tap)
-            {
-                TermsToggle();
-            }
-        }
-
-        private void TermsToggle()
-        {
-            NextEnabled = !NextEnabled;
-        }
-    }
-}
index 4f0f28c..263d0d5 100644 (file)
@@ -8,10 +8,8 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="10.0.0.17007">
-      <ExcludeAssets>Runtime</ExcludeAssets>
-    </PackageReference>
-    <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
+       <PackageReference Include="Tizen.NET" Version="10.0.0.17172" />
+       <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
     <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
       <PrivateAssets>all</PrivateAssets>
index 51c4659..96cbf11 100644 (file)
  */\r
 \r
 using Oobe.Common.Interfaces;\r
-using Oobe.Common.Pages;\r
 using Oobe.Common.Styles;\r
 using Oobe.Common.Utils;\r
+using Oobe.Common.ViewModels;\r
+using Oobe.Common.Views;\r
 using Tizen.NUI;\r
 using Tizen.NUI.BaseComponents;\r
-using Tizen.NUI.Components;\r
+using Tizen.NUI.Binding;\r
 using Tizen.System;\r
 \r
 namespace Oobe.Welcome\r
 {\r
     public class WelcomeStep : ProcessStep\r
     {\r
-        private OneButtonPage container;\r
-\r
-        public override BasePage CreateView(IProcessNavigation nav)\r
+        public override View CreateXamlView(IProcessNavigation nav)\r
         {\r
-            container = new OneButtonPage();\r
-\r
-            container.Title.PivotPoint = Position.PivotPointBottomCenter;\r
-            container.Title.ParentOrigin = Position.ParentOriginBottomCenter;\r
-            container.Title.Position = SpUtils.ToPixels(new Position(0, ScreenSizeUtils.IsPortrait ?\r
-                -(550 + (387 * TextUtils.GetFontSizeScale(SystemSettings.FontSize))) :\r
-                -(327 + (174 * TextUtils.GetFontSizeScale(SystemSettings.FontSize)))));\r
-            container.Title.TranslatableText = "WELCOME_TITLE";\r
-            container.Title.MultiLine = true;\r
-            container.Title.LineWrapMode = LineWrapMode.Word;\r
+            var container = new BasePage(0, ScreenSizeUtils.IsPortrait ? true : false)\r
+            {\r
+                BindingContext = new BasePageViewModel()\r
+                {\r
+                    CommandStart = new Command(nav.Finish),\r
+                },\r
+            };\r
 \r
-            TextLabel content = new TextLabel();\r
-            content.SizeWidth = SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? 872 : 1356);\r
-            content.TextColor = new Color(0, 12.0f / 255.0f, 43.0f / 255.0f, 1.0f);\r
-            content.PixelSize = SpUtils.ToPixels(28.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.";\r
-            content.FontSizeScale = FontSizeScale.UseSystemSetting;\r
+            TextLabel title = new TextLabel()\r
+            {\r
+                TranslatableText = "WELCOME_TITLE",\r
+                WidthSpecification = LayoutParamPolicies.MatchParent,\r
+                Margin = ScreenSizeUtils.IsPortrait ? new Extents((ushort)SpUtils.ToPixels(40), (ushort)SpUtils.ToPixels(40), 0, 0) :\r
+                new Extents((ushort)SpUtils.ToPixels(60), (ushort)SpUtils.ToPixels(60), 0, 0),\r
+                FontFamily = "BreezeSans",\r
+                TextColor = new Color(0, 20.0f / 255.0f, 71.0f / 255.0f, 1.0f),\r
+                MultiLine = true,\r
+                PixelSize = SpUtils.ToPixels(40.0f),\r
+                HorizontalAlignment = HorizontalAlignment.Center,\r
+                LineWrapMode = LineWrapMode.Word,\r
+                FontSizeScale = FontSizeScale.UseSystemSetting,\r
+                FontStyle = new PropertyMap().AddLightFontStyle(),\r
+            };\r
 \r
-            container.NextButton.TranslatableText = "GET_STARTED";\r
-            container.NextButton.Clicked += (obj, args) =>\r
+            var userScale = TextUtils.GetFontSizeScale(SystemSettings.FontSize);\r
+            TextLabel content = new TextLabel()\r
             {\r
-                nav.Finish();\r
+                WidthSpecification = LayoutParamPolicies.MatchParent,\r
+                Margin = ScreenSizeUtils.IsPortrait ? new Extents((ushort)SpUtils.ToPixels(40), (ushort)SpUtils.ToPixels(40), (ushort)SpUtils.ToPixels(150), 0) :\r
+                new Extents((ushort)SpUtils.ToPixels(60), (ushort)SpUtils.ToPixels(60), (ushort)SpUtils.ToPixels(60), 0),\r
+                FontFamily = "BreezeSans",\r
+                TextColor = new Color(0, 12.0f / 255.0f, 43.0f / 255.0f, 1.0f),\r
+                MultiLine = true,\r
+                PixelSize = SpUtils.ToPixels(28.0f),\r
+                HorizontalAlignment = HorizontalAlignment.Center,\r
+                LineWrapMode = LineWrapMode.Word,\r
+                FontSizeScale = FontSizeScale.UseSystemSetting,\r
+                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.",\r
             };\r
 \r
-            container.Content = content;\r
-            container.Content.PivotPoint = Position.PivotPointCenter;\r
-            container.Content.ParentOrigin = Position.ParentOriginBottomCenter;\r
-            content.Position = SpUtils.ToPixels(new Position(0, ScreenSizeUtils.IsPortrait ?\r
-                -(656 + (108 * TextUtils.GetFontSizeScale(SystemSettings.FontSize))) :\r
-                -(327 + (55 * TextUtils.GetFontSizeScale(SystemSettings.FontSize)))));\r
+            container.Content.Add(title);\r
+            container.Content.Add(content);\r
 \r
-            container.Title.Relayout += Title_Relayout;\r
             return container;\r
         }\r
-\r
-        private void Title_Relayout(object sender, System.EventArgs e)\r
-        {\r
-            float titleExtraSizeHeight = ScreenSizeUtils.GetExtraSizeHeight(container.Title);\r
-            container.Title.PositionY += titleExtraSizeHeight / 2;\r
-            container.Title.Relayout -= Title_Relayout;\r
-        }\r
     }\r
 }\r
diff --git a/Oobe/Oobe.Wifi/Controls/ListView.cs b/Oobe/Oobe.Wifi/Controls/ListView.cs
deleted file mode 100644 (file)
index cc4ed99..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Threading.Tasks;
-using Oobe.Common.Styles;
-using Oobe.Common.Utils;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace Oobe.Wifi.Controls
-{
-    public class ListView
-    {
-        private Dictionary<View, View> itemToSeparator = new Dictionary<View, View>();
-        private ObservableCollection<View> items;
-        private ScrollableBase scrollableBase = null;
-        private View footer = null;
-        private int width;
-        private int height;
-
-        public ListView(int width, int height)
-        {
-            this.width = width;
-            this.height = height;
-        }
-
-        // code does not handle the case with separators but without footer
-        public Func<View> SeparatorFactory { get; set; } = null;
-
-        public View Footer
-        {
-            get => footer;
-            set
-            {
-                if (footer != null)
-                {
-                    LayoutView.Remove(footer);
-                }
-
-                footer = value;
-                if (footer != null)
-                {
-                    LayoutView.Add(footer);
-                    (LayoutView.Layout as SequenceLinearLayout)?.KeepAsLast(footer.Layout);
-                }
-            }
-        }
-
-        public ScrollableBase View
-        {
-            get
-            {
-                if (scrollableBase == null)
-                {
-                    scrollableBase = new ScrollableBase()
-                    {
-                        Size = SpUtils.ToPixels(new Size(width, height)),
-                        ScrollingDirection = ScrollableBase.Direction.Vertical,
-                        Scrollbar = new Scrollbar(ScrollbarStyles.Default),
-                        HideScrollbar = false,
-                    };
-                }
-
-                return scrollableBase;
-            }
-        }
-
-        public ObservableCollection<View> Items
-        {
-            get
-            {
-                return items;
-            }
-
-            set
-            {
-                if (value != items)
-                {
-                    DetachItems();
-                    items = value;
-                    AttachItems();
-                }
-            }
-        }
-
-        private View LayoutView
-        {
-            get
-            {
-                if (View.Children.Any() == false)
-                {
-                    View.Add(new View()
-                    {
-                        Layout = new SequenceLinearLayout()
-                        {
-                            LinearOrientation = LinearLayout.Orientation.Vertical,
-                        },
-                        WidthResizePolicy = ResizePolicyType.FillToParent,
-                        HeightResizePolicy = ResizePolicyType.FitToChildren,
-                    });
-                }
-
-                return View.Children.First();
-            }
-        }
-
-        private void DetachItems()
-        {
-            if (items != null)
-            {
-                items.CollectionChanged -= OnCollectionChanged;
-                RemoveItems();
-                LayoutView.HeightResizePolicy = ResizePolicyType.FitToChildren;
-            }
-        }
-
-        // not thread safe
-        private void AttachItems()
-        {
-            if (items != null)
-            {
-                foreach (var item in items)
-                {
-                    AddRegularItem(item);
-                }
-
-                items.CollectionChanged += OnCollectionChanged;
-            }
-        }
-
-        private void OnCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
-        {
-            if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
-            {
-                var item = e.NewItems.OfType<View>().FirstOrDefault();
-                if (item != null)
-                {
-                    AddRegularItem(item);
-                }
-            }
-            else if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Remove)
-            {
-                var item = e.OldItems.OfType<View>().FirstOrDefault();
-                if (item != null)
-                {
-                    RemoveRegularItem(item);
-
-                    // if scroll was at the end, make sure it is still properly aligned to the end
-                    // Tizen.Log.Debug("demo", $"{View.CurrentPage}");
-                }
-            }
-            else if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Reset)
-            {
-                RemoveItems();
-            }
-
-            LayoutView.HeightResizePolicy = ResizePolicyType.FitToChildren;
-        }
-
-        private void AddRegularItem(View item)
-        {
-            LayoutView.Add(item);
-            if (SeparatorFactory != null)
-            {
-                if (itemToSeparator.ContainsKey(item) == false)
-                {
-                    var separator = SeparatorFactory();
-                    itemToSeparator.Add(item, separator);
-                    LayoutView.Add(separator);
-                }
-            }
-        }
-
-        private void RemoveRegularItem(View item)
-        {
-            LayoutView.Remove(item);
-            if (itemToSeparator.ContainsKey(item))
-            {
-                LayoutView.Remove(itemToSeparator[item]);
-                itemToSeparator.Remove(item);
-            }
-        }
-
-        private void RemoveItems()
-        {
-            foreach (var child in LayoutView.Children.Where(x => x != Footer).ToList())
-            {
-                LayoutView.Remove(child);
-            }
-
-            itemToSeparator.Clear();
-        }
-    }
-}
diff --git a/Oobe/Oobe.Wifi/Controls/Wifi/AddNewNetworkPupup.cs b/Oobe/Oobe.Wifi/Controls/Wifi/AddNewNetworkPupup.cs
deleted file mode 100644 (file)
index c55fb7a..0000000
+++ /dev/null
@@ -1,551 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Oobe.Common.Styles;
-using Oobe.Common.Utils;
-using Tizen.Network.WiFi;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-using Tizen.System;\r
-\r
-namespace Oobe.Wifi.Controls.Wifi
-{
-    public class AddNewNetworkPupup : View
-    {
-        private NewNetworkViewMode currentViewMode;
-        private TextLabel titleLabel;
-        private TextField ssidTextField;
-        private View ssidUnderline;
-        private TextLabel selectedSecurityTypeLabel;
-        private TapGestureDetector securityTypeDetector;
-        private TextLabel usernameLabel;
-        private TextField usernameTextField;
-        private View usernameUnderline;
-        private PasswordEntry passwordEntry;
-        private View passwordUnderline;
-        private Button revealButton;
-        private Button cancelButton;
-        private Button addButton;
-        private TextLabel failureLabel;
-        private WifiUISecurityType currentSecurityType;
-        private string backgroundImagePath = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "08_popup_body.png");
-        private string arrowImagePath = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "12_back_active.png");
-
-        private int labelFontSize = SpUtils.ToPixels(14);
-        private int textFontSize = SpUtils.ToPixels(22);
-        private int passwordFontSize = SpUtils.ToPixels(22);\r
-
-        public AddNewNetworkPupup()
-        {
-            InitializeStaticElements();
-            ResetViewTo(WifiUISecurityType.None);
-
-            UpdateAddButton();
-            Relayout += ChangeSecurityTypePopup_Relayout;
-        }\r
-\r
-        public event Action OnDismiss;
-
-        public enum NewNetworkViewMode
-        {
-            NoPassword,
-            PasswordOnly,
-            UserPassword,
-        }
-
-        private static Color LargeTextColor => new Color(0.0f, 0x14 / 255.0f, 0x47 / 255.0f, 1.0f);
-
-        private static Color SmallTextColor => new Color(0.0f, 0xC / 255.0f, 0x2B / 255.0f, 1.0f);
-
-        private static Size LabelSize => SpUtils.ToPixels(new Size(600, 19));
-
-        private static Size TextControlSize => SpUtils.ToPixels(new Size(1028, userScale * 27));
-
-        private static Size PasswordControlSize => SpUtils.ToPixels(new Size(1104, 27));
-
-        private static float userScale = TextUtils.GetFontSizeScale(SystemSettings.FontSize);
-
-        private TextLabel CreateTextLabel(string translatableText, Position2D position = null)
-        {
-            position ??= new Position2D();
-            return new TextLabel
-            {
-                Position = SpUtils.ToPixels(position),
-                Size = LabelSize,
-                PixelSize = labelFontSize,
-                TranslatableText = translatableText,
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddRegularFontStyle(),
-                TextColor = SmallTextColor,
-                HorizontalAlignment = HorizontalAlignment.Begin,
-                VerticalAlignment = VerticalAlignment.Center,
-            };
-        }
-
-        private TextField CreateTextField(string placeholderTranslatableText, Position2D position = null)
-        {
-            position ??= new Position2D();
-            var textField = new TextField
-            {
-                Position = SpUtils.ToPixels(position),
-                SizeWidth = SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? 860 : 1028),
-                PixelSize = textFontSize,
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddRegularFontStyle(),
-                TextColor = LargeTextColor,
-                TranslatablePlaceholderText = placeholderTranslatableText,
-                HorizontalAlignment = HorizontalAlignment.Begin,
-                VerticalAlignment = VerticalAlignment.Bottom,
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.BottomLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
-                FontSizeScale = FontSizeScale.UseSystemSetting,
-            };
-            return textField;
-        }
-
-        private View CreateUnderline(Position2D position = null, Size2D size = null)
-        {
-            position ??= new Position2D();
-            size ??= new Size2D(ScreenSizeUtils.IsPortrait ? 860 : 1028, 1);
-            return new View()
-            {
-                Position = SpUtils.ToPixels(position),
-                Size = SpUtils.ToPixels(size),
-                BackgroundColor = new Color(0xC3 / 255.0f, 0xCA / 255.0f, 0xD2 / 255.0f, 1.0f),
-            };
-        }
-
-        private PasswordEntry CreatePasswordEntry(Position2D position = null)
-        {
-            position ??= new Position2D();
-            var passwordEntry = new PasswordEntry
-            {
-                Position = SpUtils.ToPixels(position),
-                Size = SpUtils.ToPixels(new Size(ScreenSizeUtils.IsPortrait ? 860 : 1028, 27 * userScale)),
-                PixelSize = passwordFontSize,
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddRegularFontStyle(),
-                TextColor = LargeTextColor,
-                TranslatablePlaceholderText = "WIFI_PASSWORD",
-                HorizontalAlignment = HorizontalAlignment.Begin,
-                VerticalAlignment = VerticalAlignment.Bottom,
-                Revealed = false,
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.BottomLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
-                FontSizeScale = FontSizeScale.UseSystemSetting,
-            };
-            return passwordEntry;
-        }
-
-        private Button CreateRevealButton(Position2D position = null)
-        {
-            position ??= new Position2D();
-            var userScale = TextUtils.GetFontSizeScale(SystemSettings.FontSize);
-            var button = new Button(ButtonStyles.Reveal)
-            {
-                Size = SpUtils.ToPixels(new Size(userScale * 48, userScale * 48)),
-                Position = SpUtils.ToPixels(position),
-                IsSelectable = true,
-                PositionUsesPivotPoint = true,
-                PivotPoint = new Position(1.0f, 0.77f),
-                ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
-            };
-            button.Clicked += (s, e) =>
-            {
-                this.passwordEntry.Revealed = !this.passwordEntry.Revealed;
-            };
-            return button;
-        }
-
-        private void InitializeStaticElements()
-        {
-            this.BackgroundImage = backgroundImagePath;
-            titleLabel = new TextLabel
-            {
-                PositionY = SpUtils.ToPixels(61),
-                PixelSize = SpUtils.ToPixels(40),
-                TranslatableText = "WIFI_ADD_NETWORK",
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddLightFontStyle(),
-                TextColor = LargeTextColor,
-                HorizontalAlignment = HorizontalAlignment.Center,
-                VerticalAlignment = VerticalAlignment.Top,
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.Center,
-                ParentOrigin = Tizen.NUI.ParentOrigin.TopCenter,
-                FontSizeScale = FontSizeScale.UseSystemSetting,
-            };
-            this.Add(titleLabel);
-
-            ssidTextField = CreateTextField("WIFI_SSID", new Position2D(78, 200));
-            this.Add(ssidTextField);\r
-            ssidTextField.TextChanged += (s, e) => UpdateAddButton();\r
-
-            ssidUnderline = CreateUnderline(new Position2D(78, 197));
-            this.Add(ssidUnderline);
-
-            this.Add(CreateSecurityTypeButton());
-
-            cancelButton = new Button(ButtonStyles.Cancel)
-            {
-                Size = SpUtils.ToPixels(new Size(336, 96)),
-            };
-            cancelButton.TextLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
-            cancelButton.Clicked += (s, e) => OnDismiss?.Invoke();
-            this.Add(cancelButton);
-
-            addButton = new Button(ButtonStyles.OK)
-            {
-                Size = SpUtils.ToPixels(new Size(336, 96)),
-                TranslatableText = "WIFI_ADD",
-            };
-            addButton.TextLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
-            addButton.Clicked += async (s, e) =>
-            {
-                Tizen.Log.Debug("oobe", $"Scanning for SSID = {ssidTextField.Text}");
-                IEnumerable<WiFiAP> aps = null;
-                try
-                {
-                    await WiFiManager.ScanSpecificAPAsync(ssidTextField.Text);
-                    aps = WiFiManager.GetFoundSpecificAPs();
-                    Tizen.Log.Debug("oobe", $"Found {aps.Count()} potential APs");
-                }
-                catch
-                {
-                    ShowFailureSsidLabel();
-                    return;
-                }
-
-                bool success = false;
-                if (aps is null || aps.Count() == 0)
-                {
-                    ShowFailureSsidLabel();
-                    return;
-                }
-
-                foreach (var wifiAp in aps)
-                {
-                    string message = $"Trying to add new network: SSID: " +
-                        $"{wifiAp.NetworkInformation.Bssid} ({wifiAp.NetworkInformation.Essid}), " +
-                        $"Password: {(passwordEntry is null ? "not set" : "XXXXXXXX")}, " +
-                        $"Security type: {currentSecurityType.GetUIName()}";
-                    Tizen.Log.Debug("oobe", message);
-                    wifiAp.SecurityInformation.SecurityType = currentSecurityType.GetApSecurityType();
-                    if (!(passwordEntry is null))
-                    {
-                        wifiAp.SecurityInformation.SetPassphrase(passwordEntry.Password);
-                    }
-
-                    Task<bool> task = null;
-                    try
-                    {
-                        var orginal_task = wifiAp.ConnectAsync();
-                        task = orginal_task as Task<bool>;
-                    }
-                    catch (Exception connectionException)
-                    {
-                        string errorMessage = $"Failed to connect to WiFI {wifiAp.NetworkInformation.Bssid} ({wifiAp.NetworkInformation.Essid})" +
-                            $"Password: {(passwordEntry is null ? "not set" : "XXXXXXXX")}, " +
-                            $"Security type: {currentSecurityType.GetUIName()} " +
-                            connectionException.Message;
-                        Tizen.Log.Error("oobe", errorMessage);
-                        continue;
-                    }
-
-                    if (task is null)
-                    {
-                        Tizen.Log.Error("oobe", "Failed to cast connection task");
-                        OnDismiss?.Invoke();
-                        continue;
-                    }
-
-                    try
-                    {
-                        if (await task)
-                        {
-                            success = true;
-                            break;
-                        }
-                    }
-                    catch (Exception connectionException)
-                    {
-                        string errorMessage = $"Failed to connect to WiFI {wifiAp.NetworkInformation.Bssid} ({wifiAp.NetworkInformation.Essid})" +
-                            $"Password: {(passwordEntry is null ? "not set" : "XXXXXXXX")}, " +
-                            $"Security type: {currentSecurityType.GetUIName()} " +
-                            connectionException.Message;
-                        Tizen.Log.Error("oobe", errorMessage);
-                        continue;
-                    }
-                }
-
-                if (success)
-                {
-                    OnDismiss?.Invoke();
-                }
-                else
-                {
-                    ShowFailurePasswordLabel();
-                }
-            };
-            this.Add(addButton);
-
-            failureLabel = new TextLabel
-            {
-                Size = new Size2D(),
-                Position = SpUtils.ToPixels(new Position(78, 200)),
-                PixelSize = SpUtils.ToPixels(12),
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddRegularFontStyle(),
-                TextColor = new Color(0xAA / 255.0f, 0x18 / 255.0f, 0x18 / 255.0f, 1.0f),
-                HorizontalAlignment = HorizontalAlignment.Begin,
-                VerticalAlignment = VerticalAlignment.Center,
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.TopLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
-                FontSizeScale = FontSizeScale.UseSystemSetting,\r
-            };
-            failureLabel.Hide();
-            this.Add(failureLabel);
-        }\r
-\r
-        private View CreateSecurityTypeButton()\r
-        {\r
-            var view = new View()\r
-            {\r
-                SizeWidth = SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? 860 : 1028),\r
-                Position2D = SpUtils.ToPixels(new Position2D(78, 232)),\r
-                Layout = new AbsoluteLayout(),\r
-            };\r
-            selectedSecurityTypeLabel = new TextLabel()\r
-            {\r
-                PixelSize = SpUtils.ToPixels(22),\r
-                TranslatableText = currentSecurityType.GetUIName(),\r
-                FontStyle = new PropertyMap().AddRegularFontStyle(),\r
-                FontFamily = "BreezeSans",\r
-                TextColor = LargeTextColor,\r
-                HorizontalAlignment = HorizontalAlignment.Begin,
-                VerticalAlignment = VerticalAlignment.Center,\r
-                FontSizeScale = FontSizeScale.UseSystemSetting,\r
-            };\r
-            view.Add(selectedSecurityTypeLabel);\r
-            view.Add(new View()\r
-            {\r
-                BackgroundImage = arrowImagePath,\r
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.CenterRight,
-                ParentOrigin = Tizen.NUI.ParentOrigin.CenterRight,
-            });\r
-            securityTypeDetector = new TapGestureDetector();\r
-            securityTypeDetector.Attach(view);\r
-            securityTypeDetector.Detected += (s, e) => OpenSecurityTypePopup();\r
-            return view;\r
-        }\r
-\r
-        private void OpenSecurityTypePopup()
-        {
-            var view = new ChangeSecurityTypePopup(currentSecurityType);
-            var popup = new Oobe.Common.Utils.Popup(view, backgroundOpacity: 0f, centered: true);\r
-            view.PositionY = SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? -28 : 0);
-            view.OnDismiss += () =>
-            {
-                ResetViewTo(view.WifiUISecurityType);
-                popup.Dismiss();
-            };
-            popup.Show();
-        }
-
-        private void ResetViewToNoPassword()
-        {
-            Size = SpUtils.ToPixels(new Size2D(ScreenSizeUtils.IsPortrait ? 1016 : 1184, ScreenSizeUtils.IsPortrait ? 459 : 456));
-
-            addButton.Position = SpUtils.ToPixels(new Position2D(ScreenSizeUtils.IsPortrait ? 600 : 768, ScreenSizeUtils.IsPortrait ? 319 : 316));
-            cancelButton.Position = SpUtils.ToPixels(new Position2D(80, ScreenSizeUtils.IsPortrait ? 319 : 316));
-
-            if (!(usernameLabel is null))
-            {
-                usernameLabel.Unparent();
-                usernameLabel.Dispose();
-                usernameLabel = null;
-            }
-
-            if (!(usernameTextField is null))
-            {
-                usernameTextField.Unparent();
-                usernameTextField.Dispose();
-                usernameTextField = null;
-            }
-
-            if (!(usernameUnderline is null))
-            {
-                usernameUnderline.Unparent();
-                usernameUnderline.Dispose();
-                usernameUnderline = null;
-            }
-
-            if (!(passwordEntry is null))
-            {
-                passwordEntry.Unparent();
-                passwordEntry.Dispose();
-                passwordEntry = null;
-            }
-
-            if (!(passwordUnderline is null))
-            {
-                passwordUnderline.Unparent();
-                passwordUnderline.Dispose();
-                passwordUnderline = null;
-            }
-
-            if (!(revealButton is null))
-            {
-                revealButton.Unparent();
-                revealButton.Dispose();
-                revealButton = null;
-            }
-
-            currentViewMode = NewNetworkViewMode.NoPassword;
-        }
-
-        private void ResetViewToPasswordOnly()
-        {
-            Size = SpUtils.ToPixels(new Size2D(ScreenSizeUtils.IsPortrait ? 1016 : 1184, 547));
-
-            addButton.Position = SpUtils.ToPixels(new Position2D(ScreenSizeUtils.IsPortrait ? 600 : 768, 407));
-            cancelButton.Position = SpUtils.ToPixels(new Position2D(80, 407));
-
-            if (!(usernameLabel is null))
-            {
-                usernameLabel.Unparent();
-                usernameLabel.Dispose();
-                usernameLabel = null;
-            }
-
-            if (!(usernameTextField is null))
-            {
-                usernameTextField.Unparent();
-                usernameTextField.Dispose();
-                usernameTextField = null;
-            }
-
-            if (!(usernameUnderline is null))
-            {
-                usernameUnderline.Unparent();
-                usernameUnderline.Dispose();
-                usernameUnderline = null;
-            }
-
-            if (!(revealButton is null))
-            {
-                revealButton.Unparent();
-                revealButton.Dispose();
-                revealButton = null;
-            }
-
-            if (!(passwordEntry is null))
-            {
-                passwordEntry.Unparent();
-                passwordEntry.Dispose();
-                passwordEntry = null;
-            }
-
-            if (passwordEntry is null)
-            {
-                passwordEntry = CreatePasswordEntry(new Position2D(78, 366));
-                this.Add(passwordEntry);
-            }
-
-            if (passwordUnderline is null)
-            {
-                passwordUnderline = CreateUnderline(new Position2D(78, 363));
-                this.Add(passwordUnderline);
-            }
-
-            if (revealButton is null)
-            {
-                revealButton = CreateRevealButton(new Position2D(ScreenSizeUtils.IsPortrait ? 936 : 1104, 363));
-                this.Add(revealButton);
-            }
-
-            currentViewMode = NewNetworkViewMode.PasswordOnly;
-        }
-
-        private void ResetViewTo(WifiUISecurityType securityType)
-        {
-            Tizen.Log.Debug("oobe", $"Reseting view to {securityType.GetUIName()}");
-            failureLabel.Hide();
-            currentSecurityType = securityType;
-            selectedSecurityTypeLabel.TranslatableText = securityType.GetUIName();
-            switch (securityType)
-            {
-                case WifiUISecurityType.None:
-                    ResetViewToNoPassword();
-                    break;
-                case WifiUISecurityType.EAP:
-                case WifiUISecurityType.WEP:
-                case WifiUISecurityType.WPAPSK:
-                case WifiUISecurityType.WPA2PSK:
-                    ResetViewToPasswordOnly();
-                    break;
-                default:
-                    throw new NotImplementedException($"UI for Security type {securityType.GetUIName()} was not implemented");
-            }
-        }
-
-        private void ShowFailureSsidLabel()
-        {
-            failureLabel.Show();
-            failureLabel.TranslatableText = "WIFI_SSID_FAILURE";
-        }
-
-        private void ShowFailurePasswordLabel()
-        {
-            failureLabel.Show();
-            if (currentViewMode == NewNetworkViewMode.NoPassword)
-            {
-                failureLabel.TranslatableText = "WIFI_SSID_FAILURE";
-                failureLabel.Position2D = ssidTextField.Position2D + new Position2D(0, (int)ssidTextField.Size.Height);
-            }
-            else
-            {
-                failureLabel.TranslatableText = "WIFI_SECUIRTY_KEY_FAILURE";
-                failureLabel.Position2D = passwordEntry.Position2D + new Position2D(0, (int)passwordEntry.Size.Height);
-            }
-        }
-
-        private void UpdateAddButton()\r
-        {\r
-            if (addButton != null && ssidTextField != null)\r
-            {\r
-                addButton.IsEnabled = ssidTextField.Text.Length > 0;\r
-            }\r
-        }\r
-\r
-        private void ChangeSecurityTypePopup_Relayout(object sender, EventArgs e)
-        {
-            Relayout -= ChangeSecurityTypePopup_Relayout;
-            addButton.IsEnabled = !addButton.IsEnabled;
-            addButton.IsEnabled = !addButton.IsEnabled;
-        }
-
-    }
-}
index 08b65dd..2e61e79 100644 (file)
@@ -18,11 +18,10 @@ using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Linq;
-using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
+using Oobe.Common.Controls;
 using Tizen.Network.WiFi;
-using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 
 namespace Oobe.Wifi.Controls.Wifi
@@ -30,7 +29,7 @@ namespace Oobe.Wifi.Controls.Wifi
     public class ApManager : IDisposable
     {
         private Action<WiFiAP> onTapped;
-        private Dictionary<WiFiAP, ApView> apToViewMap = new Dictionary<WiFiAP, ApView>();
+        private Dictionary<WiFiAP, ListViewCell> apToViewMap = new Dictionary<WiFiAP, ListViewCell>();
         private CancellationTokenSource updatingCancellation = new CancellationTokenSource();
 
         public ApManager(Action<WiFiAP> onTapped)
@@ -57,19 +56,16 @@ namespace Oobe.Wifi.Controls.Wifi
             apToViewMap.Clear();
             Views.Clear();
 
-            int idx = 0;
             foreach (var ap in aps)
             {
                 if (apToViewMap.ContainsKey(ap) == false)
                 {
-                    var view = new ApView();
+                    var view = new ListViewCell();
                     view.Update(ap);
                     view.Tapped += () => onTapped(ap);
 
                     apToViewMap.Add(ap, view);
-                    Views.Insert(idx, view);
-
-                    idx++;
+                    Views.Add(view);
                 }
                 else
                 {
@@ -82,6 +78,7 @@ namespace Oobe.Wifi.Controls.Wifi
         {
             WiFiManager.ConnectionStateChanged -= OnConnectionStateChanged;
             updatingCancellation.Cancel();
+
             foreach (var ap in apToViewMap.Keys)
             {
                 ap.Dispose();
@@ -90,7 +87,7 @@ namespace Oobe.Wifi.Controls.Wifi
 
         private void OnConnectionStateChanged(object sender, ConnectionStateChangedEventArgs e)
         {
-            if (apToViewMap.TryGetValue(e.AP, out ApView view))
+            if (apToViewMap.TryGetValue(e.AP, out ListViewCell view))
             {
                 view.Update(e.AP);
             }
@@ -114,6 +111,7 @@ namespace Oobe.Wifi.Controls.Wifi
                         Views.Remove(view);
                         apToViewMap.Remove(ap);
                         ap.Dispose();
+
                     }
                 }
             }
diff --git a/Oobe/Oobe.Wifi/Controls/Wifi/ButtonStyles.cs b/Oobe/Oobe.Wifi/Controls/Wifi/ButtonStyles.cs
deleted file mode 100644 (file)
index d461e64..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Oobe.Common.Utils;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Oobe.Common.Utils;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace Oobe.Wifi.Controls.Wifi
-{
-    public class ButtonStyles
-    {
-        public static ButtonStyle Cancel { get => GetCancelButtonStyle(); }
-
-        public static ButtonStyle OK { get => GetOKButtonStyle(); }
-
-        public static ButtonStyle Scan { get => GetScanButtonStyle(); }
-
-        public static ButtonStyle TurnOnOff { get => GetTurnOnOffButtonStyle(); }
-
-        public static ButtonStyle Reveal { get => GetRevealButtonStyle(); }
-
-        public static ButtonStyle AddNetwork { get => GetAddNetworkButtonStyle(); }
-
-        private static float userScale = ScreenSizeUtils.GetFootnoteFontSizeScaleMaxLarge();
-
-        private static ButtonStyle GetCancelButtonStyle() => new ButtonStyle
-        {
-            BackgroundImage = new Selector<string>
-            {
-                Normal = NUIApplication.Current.DirectoryInfo.Resource + "button/02_butt_2_empty_action.png",
-                Pressed = NUIApplication.Current.DirectoryInfo.Resource + "button/02_butt_2_empty_pressed.png",
-                Disabled = NUIApplication.Current.DirectoryInfo.Resource + "button/02_butt_2_empty_disabled.png",
-            },
-            Text = new TextLabelStyle
-            {
-                PixelSize = new Selector<float?>
-                {
-                    Normal = SpUtils.ToPixels(22.0f),
-                    Pressed = SpUtils.ToPixels(24.0f),
-                },
-                EnableMarkup = true,
-                TranslatableText = "WIFI_CANCEL",
-                TextColor = new Selector<Color>
-                {
-                    Normal = new Color(0.0f, 20.0f / 255.0f, 71 / 255.0f, 1.0f),
-                    Pressed = new Color(41.0f / 255.0f, 91.0f / 255.0f, 178 / 255.0f, 1.0f),
-                },
-                FontFamily = GetNavigationFont(),
-            },
-            Size2D = SpUtils.ToPixels(new Size2D(240, 72)),
-        };
-
-        private static ButtonStyle GetScanButtonStyle() => new ButtonStyle
-        {
-            BackgroundImage = new Selector<string>
-            {
-                Normal = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_scan.png",
-                Pressed = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_scan_pressed.png",
-                Disabled = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_scan_disabled.png",
-            },
-            Size2D = SpUtils.ToPixels(new Size2D((int)(userScale * 72), (int)(userScale * 32))),
-        };
-
-        private static ButtonStyle GetTurnOnOffButtonStyle() => new ButtonStyle
-        {
-            BackgroundImage = new Selector<string>
-            {
-                Normal = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_wifioff.png",
-                Disabled = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_wifioff_disabled.png",
-                Selected = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_wifion.png",
-                DisabledSelected = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_wifion_disabled.png",
-            },
-            Size2D = SpUtils.ToPixels(new Size2D((int)(userScale * 72), (int)(userScale * 32))),
-        };
-
-        private static ButtonStyle GetAddNetworkButtonStyle() => new ButtonStyle
-        {
-            BackgroundImage = new Selector<string>
-            {
-                Normal = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_addnetwork.png",
-                Pressed = NUIApplication.Current.DirectoryInfo.Resource + "12_icon_addnetwork_pressed.png",
-            },
-            Size2D = SpUtils.ToPixels(new Size2D(42, 42)),
-        };
-
-        private static ButtonStyle GetRevealButtonStyle() => new ButtonStyle
-        {
-            BackgroundImage = new Selector<string>
-            {
-                Normal = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "12_icon_eye_pw_hidden.png"),
-                Selected = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "12_icon_eye_pw_visible.png"),
-            },
-        };
-
-        private static ButtonStyle GetOKButtonStyle() => new ButtonStyle
-        {
-            BackgroundImage = new Selector<string>
-            {
-                Normal = NUIApplication.Current.DirectoryInfo.Resource + "button/02_CTA_empty_active.svg",
-                Pressed = NUIApplication.Current.DirectoryInfo.Resource + "button/02_CTA_empty_selected.svg",
-                Disabled = NUIApplication.Current.DirectoryInfo.Resource + "button/02_CTA_empty_disabled.svg",
-            },
-            Text = new TextLabelStyle
-            {
-                PixelSize = new Selector<float?>
-                {
-                    Normal = SpUtils.ToPixels(22.0f),
-                    Pressed = SpUtils.ToPixels(24.0f),
-                },
-                TextColor = Color.White,
-                TranslatableText = "WIFI_OK",
-                FontFamily = GetNavigationFont(),
-            },
-            Size2D = SpUtils.ToPixels(new Size2D(240, 72)),
-        };
-
-        private static Selector<string> GetNavigationFont()
-        {
-            return new Selector<string>
-            {
-                Normal = "BreezeSans",
-            };
-        }
-    }
-}
diff --git a/Oobe/Oobe.Wifi/Controls/Wifi/ChangeSecurityTypePopup.cs b/Oobe/Oobe.Wifi/Controls/Wifi/ChangeSecurityTypePopup.cs
deleted file mode 100644 (file)
index 2467603..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Oobe.Common.Styles;
-using Oobe.Common.Utils;
-using Tizen.Network.WiFi;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace Oobe.Wifi.Controls.Wifi
-{
-    public class ChangeSecurityTypePopup : View
-    {
-        private WifiUISecurityType originalWifUISecurityType;
-        private ListView listView;
-        private ObservableCollection<View> choiceViews = new ObservableCollection<View>();
-        private RadioButtonGroup radioButtonGroup = new RadioButtonGroup();
-        private Button addButton;
-
-        public ChangeSecurityTypePopup(WifiUISecurityType wifUISecurityType)
-        {
-            this.originalWifUISecurityType = wifUISecurityType;
-            this.WifiUISecurityType = wifUISecurityType;
-            this.Size = SpUtils.ToPixels(new Size(ScreenSizeUtils.IsPortrait ? 1016 : 1184, 632));
-
-            this.BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "08_popup_body.png");
-
-            InitializeStaticElements();
-            InitializeRadioButtons();
-        }
-
-        public event Action OnDismiss;
-
-        public WifiUISecurityType WifiUISecurityType { get; private set; }
-
-        public void InitializeStaticElements()
-        {
-            var titleLabel = new TextLabel()
-            {
-                PositionY = SpUtils.ToPixels(64),
-                Size = SpUtils.ToPixels(new Size(1024, 130)),
-                PixelSize = SpUtils.ToPixels(40),
-                TranslatableText = "WIFI_CHOOSE_SECURITY_TYPE",
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddLightFontStyle(),
-                TextColor = new Color(0.0f, 0x14 / 255.0f, 0x47 / 255.0f, 1.0f),
-                HorizontalAlignment = HorizontalAlignment.Center,
-                VerticalAlignment = VerticalAlignment.Center,
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.Center,
-                ParentOrigin = Tizen.NUI.ParentOrigin.TopCenter,
-                FontSizeScale = FontSizeScale.UseSystemSetting,
-            };
-            this.Add(titleLabel);
-
-            var cancelButton = new Button(ButtonStyles.Cancel)
-            {
-                Position = SpUtils.ToPixels(new Position(80, 492)),
-                Size = SpUtils.ToPixels(new Size(336, 96)),
-            };
-            cancelButton.TextLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
-            cancelButton.Clicked += (s, e) =>
-            {
-                WifiUISecurityType = originalWifUISecurityType;
-                OnDismiss?.Invoke();
-            };
-            this.Add(cancelButton);
-
-            addButton = new Button(ButtonStyles.OK)
-            {
-                Position = SpUtils.ToPixels(new Position(ScreenSizeUtils.IsPortrait ? 600 : 768, 492)),
-                Size = SpUtils.ToPixels(new Size(336, 96)),
-                TranslatableText = "WIFI_OK",
-            };
-
-            addButton.TextLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
-            addButton.Clicked += (s, e) =>
-            {
-                OnDismiss?.Invoke();
-            };
-            this.Add(addButton);
-            Relayout += ChangeSecurityTypePopup_Relayout;
-        }
-
-        private void ChangeSecurityTypePopup_Relayout(object sender, EventArgs e)
-        {
-            Relayout -= ChangeSecurityTypePopup_Relayout;
-            addButton.IsEnabled = !addButton.IsEnabled;
-            addButton.IsEnabled = !addButton.IsEnabled;
-        }
-
-        private void InitializeRadioButtons()
-        {
-            foreach (WifiUISecurityType type in Enum.GetValues(WifiUISecurityType.GetType()))
-            {
-                var view = CreateOption(type);
-                choiceViews.Add(view);
-            }
-
-            listView = new ListView(ScreenSizeUtils.IsPortrait ? 856 : 1024, 324)
-            {
-                Items = choiceViews,
-            };
-            listView.View.Position = SpUtils.ToPixels(new Position(80, 128));
-
-            (radioButtonGroup.GetItem(0) as SecurityTypeView.SecurityRadioButton)?.SetSelectionProgramatically(true);
-
-            this.Add(listView.View);
-        }
-
-        private View CreateOption(WifiUISecurityType wifiUISecurityType)
-        {
-            var view = new SecurityTypeView(wifiUISecurityType);
-            if (this.WifiUISecurityType == wifiUISecurityType)
-            {
-                view.Button.IsSelected = true;
-            }
-
-            radioButtonGroup.Add(view.Button);
-            view.Activated += () => this.WifiUISecurityType = view.WifiUISecurityType;
-            return view;
-        }
-    }
-}
diff --git a/Oobe/Oobe.Wifi/Controls/Wifi/WifiPasswordPopup.cs b/Oobe/Oobe.Wifi/Controls/Wifi/WifiPasswordPopup.cs
deleted file mode 100644 (file)
index 7802173..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Threading.Tasks;
-using Oobe.Common.Styles;
-using Oobe.Common.Utils;
-using Oobe.Wifi.Controls.Wifi;
-using Tizen.Network.WiFi;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-using Tizen.System;
-
-namespace Oobe.Wifi.Controls.Wifi
-{
-    public class WifiPasswordPopup : View
-    {
-        private const int MinPasswordLength = 8;
-        private const int MaxPasswordLength = 63;
-        private PasswordEntry passwordEntry = null;
-        private Button okButton;
-        private Button cancelButton;
-        private Button revealButton;
-        private TextLabel connectionFailure;
-        private string backgroundImagePath = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "08_popup_body.png");
-        private WiFiAP wifiAp;
-        private bool isConnecting = false;
-        private TextLabel titleLabel;
-
-        public WifiPasswordPopup(WiFiAP wifiAp)
-        {
-            BackgroundImage = backgroundImagePath;
-            var titleHeight = 48 * TextUtils.GetFontSizeScale(SystemSettings.FontSize);
-            Size = SpUtils.ToPixels(new Size(ScreenSizeUtils.IsPortrait ? 1016 : 1184, ScreenSizeUtils.IsPortrait ? 356 + titleHeight : 353 + titleHeight));
-            this.wifiAp = wifiAp;
-
-            View underline = new View()
-            {
-                Size = SpUtils.ToPixels(new Size(ScreenSizeUtils.IsPortrait ? 856 : 1024, 1)),
-                Position2D = SpUtils.ToPixels(new Position2D(80, -204)),
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.BottomLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.BottomLeft,
-                BackgroundColor = new Color(0xC3 / 255.0f, 0xCA / 255.0f, 0xD2 / 255.0f, 1.0f),
-            };
-            this.Add(underline);
-
-            titleLabel = new TextLabel
-            {
-                PositionY = SpUtils.ToPixels(37),
-                Padding = SpUtils.ToPixels(new Extents(80, 80, 0, 0)),
-
-                // no translatableText because of dynamic content
-                Text = string.Format(Translations.WIFI_ENTER_PASSWORD_TO_JOIN, wifiAp.NetworkInformation.Essid),
-                PixelSize = SpUtils.ToPixels(40),
-                TextColor = new Color(0, 0x14 / 255.0f, 0x47 / 255.0f, 1.0f),
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddRegularFontStyle(),
-                HorizontalAlignment = HorizontalAlignment.Center,
-                VerticalAlignment = VerticalAlignment.Center,
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.TopCenter,
-                ParentOrigin = Tizen.NUI.ParentOrigin.TopCenter,
-                FontSizeScale = FontSizeScale.UseSystemSetting,
-                MultiLine = true,
-                LineWrapMode = LineWrapMode.Word,
-            };
-            this.Add(titleLabel);
-
-            passwordEntry = new PasswordEntry()
-            {
-                Position = SpUtils.ToPixels(new Position(80, -206)),
-                MaxLength = MaxPasswordLength,
-                PixelSize = SpUtils.ToPixels(22),
-                TextColor = new Color(0, 0x0C / 255.0f, 0x2B / 255.0f, 1.0f),
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddRegularFontStyle(),
-                Revealed = false,
-                TranslatablePlaceholderText = "WIFI_PASSWORD",
-                HorizontalAlignment = HorizontalAlignment.Begin,
-                VerticalAlignment = VerticalAlignment.Bottom,
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.BottomLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.BottomLeft,
-                FontSizeScale = FontSizeScale.UseSystemSetting,
-            };
-            passwordEntry.TextChanged += (s, e) => UpdateOKButton();
-
-            this.Add(passwordEntry);
-
-            connectionFailure = new TextLabel
-            {
-                Position = SpUtils.ToPixels(new Position(80, -204)),
-                TranslatableText = "WIFI_INVALID_PASSWORD",
-                PixelSize = SpUtils.ToPixels(18),
-                TextColor = new Color(0xAA / 255.0f, 0x18 / 255.0f, 0x18 / 255.0f, 1.0f),
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddRegularFontStyle(),
-                HorizontalAlignment = HorizontalAlignment.Begin,
-                VerticalAlignment = VerticalAlignment.Center,
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.TopLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.BottomLeft,
-                FontSizeScale = FontSizeScale.UseSystemSetting,
-            };
-            connectionFailure.Hide();
-            this.Add(connectionFailure);
-
-            var userScale = TextUtils.GetFontSizeScale(SystemSettings.FontSize);
-            revealButton = new Button(ButtonStyles.Reveal)
-            {
-                Size = SpUtils.ToPixels(new Size(userScale * 48, userScale * 48)),
-                Position = SpUtils.ToPixels(new Position(ScreenSizeUtils.IsPortrait ? 944 : 1112, -204)),
-                IsSelectable = true,
-                PositionUsesPivotPoint = true,
-                PivotPoint = new Position(1.0f, 0.77f),
-                ParentOrigin = Tizen.NUI.ParentOrigin.BottomLeft,
-            };
-            revealButton.Clicked += (s, e) => TogglePasswordVisibility();
-            this.Add(revealButton);
-
-            cancelButton = new Button(ButtonStyles.Cancel)
-            {
-                Size = SpUtils.ToPixels(new Size(336, 96)),
-                Position = SpUtils.ToPixels(new Position(80, -44)),
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.BottomLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.BottomLeft,
-            };
-            cancelButton.TextLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
-            cancelButton.Clicked += (s, e) =>
-            {
-                OnDismiss.Invoke();
-            };
-            this.Add(cancelButton);
-
-            okButton = new Button(ButtonStyles.OK)
-            {
-                Size = SpUtils.ToPixels(new Size(336, 96)),
-                Position = SpUtils.ToPixels(new Position(ScreenSizeUtils.IsPortrait ? 600 : 768, -44)),
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.BottomLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.BottomLeft,
-                IsEnabled = false,
-            };
-            okButton.TextLabel.FontSizeScale = FontSizeScale.UseSystemSetting;
-            okButton.Clicked += async (s, e) =>
-            {
-                isConnecting = true;
-                UpdateOKButton();
-                try
-                {
-                    Tizen.Log.Debug("oobe", $"connecting to wifi {wifiAp.NetworkInformation.Essid} with password {"XXXXXXXX"}");
-                    wifiAp.SecurityInformation.SetPassphrase(Password);
-                    var task = wifiAp.ConnectAsync();
-                    await task;
-                    if (task.Status == TaskStatus.Faulted)
-                    {
-                        throw task.Exception;
-                    }
-                    else
-                    {
-                        OnDismiss.Invoke();
-                    }
-                }
-                catch (Exception ex)
-                {
-                    Tizen.Log.Error("oobe", $"{ex.ToString()}");
-                    connectionFailure.Show();
-                }
-                finally
-                {
-                    isConnecting = false;
-                    UpdateOKButton();
-                }
-            };
-            this.Add(okButton);
-            Relayout += WifiPasswordPopup_Relayout;
-        }
-
-        private void WifiPasswordPopup_Relayout(object sender, EventArgs e)
-        {
-            float popupTitleExtraSizeHeight = ScreenSizeUtils.GetExtraSizeHeight(titleLabel);
-            if (popupTitleExtraSizeHeight > 0)
-            {
-                Relayout -= WifiPasswordPopup_Relayout;
-            }
-
-            SizeHeight += popupTitleExtraSizeHeight;
-        }
-
-        public event Action OnDismiss;
-
-        public string Password => passwordEntry.Password;
-
-        private void TogglePasswordVisibility()
-        {
-            passwordEntry.Revealed = !passwordEntry.Revealed;
-        }
-
-        private void UpdateOKButton()
-        {
-            okButton.IsEnabled = (Password.Length >= MinPasswordLength) && (isConnecting == false);
-        }
-    }
-}
diff --git a/Oobe/Oobe.Wifi/Controls/Wifi/WifiView.cs b/Oobe/Oobe.Wifi/Controls/Wifi/WifiView.cs
deleted file mode 100644 (file)
index ae5a4dc..0000000
+++ /dev/null
@@ -1,352 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using Oobe.Common.Styles;
-using Oobe.Common.Utils;
-using Tizen.Network.WiFi;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-using Tizen.System;
-
-namespace Oobe.Wifi.Controls.Wifi
-{
-    public class WifiView : IDisposable
-    {
-        public const int ListItemWidth = 1060;
-        public const int ListItemHeight = 80;
-
-        private View view = null;
-
-        public View View
-        {
-            get
-            {
-                if (view == null)
-                {
-                    view = new View()
-                    {
-                        Layout = new LinearLayout()
-                        {
-                            LinearOrientation = LinearLayout.Orientation.Vertical,
-                        },
-                        BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "Rectangle_918.png"),
-                    };
-                    view.Add(CreateHeader(ScreenSizeUtils.IsPortrait ? 824 : 1080, 80));
-
-                    view.Add(CreateSeparator());
-
-                    view.Add(CreateListViewPlaceHolder());
-                }
-
-                return view;
-            }
-        }
-
-        private WifiState State { get; set; } = new WifiState();
-
-        private ApManager ApManager { get; set; } = new ApManager(OnApTapped);
-
-        public void Dispose()
-        {
-            view = null;
-            ApManager.Dispose();
-            State.Dispose();
-        }
-
-        private static View CreateScanningView()
-        {
-            var view = new View()
-            {
-                Layout = new LinearLayout()
-                {
-                    LinearOrientation = LinearLayout.Orientation.Horizontal,
-                },
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.CenterLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft,
-                PositionX = SpUtils.ToPixels(40),
-            };
-
-            float userScale = TextUtils.GetFontSizeScale(SystemSettings.FontSize);
-            var progress = new View()
-            {
-                Size = SpUtils.ToPixels(new Size(userScale * 25, userScale * 26)),
-                Margin = SpUtils.ToPixels(new Extents((ushort)(userScale * 13), 0, 0, 0)),
-                BackgroundImage = System.IO.Path.Combine(NUIApplication.Current.DirectoryInfo.Resource, "12_icon_scanning.png"),
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.Center,
-                ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft,
-            };
-            view.Add(progress);
-
-            Animation animation = null;
-            progress.VisibilityChanged += (s, e) =>
-            {
-                if (e.Visibility == false)
-                {
-                    animation?.Stop();
-                    animation?.Clear();
-                    animation?.Dispose();
-                    animation = null;
-                    progress.Orientation = new Rotation(new Radian(new Degree(0)), new Vector3(0, 0, -1));
-                }
-                else if (animation == null)
-                {
-                    animation = new Animation(1_000);
-                    animation.Looping = true;
-                    animation.AnimateTo(progress, "Orientation", new Rotation(new Radian(new Degree(180)), new Vector3(0, 0, -1)), new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear));
-                    animation.Play();
-                }
-            };
-
-            view.Add(new TextLabel()
-            {
-                TranslatableText = "WIFI_SCANNING",
-                Margin = SpUtils.ToPixels(new Extents(17, 0, 0, 0)),
-                PixelSize = SpUtils.ToPixels(20f),
-                TextColor = new Color(0, 0x0C / 255f, 0x2B / 255f, 1.0f),
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddRegularFontStyle(),
-                FontSizeScale = FontSizeScale.UseSystemSetting,
-            });
-            return view;
-        }
-
-        private static View CreateSeparator()
-        {
-            return new View()
-            {
-                Size2D = SpUtils.ToPixels(new Size(ScreenSizeUtils.IsPortrait ? 744 : 1000, 1)),
-                BackgroundColor = new Color(0xC3 / 255f, 0xCA / 255f, 0xD2 / 255f, 1.0f),
-                Margin = SpUtils.ToPixels(new Extents(40, 0, 0, 0)),
-            };
-        }
-
-        private static View CreateManualWifiView()
-        {
-            var manualWifi = new View()
-            {
-                Size = SpUtils.ToPixels(new Size(ListItemWidth, ListItemHeight)),
-                Layout = new AbsoluteLayout(),
-            };
-
-            var addNewButton = new Button(ButtonStyles.AddNetwork)
-            {
-                Position = SpUtils.ToPixels(new Position(44, 0)),
-                Size = SpUtils.ToPixels(new Size(42, 42)),
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.CenterLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft,
-            };
-
-            addNewButton.Clicked += (s, e) => ShowAddNetworkPopup();
-            manualWifi.Add(addNewButton);
-
-            manualWifi.Add(new TextLabel()
-            {
-                TranslatableText = "WIFI_ADD_NEW_NETWORK",
-                Position = SpUtils.ToPixels(new Position(110, 0)),
-                PixelSize = SpUtils.ToPixels(20f),
-                TextColor = new Color(0, 0x0C / 255f, 0x2B / 255f, 1.0f),
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddRegularFontStyle(),
-                FontSizeScale = FontSizeScale.UseSystemSetting,
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.CenterLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft,
-            });
-            return manualWifi;
-        }
-
-        private static void ShowAddNetworkPopup()
-        {
-            var view = new AddNewNetworkPupup();
-            var popup = new Common.Utils.Popup(view, centered: true);
-            view.PositionY = SpUtils.ToPixels(-130);
-            view.OnDismiss += popup.Dismiss;
-            popup.Show();
-        }
-
-        private static void ShowPasswordPopup(WiFiAP wifiAp)
-        {
-            var view = new WifiPasswordPopup(wifiAp);
-            var popup = new Common.Utils.Popup(view, centered: true);
-            view.OnDismiss += popup.Dismiss;
-            popup.Show();
-        }
-
-        private static void OnApTapped(WiFiAP wifiAp)
-        {
-            if (wifiAp.NetworkInformation.ConnectionState == WiFiConnectionState.Connected)
-            {
-                Tizen.Log.Debug("oobe", $"Already connected to {wifiAp.NetworkInformation.Essid}");
-                return;
-            }
-
-            ShowPasswordPopup(wifiAp);
-        }
-
-        private View CreateHeader(int width, int height)
-        {
-            var header = new View()
-            {
-                Size = SpUtils.ToPixels(new Size(width, height)),
-                Layout = new AbsoluteLayout(),
-            };
-
-            header.Add(CreateWifiScanningPlaceHolder());
-
-            var scan = new Button(ButtonStyles.Scan)
-            {
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.CenterRight,
-                ParentOrigin = Tizen.NUI.ParentOrigin.CenterRight,
-            };
-            scan.PositionX = SpUtils.ToPixels(-61) - scan.SizeWidth;
-            scan.Clicked += async (s, e) =>
-            {
-                scan.IsEnabled = false;
-                ApManager.Views.Clear();
-                ApManager.UpdateTo(await State.Scan());
-                scan.IsEnabled = State.IsTurnedOn;
-            };
-            scan.IsEnabled = State.IsTurnedOn;
-            State.OnTurnedOff += () => scan.IsEnabled = State.IsTurnedOn;
-            State.OnTurnedOn += () => scan.IsEnabled = State.IsTurnedOn;
-            header.Add(scan);
-
-            header.Add(CreateTurnOnButton());
-            return header;
-        }
-
-        private Button CreateTurnOnButton()
-        {
-            var button = new Button(ButtonStyles.TurnOnOff)
-            {
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.CenterRight,
-                ParentOrigin = Tizen.NUI.ParentOrigin.CenterRight,
-                PositionX = SpUtils.ToPixels(-40),
-            };
-            button.IsSelectable = true;
-            button.IsSelected = State.IsTurnedOn;
-
-            State.OnTurnedOff += () => button.IsSelected = State.IsTurnedOn;
-            State.OnTurnedOn += () => button.IsSelected = State.IsTurnedOn;
-
-            button.Clicked += async (s, e) =>
-            {
-                button.IsEnabled = false;
-                await State.TurnWifi();
-                button.IsEnabled = true;
-            };
-            return button;
-        }
-
-        private View CreateListViewPlaceHolder()
-        {
-            var view = new View();
-            var listView = new ListView(ScreenSizeUtils.IsPortrait ? 824 : 1080, ScreenSizeUtils.IsPortrait ? 795 : 490)
-            {
-                Footer = CreateManualWifiView(),
-                Items = ApManager.Views,
-                SeparatorFactory = CreateSeparator,
-            }.View;
-            view.Add(listView);
-
-            var prompt = new TextLabel()
-            {
-                Position = SpUtils.ToPixels(new Position(40, 21)),
-                PixelSize = SpUtils.ToPixels(20),
-                TextColor = new Color(0, 0x14 / 255f, 0x47 / 255f, 1.0f),
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddRegularFontStyle(),
-            };
-            view.Add(prompt);
-
-            void TurnOn()
-            {
-                prompt.Hide();
-                listView.Show();
-            }
-
-            void TurnOff(string message)
-            {
-                listView.Hide();
-                prompt.TranslatableText = message;
-                prompt.Show();
-            }
-
-            if (State.IsTurnedOn)
-            {
-                TurnOn();
-            }
-            else
-            {
-                TurnOff("WIFI_TURN_ON_WIFI");
-            }
-
-            State.OnTurnedOff += () => TurnOff("WIFI_TURN_ON_WIFI");
-            State.OnTurnedOn += () => TurnOn();
-            State.OnTurningOnFailed += () => TurnOff("WIFI_CONNECTION_FAILED");
-            return view;
-        }
-
-        private View CreateWifiScanningPlaceHolder()
-        {
-            var view = new View()
-            {
-                Size = SpUtils.ToPixels(new Size(1080, 80)),
-            };
-
-            var wifi = new TextLabel("Wi-Fi")
-            {
-                PixelSize = SpUtils.ToPixels(20f),
-                TextColor = new Color(0, 0x0C / 255f, 0x2B / 255f, 1.0f),
-                FontFamily = "BreezeSans",
-                FontStyle = new PropertyMap().AddRegularFontStyle(),
-                FontSizeScale = FontSizeScale.UseSystemSetting,
-                PositionUsesPivotPoint = true,
-                PivotPoint = Tizen.NUI.PivotPoint.CenterLeft,
-                ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft,
-                PositionX = SpUtils.ToPixels(40),
-            };
-            view.Add(wifi);
-
-            var scanning = CreateScanningView();
-            view.Add(scanning);
-
-            void StartScan()
-            {
-                wifi.Hide();
-                scanning.Show();
-            }
-
-            void FinishScan()
-            {
-                scanning.Hide();
-                wifi.Show();
-            }
-
-            FinishScan();
-            State.OnScanStarted += StartScan;
-            State.OnScanFinished += FinishScan;
-            return view;
-        }
-    }
-}
index 9c3ffea..a18d03f 100644 (file)
@@ -9,8 +9,8 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="10.0.0.17007" />
-    <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
+         <PackageReference Include="Tizen.NET" Version="10.0.0.17172" />
+         <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
     <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
       <PrivateAssets>all</PrivateAssets>
index b1c28db..0554c8c 100644 (file)
  */
 
 using System;
-using System.Collections.Generic;
 using Oobe.Common.Interfaces;
-using Oobe.Common.Pages;
-using Oobe.Common.Styles;
 using Oobe.Common.Utils;
+using Oobe.Common.ViewModels;
+using Oobe.Common.Views;
 using Oobe.Wifi.Controls.Wifi;
+using Tizen.Network.Connection;
 using Tizen.Network.WiFi;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-using Tizen.System;
+using Tizen.NUI.Binding;
 
 namespace Oobe.Wifi
 {
@@ -33,47 +32,30 @@ namespace Oobe.Wifi
     {
         private WifiView wifiView = null;
         private EventHandler<ConnectionStateChangedEventArgs> connectionChanged;
-        private TwoButtonsPage view;
 
-        public override BasePage CreateView(IProcessNavigation nav)
-        {
-            DisposeView();
-
-            view = new TwoButtonsPage();
-
-            view.Title.ParentOrigin = new Position(0.5f, ScreenSizeUtils.IsPortrait ? 0.183f : 0.035f);
-            view.Title.TranslatableText = "CHOOSE_WIFI_NETWORK";
-            view.Title.FontSizeScale = FontSizeScale.UseSystemSetting;// ScreenSizeUtils.GetFootnoteFontSizeScaleMaxHuge();
-            view.Title.MultiLine = true;
-            view.Title.LineWrapMode = LineWrapMode.Word;
-
-            wifiView = new WifiView();
-            wifiView.View.Size = SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? new Size2D(824, 880) : new Size2D(1080, 568));
-            wifiView.View.Position = new Position(0, SpUtils.ToPixels((ScreenSizeUtils.IsPortrait ? 408 : 55) + (48 * TextUtils.GetFontSizeScale(SystemSettings.FontSize))));
+        private WifiState State { get; set; } = new WifiState();
 
-            view.Content = wifiView.View;
-            view.Content.PivotPoint = Position.PivotPointTopCenter;
-            view.Content.ParentOrigin = Position.ParentOriginTopCenter;
+        private ApManager ApManager { get; set; } = new ApManager(OnApTapped);
 
-            view.PreviousButton.Clicked += (s, e) => nav.Previous();
-            view.NextButton.Clicked += (s, e) => nav.Next();
-
-            void ApplyStyle(bool isConnected) => view.NextButton.ApplyStyle(isConnected
-                ? Common.Styles.ButtonStyles.Next
-                : Common.Styles.ButtonStyles.Skip);
-            ApplyStyle(WiFiManager.ConnectionState == WiFiConnectionState.Connected);
+        public override View CreateXamlView(IProcessNavigation nav)
+        {
+            var vm = new BasePageViewModel()
+            {
+                TitleTranslatableText = "CHOOSE_WIFI_NETWORK",
+                CommandNext = new Command(nav.Next),
+                CommandBack = new Command(nav.Previous),
+                NextButtonStyle = "SkipButton",
+            };
+            var container = new BasePage(SpUtils.ToPixels(ScreenSizeUtils.IsPortrait ? 330 : (int)(0.035f * Window.Instance.Size.Height)), false) { BindingContext = vm };
 
-            connectionChanged = (s, e) => ApplyStyle(e.State == WiFiConnectionState.Connected);
+            wifiView = new WifiView(State.IsTurnedOn);
+            wifiView.ListView.Items = ApManager.Views;
+            connectionChanged = (s, e) => vm.NextButtonStyle = e.State == WiFiConnectionState.Connected ? "NextButton" : "SkipButton";
             WiFiManager.ConnectionStateChanged += connectionChanged;
-            view.Title.Relayout += Title_Relayout;
-            return view;
-        }
+            SubscribeEvents();
 
-        private void Title_Relayout(object sender, EventArgs e)
-        {
-            float titleExtraSizeHeight = ScreenSizeUtils.GetExtraSizeHeight(view.Title);
-            view.Title.PositionY -= titleExtraSizeHeight;
-            view.Title.Relayout -= Title_Relayout;
+            container.Content.Add(wifiView);
+            return container;
         }
 
         public override void OnShutdown()
@@ -90,12 +72,72 @@ namespace Oobe.Wifi
             }
         }
 
+        private static void OnApTapped(WiFiAP wifiAp)
+        {
+            if (wifiAp.NetworkInformation.ConnectionState == WiFiConnectionState.Connected)
+            {
+                Tizen.Log.Debug("oobe", $"Already connected to {wifiAp.NetworkInformation.Essid}");
+                return;
+            }
+
+            ShowPasswordPopup(wifiAp);
+        }
+
+        private static void ShowPasswordPopup(WiFiAP wifiAp)
+        {
+            if (wifiAp.SecurityInformation.SecurityType == WiFiSecurityType.None)
+            {
+                wifiAp.ConnectAsync();
+                return;
+            }
+
+            var view = new WifiPasswordPopupView(wifiAp);
+            var popup = new Common.Utils.Popup(view, centered: true);
+            view.OnDismiss += popup.Dismiss;
+            popup.Show();
+        }
+
         private void DisposeView()
         {
             wifiView?.Dispose();
             wifiView = null;
+            ApManager.Dispose();
+            State.Dispose();
             WiFiManager.ConnectionStateChanged -= connectionChanged;
             connectionChanged = null;
         }
+
+        private void SubscribeEvents()
+        {
+            if (wifiView is null)
+            {
+                return;
+            }
+
+            wifiView.Scan.Clicked += async (s, e) =>
+            {
+                wifiView.Scan.IsEnabled = false;
+                ApManager.UpdateTo(await State.Scan());
+                wifiView.Scan.IsEnabled = State.IsTurnedOn;
+            };
+
+            wifiView.WifiOff.Clicked += async (s, e) =>
+            {
+                wifiView.WifiOff.IsEnabled = false;
+                ApManager.Views.Clear();
+                await State.TurnWifi();
+                wifiView.WifiOff.IsEnabled = true;
+            };
+
+            State.OnTurnedOff += () =>
+            {
+                ApManager.Views.Clear();
+                wifiView.TurnOff("WIFI_TURN_ON_WIFI", State.IsTurnedOn);
+            };
+            State.OnTurnedOn += () => wifiView.TurnOn(State.IsTurnedOn);
+            State.OnTurningOnFailed += () => wifiView.TurnOff("WIFI_CONNECTION_FAILED", State.IsTurnedOn);
+            State.OnScanStarted += wifiView.StartScan;
+            State.OnScanFinished += wifiView.FinishScan;
+        }
     }
 }
index 942d8ba..0be5140 100644 (file)
@@ -82,7 +82,7 @@ namespace Oobe
 
             current = steps.First;
             current.Value.Value.Initialize();
-            ui.Push(current.Value.Value.CreateView(new NavigationController(this, current.Value.Value)));
+            ui.Push(current.Value.Value.CreateXamlView(new NavigationController(this, current.Value.Value)));
             ui.BackKeyPressed += (obj, args) =>
             {
                 Previous();
@@ -118,7 +118,7 @@ namespace Oobe
             if (current.Next != null)
             {
                 current = current.Next;
-                ui.Push(current.Value.Value.CreateView(new NavigationController(this, current.Value.Value)));
+                ui.Push(current.Value.Value.CreateXamlView(new NavigationController(this, current.Value.Value)));
                 current.Next?.Value.Value.Initialize();
 
                 // do not show pagination on last page
index 60d0d7a..4134679 100644 (file)
@@ -24,7 +24,7 @@
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="10.0.0.17150">
+    <PackageReference Include="Tizen.NET" Version="10.0.0.17172">
       <ExcludeAssets>Runtime</ExcludeAssets>
     </PackageReference>
     <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
@@ -43,9 +43,5 @@
     <ProjectReference Include="..\Oobe.Wifi\Oobe.Wifi.csproj" />
   </ItemGroup>
 
-  <PropertyGroup>
-    <NeedInjection>False</NeedInjection>
-  </PropertyGroup>
-
 </Project>
 
diff --git a/Oobe/Oobe/Oobe.csproj.bak b/Oobe/Oobe/Oobe.csproj.bak
new file mode 100644 (file)
index 0000000..83fedc0
--- /dev/null
@@ -0,0 +1,47 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>tizen10.0</TargetFramework>
+    <LangVersion>8.0</LangVersion>
+    <TargetFrameworkIdentifier>Tizen</TargetFrameworkIdentifier>
+    <CodeAnalysisRuleSet>../Settings.StyleCop</CodeAnalysisRuleSet>
+  </PropertyGroup>
+
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugType>portable</DebugType>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>None</DebugType>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <Folder Include="Controls\" />
+    <Folder Include="lib\" />
+    <Folder Include="res\" />
+    <AdditionalFiles Include="../stylecop.json" />
+    <AdditionalFiles Include="../Settings.StyleCop" />
+  </ItemGroup>
+
+  <ItemGroup>
+         <PackageReference Include="Tizen.NET" Version="9.0.0.16760">
+                 <ExcludeAssets>Runtime</ExcludeAssets>
+         </PackageReference>
+    <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />
+    <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
+      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+      <PrivateAssets>all</PrivateAssets>
+    </PackageReference>
+  </ItemGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\Oobe.Common\Oobe.Common.csproj" />
+    <ProjectReference Include="..\Oobe.Language\Oobe.Language.csproj" />
+    <ProjectReference Include="..\Oobe.Region\Oobe.Region.csproj" />
+    <ProjectReference Include="..\Oobe.Welcome\Oobe.Welcome.csproj" />
+    <ProjectReference Include="..\Oobe.Terms\Oobe.Terms.csproj" />
+    <ProjectReference Include="..\Oobe.Wifi\Oobe.Wifi.csproj" />
+  </ItemGroup>
+
+</Project>
+
index ff4e738..85823c7 100644 (file)
  * limitations under the License.
  */
 
-using System.Threading.Tasks;
+using System;
+using System.Collections.Generic;
 using System.Linq;
+using System.Threading.Tasks;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-using System.Collections.Generic;
-using System;
 
 namespace ScalableUI
 {
index f9913d8..7ba7e89 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 using Oobe.Common.Utils;
-using System;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Components;