Implement Terms View
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Wed, 11 Mar 2020 18:24:49 +0000 (19:24 +0100)
committerLukasz Stanislawski/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics <l.stanislaws@samsung.com>
Fri, 20 Mar 2020 11:34:20 +0000 (12:34 +0100)
Current issues:
* The TextLabel is unable to handle properly text with very long lines.
  As a workaround the license has been splitted int lines 133 char
  width, which maps well to current OOBE ui.

23 files changed:
Oobe/Oobe.Terms/Model/TermsProvider.cs [new file with mode: 0644]
Oobe/Oobe.Terms/OobeTerms.csproj [moved from Oobe/OobeTerms/OobeTerms.csproj with 72% similarity]
Oobe/Oobe.Terms/Styles/SwitchStyles.cs [new file with mode: 0644]
Oobe/Oobe.Terms/Styles/TextLabelStyles.cs [new file with mode: 0644]
Oobe/Oobe.Terms/TermsStep.cs [new file with mode: 0644]
Oobe/Oobe.Terms/Views/TermsView.cs [new file with mode: 0644]
Oobe/Oobe.Terms/res/Rectangle 861.svg [new file with mode: 0644]
Oobe/Oobe.Terms/res/switch/07_check_off_active.png [new file with mode: 0644]
Oobe/Oobe.Terms/res/switch/07_check_off_disabled.png [new file with mode: 0644]
Oobe/Oobe.Terms/res/switch/07_check_on_active.png [new file with mode: 0644]
Oobe/Oobe.Terms/res/terms/en_GB.txt [new file with mode: 0644]
Oobe/Oobe.Terms/res/terms/ko_KR.txt [new file with mode: 0644]
Oobe/Oobe.Terms/res/terms/pl_PL.txt [new file with mode: 0644]
Oobe/Oobe/Managers/ProcessManager.cs
Oobe/Oobe/Oobe.csproj
Oobe/Oobe/Views/Page.cs
Oobe/OobeCommon/Styles/ButtonStyles.cs
Oobe/OobeCommon/res/02_CTA_empty_selected.svg [deleted file]
Oobe/OobeCommon/res/button/02_CTA_empty_disabled.svg [moved from Oobe/OobeCommon/res/02_CTA_empty_active.svg with 59% similarity]
Oobe/OobeLanguage/Model/LanguageManger.cs
Oobe/OobeRegion/Model/RegionManager.cs
Oobe/OobeRegion/res/regions_OOBE.xml
Oobe/OobeTerms/Class1.cs [deleted file]

diff --git a/Oobe/Oobe.Terms/Model/TermsProvider.cs b/Oobe/Oobe.Terms/Model/TermsProvider.cs
new file mode 100644 (file)
index 0000000..0716da4
--- /dev/null
@@ -0,0 +1,41 @@
+using System;
+using System.IO;
+using Tizen.System;
+
+namespace Oobe.Terms.Model
+{
+    public class TermsProvider
+    {
+        public TermsProvider()
+        {
+            TermsAccepted = false;
+        }
+
+        public string LoadTerms()
+        {
+            string terms = null;
+            var locale = SystemSettings.LocaleCountry;
+            var filename = Path.Combine(Tizen.Applications.CoreApplication.Current.DirectoryInfo.Resource , "terms" , locale + ".txt");
+
+            try {
+                terms = File.ReadAllText(filename);
+            } catch (Exception e) {
+                Tizen.Log.Debug("oobe", $"Unable to load terms: {e.Message}");
+                return null;
+            }
+            return terms;
+        }
+
+        public bool TermsAccepted { get; private set; }
+
+        public void AcceptTerms()
+        {
+            TermsAccepted = true;
+        }
+
+        public void DeclineTerms()
+        {
+            TermsAccepted = false;
+        }
+    }
+}
similarity index 72%
rename from Oobe/OobeTerms/OobeTerms.csproj
rename to Oobe/Oobe.Terms/OobeTerms.csproj
index 32a8584..0c3e8bc 100644 (file)
     </PackageReference>\r
     <PackageReference Include="Tizen.NET.Sdk" Version="1.0.9" />\r
   </ItemGroup>\r
+\r
+  <ItemGroup>\r
+    <ProjectReference Include="..\OobeCommon\OobeCommon.csproj" />\r
+  </ItemGroup>\r
+\r
+  <ItemGroup>\r
+    <Folder Include="res\" />\r
+  </ItemGroup>\r
 </Project>\r
diff --git a/Oobe/Oobe.Terms/Styles/SwitchStyles.cs b/Oobe/Oobe.Terms/Styles/SwitchStyles.cs
new file mode 100644 (file)
index 0000000..af750b4
--- /dev/null
@@ -0,0 +1,23 @@
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Oobe.Terms.Styles
+{
+    public class SwitchStyles
+    {
+        public static SwitchStyle IHaveReadAndAgreeSwitchStyle = new SwitchStyle
+        {
+            Thumb = 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",
+                },
+            },
+        };
+    }
+}
diff --git a/Oobe/Oobe.Terms/Styles/TextLabelStyles.cs b/Oobe/Oobe.Terms/Styles/TextLabelStyles.cs
new file mode 100644 (file)
index 0000000..f7af6ac
--- /dev/null
@@ -0,0 +1,52 @@
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace Oobe.Terms.Styles
+{
+    public class TextLabelStyles
+    {
+        public 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),
+            },
+            Size2D = new Size2D(456, 24),
+            PixelSize = 20.0f,
+            HorizontalAlignment = HorizontalAlignment.Begin,
+            FontFamily = "BreezeSans",
+            Ellipsis = false,
+        };
+        // workaround for issue with TextLabelStyle State not being applied
+        public 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),
+            },
+            Size2D = new Size2D(456, 24),
+            PixelSize = 20.0f,
+            HorizontalAlignment = HorizontalAlignment.Begin,
+            FontFamily = "BreezeSans",
+            Ellipsis = false,
+        };
+        public static TextLabelStyle GuideTextLabelStyle = new TextLabelStyle{
+            PixelSize = 13,
+            Ellipsis = false,
+            Size2D = new Size2D(456, 16),
+            TextColor = new Selector<Color>{
+                Normal = new Color(112.0f / 255.0f, 112.0f / 255.0f, 112.0f / 255.0f, 1.0f)
+            },
+        };
+        public 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,
+        };
+    }
+}
diff --git a/Oobe/Oobe.Terms/TermsStep.cs b/Oobe/Oobe.Terms/TermsStep.cs
new file mode 100644 (file)
index 0000000..96f4f18
--- /dev/null
@@ -0,0 +1,22 @@
+using Oobe.Common.Interfaces;\r
+using Tizen.NUI.BaseComponents;\r
+using Oobe.Terms.Model;\r
+using Oobe.Terms.Views;\r
+\r
+namespace Oobe.Terms\r
+{\r
+    public class TermsStep : ProcessStep\r
+    {\r
+        private TermsProvider provider;\r
+\r
+        public override void OnInitialized()\r
+        {\r
+            provider = new TermsProvider();\r
+        }\r
+\r
+        public override View CreateView(IProcessNavigation nav)\r
+        {\r
+            return new TermsView(nav, provider);\r
+         }\r
+    }\r
+}\r
diff --git a/Oobe/Oobe.Terms/Views/TermsView.cs b/Oobe/Oobe.Terms/Views/TermsView.cs
new file mode 100644 (file)
index 0000000..f80a7bb
--- /dev/null
@@ -0,0 +1,242 @@
+using Oobe.Common.Styles;
+using Oobe.Common.Interfaces;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+using Oobe.Terms.Model;
+using Oobe.Terms.Styles;
+
+namespace Oobe.Terms.Views
+{
+    public class TermsView : View
+    {
+        private TermsProvider termsProvider;
+
+        private Button nextButton;
+        private TextLabel agreeLabel;
+        private Switch agreeSwitch;
+        private TapGestureDetector tapGestureDetector;
+
+        private bool agreementCheckable;
+        private bool nextEnabled;
+
+        public TermsView(IProcessNavigation nav, TermsProvider terms)
+        {
+            termsProvider = terms;
+
+            tapGestureDetector = new TapGestureDetector();
+
+            TextLabel title = new TextLabel("Terms and Conditions");
+            title.Position2D = new Position2D(163, 20);
+            title.HorizontalAlignment = HorizontalAlignment.Center;
+            title.Size2D = new Size2D(857, 63);
+            title.TextColor = new Color(0, 20.0f / 255.0f, 71.0f / 255.0f, 1.0f);
+            title.PixelSize = 48.0f;
+            title.FontFamily = "BreezeSans";
+            title.FontStyle = FontsStyles.Light();
+
+            View bounding = new View();
+            bounding.BackgroundImage = NUIApplication.Current.DirectoryInfo.Resource + "Rectangle 861.svg";
+            bounding.Position2D = new Position2D(56 - 6, 95 - 6);
+            bounding.Size2D = new Size2D(1087, 347);
+
+            ScrollableBase scroller = new ScrollableBase();
+            scroller.Position2D = new Position2D(56 - 6 + 64, 95 - 6 + 24);
+            scroller.Size2D = new Size2D(1087 - 128, 347 - 48);
+
+            // Do not use style on content as it seriously impacts scrolling
+            // performance on ScrollableBase
+            TextLabel content = new TextLabel();
+            content.TextColor = new Color(0, 12.0f / 255.0f, 43.0f / 255.0f, 1.0f);
+            content.PointSize = 16.0f;
+            content.FontFamily = "BreezeSans";
+            content.Text = terms.LoadTerms();
+            content.LineWrapMode = LineWrapMode.Character;
+            content.EnableMarkup = true;
+            content.Focusable = false;
+            content.MultiLine = true;
+            content.HeightResizePolicy = ResizePolicyType.UseNaturalSize;
+            content.WidthResizePolicy = ResizePolicyType.FillToParent;
+
+            scroller.Add(content);
+            scroller.ScrollEvent += (object sender, ScrollableBase.ScrollEventArgs args) =>
+            {
+                if (IsScrolledToLastPage(sender as ScrollableBase))
+                {
+                    AgreementCheckable = true;
+                }
+            };
+
+            nextButton = new Button(ButtonStyles.Next);
+            nextButton.Position2D = new Position2D(888, 512);
+            nextButton.State = States.Disabled;
+            nextButton.IsEnabled = false;
+            nextButton.ClickEvent += (obj, args) =>
+            {
+                nav.Next();
+            };
+
+            Button prev = new Button(ButtonStyles.Previous);
+            prev.Position2D = new Position2D(56, 512);
+            prev.ClickEvent += (obj, args) =>
+            {
+                nav.Previous();
+            };
+
+            TextLabel guide = new TextLabel();
+            guide.Position2D = new Position2D(155, 442);
+            guide.Text = "(You must scroll down and read the whole texts above)";
+
+            agreeSwitch = new Switch(SwitchStyles.IHaveReadAndAgreeSwitchStyle);
+            agreeSwitch.Size2D = new Size2D(24, 24);
+            agreeSwitch.Position2D = new Position2D(115, 463);
+            agreeSwitch.IsSelected = false;
+            agreeSwitch.IsEnabled = false;
+            agreeSwitch.ClickEvent += (obj, args) =>
+            {
+                TermsToggle();
+            };
+
+            agreeLabel = new TextLabel(TextLabelStyles.IHaveReadAndAgreeTextStyleDisabled);
+            agreeLabel.State = States.Disabled;
+            agreeLabel.Text = "I have read and agree to the Terms and Conditions";
+            agreeLabel.Position2D = new Position2D(155, 463);
+
+            this.Add(title);
+            this.Add(prev);
+            this.Add(nextButton);
+            this.Add(bounding);
+            this.Add(scroller);
+            this.Add(agreeSwitch);
+            this.Add(agreeLabel);
+            this.Add(guide);
+
+            if (terms.TermsAccepted)
+            {
+                AgreementCheckable = true;
+                NextEnabled = true;
+            }
+            else
+            {
+                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(scroller))
+                {
+                    AgreementCheckable = true;
+                }
+                return false;
+            };
+            timer.Start();
+
+        }
+
+        private bool NextEnabled
+        {
+            get
+            {
+                return nextEnabled;
+            }
+            set
+            {
+                if (nextEnabled == value) return;
+                if (value)
+                {
+                    nextButton.State = States.Normal;
+                    nextButton.IsEnabled = true;
+                    agreeSwitch.IsSelected = true;
+                }
+                else
+                {
+                    nextButton.State = States.Disabled;
+                    nextButton.IsEnabled = false;
+                    agreeSwitch.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);
+                    agreeSwitch.IsEnabled = true;
+                    agreeSwitch.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);
+                    agreeSwitch.IsEnabled = false;
+                    agreeSwitch.State = States.Disabled;
+                    tapGestureDetector.Detected -= OnTapGestureDetected;
+                    tapGestureDetector.Detach(agreeLabel);
+                }
+                agreementCheckable = value;
+            }
+        }
+
+        private bool IsScrolledToLastPage(ScrollableBase scroller)
+        {
+            if (scroller != null && scroller.ChildCount > 0)
+            {
+                var content = scroller.Children[0];
+                var diff = content.Position.Y + content.Size2D.Height - scroller.CurrentSize.Height;
+
+                if ((content.Position.Y + content.Size2D.Height - scroller.CurrentSize.Height) < 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()
+        {
+            if (!termsProvider.TermsAccepted)
+            {
+                termsProvider.AcceptTerms();
+                NextEnabled = true;
+            }
+            else
+            {
+                termsProvider.DeclineTerms();
+                NextEnabled = false;
+            }
+        }
+    }
+
+}
diff --git a/Oobe/Oobe.Terms/res/Rectangle 861.svg b/Oobe/Oobe.Terms/res/Rectangle 861.svg
new file mode 100644 (file)
index 0000000..c275304
--- /dev/null
@@ -0,0 +1,14 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1087" height="347" viewBox="0 0 1087 347">\r
+  <defs>\r
+    <filter id="Rectangle_861" x="0" y="0" width="1087" height="347" filterUnits="userSpaceOnUse">\r
+      <feOffset dx="1" dy="1" input="SourceAlpha"/>\r
+      <feGaussianBlur stdDeviation="2.5" result="blur"/>\r
+      <feFlood flood-opacity="0.161"/>\r
+      <feComposite operator="in" in2="blur"/>\r
+      <feComposite in="SourceGraphic"/>\r
+    </filter>\r
+  </defs>\r
+  <g transform="matrix(1, 0, 0, 1, 0, 0)" filter="url(#Rectangle_861)">\r
+    <rect id="Rectangle_861-2" data-name="Rectangle 861" width="1072" height="332" rx="28" transform="translate(6.5 6.5)" fill="#fff"/>\r
+  </g>\r
+</svg>\r
diff --git a/Oobe/Oobe.Terms/res/switch/07_check_off_active.png b/Oobe/Oobe.Terms/res/switch/07_check_off_active.png
new file mode 100644 (file)
index 0000000..48f9485
Binary files /dev/null and b/Oobe/Oobe.Terms/res/switch/07_check_off_active.png differ
diff --git a/Oobe/Oobe.Terms/res/switch/07_check_off_disabled.png b/Oobe/Oobe.Terms/res/switch/07_check_off_disabled.png
new file mode 100644 (file)
index 0000000..9d09cf4
Binary files /dev/null and b/Oobe/Oobe.Terms/res/switch/07_check_off_disabled.png differ
diff --git a/Oobe/Oobe.Terms/res/switch/07_check_on_active.png b/Oobe/Oobe.Terms/res/switch/07_check_on_active.png
new file mode 100644 (file)
index 0000000..6ff251a
Binary files /dev/null and b/Oobe/Oobe.Terms/res/switch/07_check_on_active.png differ
diff --git a/Oobe/Oobe.Terms/res/terms/en_GB.txt b/Oobe/Oobe.Terms/res/terms/en_GB.txt
new file mode 100644 (file)
index 0000000..93d6c9e
--- /dev/null
@@ -0,0 +1,51 @@
+<b>Terms of Service For Product</b>
+
+Effective Date: [2016.11.09]
+Corporation Co., Ltd. together with its Affiliates (\"Corporation\", \"we\", \"us\", or \"our\") is pleased to offer you Product, an
+application for the Corporation Smart Refrigerator and other mobile devices that allows you to access content, information and
+application by Corporation, its licensors, and/or its third party contractors (\"Service\"). This Agreement (\"Agreement\") is a
+binding contract between you and Corporation which governs the use of the Service. The Service is only for your own personal use.
+You may not use the Service for any commercial purpose or in any way not expressly permitted by this Agreement. PLEASE READ THIS
+AGREEMENT CAREFULLY BEFORE ACCESSING OR USING THE SERVICE BECAUSE IT CONSTITUTES A BINDING LEGAL AGREEMENT BETWEEN YOU AND
+CORPORATION.
+
+BY ACCESSING OR USING THE SERVICE, YOU ACKNOWLEDGE THAT YOU HAVE READ AND UNDERSTOOD THIS AGREEMENT, AND YOU AGREE TO COMPLY WITH AND
+BE BOUND BY ITS TERMS.  IF YOU ARE NOT WILLING TO BE BOUND BY THE TERMS OF THIS AGREEMENT, YOU MAY NOT ACCESS OR USE THE SERVICE.
+This Agreement incorporates the Corporation Account Terms and Conditions, located at
+https://account.corporation.com/membership/terms, that you may have already agreed to for your single sign-on user account with
+Corporation. If there is any conflict between this Agreement and the Corporation Account Terms and Conditions, this Agreement will
+prevail as specifically related to the Service, but only to the extent of actual conflict. Your use of the Service is subject to
+Corporation's privacy policy, located at http://www.corporation.com/us/common/privacy.html (\"Privacy Policy\"), which is hereby
+incorporated by this reference, and other policies that Corporation may adopt from time to time.
+Corporation may modify this Agreement from time to time. If we change this Agreement, we will update the Effective Date listed above.
+If you continue to access or use the Service after such modification, you will be deemed to have read, understood and unconditionally
+agreed to such changes.
+THE SERVICE IS NOT INTENDED FOR USE BY ANYONE UNDER THE AGE OF 13. IF YOU ARE UNDER THE AGE OF 13, YOU MAY NOT USE THE SERVICE OR
+PROVIDE CORPORATION WITH ANY PERSONALLY IDENTIFIABLE INFORMATION. If you are 13 or older but under the age of 18, you represent that
+you have reviewed these terms and conditions with your parent or legal guardian and that you and your parent or guardian understand
+and consent to these terms and conditions. If you are a parent or guardian permitting a person under the age of 18 (\"Minor\") to use
+the Service, you agree to: (i) supervise the Minor's use of the Service; (ii) assume all risks associated with the Minor's use of the
+Service, including the transmission of content to and from third parties via the Internet; (iii) assume any liability resulting from
+the Minor's use of the Service; (iv) ensure the accuracy and truthfulness of all information submitted by the Minor; and (v) assume
+responsibility and are bound by this Agreement for the Minor's access and use of the Service.
+
+1. The Services
+1.1 The Services are provided to you by Corporation and in some cases, by Corporation's Affiliates (as defined hereunder) on behalf
+of Corporation. You agree that Corporation's Affiliates are each entitled to provide the Services to you under this Agreement.
+1.2 When you access the Service, you may be asked to create an account and provide certain information including, without limitation,
+    a valid email address. You acknowledge and agree that you are solely responsible for the form, content and accuracy of any
+    content placed by you on the Service. Use of the Service will require your devices to have access or connection via mobile
+    network or Internet (fees may apply), and may require updates or upgrades from time to time. You agree that Corporation may
+    automatically download and install updates onto your device from time to time. Because use of the Service involves hardware,
+    software, and Internet access, your ability to use the Service may be affected by the reliability and performance of such system
+    requirements. You acknowledge and agree that such system requirements, which may be changed from time to time, are your
+    responsibility. You also acknowledge that the Service will not be available in all countries or on all devices, and may be
+    subject to restrictions imposed by your network carrier or Internet provider. You are solely responsible for any charges incurred
+    from your network provider related to the use of the Service.
+1.3 The Services are provided only for your personal, noncommercial use. Subject to the terms and conditions of this Agreement,
+    Corporation hereby grants you, and you accept, a limited, personal, nonexclusive, nontransferable and revocable right to use the
+    Service only as authorized in this Agreement and in any applicable separate terms from Corporation. Access to the Services is
+    licensed, not sold to you. All references to the Services include all related content, such as video, music, text, pictures,
+    graphics, user interfaces, scripts and software used to implement and provide access to the Services, and any updates, upgrades,
+    enhancements, modifications, revisions or additions to the Services made available by Corporation. However, Corporation is under
+    no obligation to provide any updates, upgrades, enhancements, modifications, revisions or additions to the Services.
diff --git a/Oobe/Oobe.Terms/res/terms/ko_KR.txt b/Oobe/Oobe.Terms/res/terms/ko_KR.txt
new file mode 100644 (file)
index 0000000..13ce66e
--- /dev/null
@@ -0,0 +1,27 @@
+"제1조(목적 예시)
+이 '예시문'은 사업자가 운영하는 서비스를 이용함에 있어 사업자와 이용자의 권리·의무 및 책임사항을 예시하고자 합니다. 실제 본문 내용은 각 사업자가 채워넣어야 합니다.
+
+
+제2조(정의 예시)
+① \"서비스\"란 사업자가 재화 또는 용역을 이용자에게 제공하기 위하여 컴퓨터 등 정보통신설비를 이용하여 재화 또는 용역을 거래하는 행위를 의미합니다.
+
+② \"이용자\"란 \"서비스\"에 접속하여 이 약관에 따라 \"서비스\"를 사용하는 사람을 말합니다.
+
+
+제3조 (약관의 명시와 개정 예시)
+① \"서비스\"는 이 약관의 내용을 이용자가 알 수 있도록 합니다.
+
+② 이 약관에서 정하지 아니한 사항과 이 약관의 해석에 관하여는 관례에 따릅니다.
+
+
+제4조(서비스의 제공 및 변경 예시)
+① \"서비스\"는 다음과 같은 업무를 수행합니다.
+1. \"서비스\"가 정하는 업무
+
+② \"서비스\"는 기술적 사양의 변경 등의 경우에는 장차 체결되는 계약에 의해 제공할 재화·용역의 내용을 변경할 수 있습니다. 이 경우에는 변경된 재화·용역의 내용 및 제공일자를 명시하여 현재의 재화·용역의 내용을 게시한 곳에 그 제공일자 이전에 공지합니다.
+
+③ \"서비스\"가 제공하기로 이용자와 계약을 체결한 서비스의 내용을 재화의 품절 또는 기술적 사양의 변경 등의 사유로 변경할 경우에는 \"서비스\"는 이로 인하여 이용자가 입은 손해를 배상합니다. 단, \"서비스\"에 고의 또는 과실이 없는 경우에는 그러하지 아니합니다.
+
+
+제5조(서비스의 중단 예시)
+① \"서비스\"는 컴퓨터 등 정보통신설비의 보수점검·교체 및 고장, 통신의 두절 등의 사유가 발생한 경우에는 서비스의 제공을 일시적으로 중단할 수 있습니다.
diff --git a/Oobe/Oobe.Terms/res/terms/pl_PL.txt b/Oobe/Oobe.Terms/res/terms/pl_PL.txt
new file mode 100644 (file)
index 0000000..dddd337
--- /dev/null
@@ -0,0 +1,51 @@
+<b>Zasady i warunki użytkowania produktu</b>
+
+Effective Date: [2016.11.09]
+Corporation Co., Ltd. together with its Affiliates (\"Corporation\", \"we\", \"us\", or \"our\") is pleased to offer you Product, an
+application for the Corporation Smart Refrigerator and other mobile devices that allows you to access content, information and
+application by Corporation, its licensors, and/or its third party contractors (\"Service\"). This Agreement (\"Agreement\") is a
+binding contract between you and Corporation which governs the use of the Service. The Service is only for your own personal use.
+You may not use the Service for any commercial purpose or in any way not expressly permitted by this Agreement. PLEASE READ THIS
+AGREEMENT CAREFULLY BEFORE ACCESSING OR USING THE SERVICE BECAUSE IT CONSTITUTES A BINDING LEGAL AGREEMENT BETWEEN YOU AND
+CORPORATION.
+
+BY ACCESSING OR USING THE SERVICE, YOU ACKNOWLEDGE THAT YOU HAVE READ AND UNDERSTOOD THIS AGREEMENT, AND YOU AGREE TO COMPLY WITH AND
+BE BOUND BY ITS TERMS.  IF YOU ARE NOT WILLING TO BE BOUND BY THE TERMS OF THIS AGREEMENT, YOU MAY NOT ACCESS OR USE THE SERVICE.
+This Agreement incorporates the Corporation Account Terms and Conditions, located at
+https://account.corporation.com/membership/terms, that you may have already agreed to for your single sign-on user account with
+Corporation. If there is any conflict between this Agreement and the Corporation Account Terms and Conditions, this Agreement will
+prevail as specifically related to the Service, but only to the extent of actual conflict. Your use of the Service is subject to
+Corporation's privacy policy, located at http://www.corporation.com/us/common/privacy.html (\"Privacy Policy\"), which is hereby
+incorporated by this reference, and other policies that Corporation may adopt from time to time.
+Corporation may modify this Agreement from time to time. If we change this Agreement, we will update the Effective Date listed above.
+If you continue to access or use the Service after such modification, you will be deemed to have read, understood and unconditionally
+agreed to such changes.
+THE SERVICE IS NOT INTENDED FOR USE BY ANYONE UNDER THE AGE OF 13. IF YOU ARE UNDER THE AGE OF 13, YOU MAY NOT USE THE SERVICE OR
+PROVIDE CORPORATION WITH ANY PERSONALLY IDENTIFIABLE INFORMATION. If you are 13 or older but under the age of 18, you represent that
+you have reviewed these terms and conditions with your parent or legal guardian and that you and your parent or guardian understand
+and consent to these terms and conditions. If you are a parent or guardian permitting a person under the age of 18 (\"Minor\") to use
+the Service, you agree to: (i) supervise the Minor's use of the Service; (ii) assume all risks associated with the Minor's use of the
+Service, including the transmission of content to and from third parties via the Internet; (iii) assume any liability resulting from
+the Minor's use of the Service; (iv) ensure the accuracy and truthfulness of all information submitted by the Minor; and (v) assume
+responsibility and are bound by this Agreement for the Minor's access and use of the Service.
+
+1. The Services
+1.1 The Services are provided to you by Corporation and in some cases, by Corporation's Affiliates (as defined hereunder) on behalf
+of Corporation. You agree that Corporation's Affiliates are each entitled to provide the Services to you under this Agreement.
+1.2 When you access the Service, you may be asked to create an account and provide certain information including, without limitation,
+    a valid email address. You acknowledge and agree that you are solely responsible for the form, content and accuracy of any
+    content placed by you on the Service. Use of the Service will require your devices to have access or connection via mobile
+    network or Internet (fees may apply), and may require updates or upgrades from time to time. You agree that Corporation may
+    automatically download and install updates onto your device from time to time. Because use of the Service involves hardware,
+    software, and Internet access, your ability to use the Service may be affected by the reliability and performance of such system
+    requirements. You acknowledge and agree that such system requirements, which may be changed from time to time, are your
+    responsibility. You also acknowledge that the Service will not be available in all countries or on all devices, and may be
+    subject to restrictions imposed by your network carrier or Internet provider. You are solely responsible for any charges incurred
+    from your network provider related to the use of the Service.
+1.3 The Services are provided only for your personal, noncommercial use. Subject to the terms and conditions of this Agreement,
+    Corporation hereby grants you, and you accept, a limited, personal, nonexclusive, nontransferable and revocable right to use the
+    Service only as authorized in this Agreement and in any applicable separate terms from Corporation. Access to the Services is
+    licensed, not sold to you. All references to the Services include all related content, such as video, music, text, pictures,
+    graphics, user interfaces, scripts and software used to implement and provide access to the Services, and any updates, upgrades,
+    enhancements, modifications, revisions or additions to the Services made available by Corporation. However, Corporation is under
+    no obligation to provide any updates, upgrades, enhancements, modifications, revisions or additions to the Services.
index 20cabf5..6cc8f60 100644 (file)
@@ -8,6 +8,7 @@ using Oobe.Region;
 using System;
 using Oobe.Wifi;
 using System.IO;
+using Oobe.Terms;
 
 namespace Oobe
  {
@@ -25,7 +26,9 @@ namespace Oobe
             steps = new LinkedList<Lazy<ProcessStep>>(new []{
                 new Lazy<ProcessStep>(() => new LanguageStep()),
                 new Lazy<ProcessStep>(() => new RegionStep()),
-                new Lazy<ProcessStep>(() => new WelcomeStep())}
+                new Lazy<ProcessStep>(() => new TermsStep()),
+                new Lazy<ProcessStep>(() => new WelcomeStep()),
+                }
             );
             //only for review
             steps.AddFirst(new Lazy<ProcessStep>(() => new WifiStep()));
index f656a6c..fa81795 100644 (file)
@@ -29,8 +29,8 @@
     <ProjectReference Include="..\OobeCommon\OobeCommon.csproj" />
     <ProjectReference Include="..\OobeLanguage\OobeLanguage.csproj" />
     <ProjectReference Include="..\OobeRegion\OobeRegion.csproj" />
-    <ProjectReference Include="..\OobeTerms\OobeTerms.csproj" />
     <ProjectReference Include="..\Oobe.Welcome\OobeWelcome.csproj" />
+    <ProjectReference Include="..\Oobe.Terms\OobeTerms.csproj" />
     <ProjectReference Include="..\OobeWifi\OobeWifi.csproj" />
   </ItemGroup>
 
index ad840d1..fc0865c 100644 (file)
@@ -39,11 +39,13 @@ namespace Oobe.Views
         public Page()
         {
             BackgroundImage = NUIApplication.Current.DirectoryInfo.Resource + "0_BG_WHITEsmall.svg";
+            this.Focusable = false;
             overlay = new View();
             overlay.BackgroundColor = Color.Black;
             overlay.Opacity = 0.5f;
             overlay.HeightResizePolicy = ResizePolicyType.FillToParent;
             overlay.WidthResizePolicy = ResizePolicyType.FillToParent;
+            overlay.Focusable = false;
         }
 
     }
index b8975cd..4c77f7c 100644 (file)
@@ -36,6 +36,7 @@ namespace Oobe.Common.Styles
             {
                 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
             {
@@ -50,4 +51,4 @@ namespace Oobe.Common.Styles
             Size2D = new Size2D(240, 72),
         };
     }
-}
\ No newline at end of file
+}
diff --git a/Oobe/OobeCommon/res/02_CTA_empty_selected.svg b/Oobe/OobeCommon/res/02_CTA_empty_selected.svg
deleted file mode 100644 (file)
index b9464a5..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg id="_02_CTA_empty_selected" data-name="02_CTA_empty_selected" xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72">\r
-  <rect id="Rectangle_346" data-name="Rectangle 346" width="240" height="72" rx="28" fill="#2b5fb9"/>\r
-</svg>\r
@@ -1,3 +1,3 @@
-<svg id="_02_CTA_empty_selected" data-name="02_CTA_empty_selected" xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72">\r
-  <rect id="Rectangle_346" data-name="Rectangle 346" width="240" height="72" rx="28" fill="#0a0e4a"/>\r
+<svg id="_02_CTA_empty_disabled" data-name="02_CTA_empty_disabled" xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72">\r
+  <rect id="Rectangle_346" data-name="Rectangle 346" width="240" height="72" rx="28" fill="#c3cad2"/>\r
 </svg>\r
index 7d3a59c..977dd23 100644 (file)
@@ -32,10 +32,9 @@ namespace Oobe.Language.Model
             {
                 if (value != null)
                 {
-                    SystemSettings.LocaleCountry = value.Code;
                     SystemSettings.LocaleLanguage = value.Code;
                 }
             }
         }
     }
-}
\ No newline at end of file
+}
index b097f9a..101988c 100644 (file)
@@ -38,6 +38,7 @@ namespace Oobe.Region.Model
                 if (value != null)
                 {
                     SystemSettings.LocaleTimeZone = value.Timezone;
+                    SystemSettings.LocaleCountry = value.CountryCode;
                     try {
                         Vconf.SetString(CountryCodeVconfKey, value.CountryCode);
                         Vconf.SetString(CityNameIdVconfKey, value.CityName);
@@ -50,4 +51,4 @@ namespace Oobe.Region.Model
             }
         }
     }
-}
\ No newline at end of file
+}
index b49c6ca..8a411d8 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <regions>
-  <region code="GB" name="United Kingdom" timezone="Europe/London" cityname="IDS_WCL_BODY_CITYNAME_LONDON" />
-  <region code="DE" name="Germany" timezone="Europe/Berlin" cityname="IDS_WCL_BODY_CITYNAME_BERLIN" />
-  <region code="PL" name="Poland" timezone="Europe/Warsaw" cityname="IDS_WCL_BODY_CITYNAME_WARSAW" />
+  <region code="en_GB" name="United Kingdom" timezone="Europe/London" />
+  <region code="ko_KR" name="South Korea" timezone="Asia/Seoul" />
+  <region code="pl_PL" name="Poland" timezone="Europe/Warsaw"  />
 </regions>
diff --git a/Oobe/OobeTerms/Class1.cs b/Oobe/OobeTerms/Class1.cs
deleted file mode 100644 (file)
index c110a4e..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-using System;\r
-\r
-namespace Oobe.Terms\r
-{\r
-    public class Class1\r
-    {\r
-    }\r
-}\r