From cd5976983b5922c88e45dfd7ad7607bd88a32946 Mon Sep 17 00:00:00 2001 From: Lukasz Stanislawski Date: Wed, 11 Mar 2020 19:24:49 +0100 Subject: [PATCH] Implement Terms View 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. --- Oobe/Oobe.Terms/Model/TermsProvider.cs | 41 ++++ Oobe/{OobeTerms => Oobe.Terms}/OobeTerms.csproj | 8 + Oobe/Oobe.Terms/Styles/SwitchStyles.cs | 23 ++ Oobe/Oobe.Terms/Styles/TextLabelStyles.cs | 52 +++++ Oobe/Oobe.Terms/TermsStep.cs | 22 ++ Oobe/Oobe.Terms/Views/TermsView.cs | 242 +++++++++++++++++++++ Oobe/Oobe.Terms/res/Rectangle 861.svg | 14 ++ Oobe/Oobe.Terms/res/switch/07_check_off_active.png | Bin 0 -> 567 bytes .../res/switch/07_check_off_disabled.png | Bin 0 -> 583 bytes Oobe/Oobe.Terms/res/switch/07_check_on_active.png | Bin 0 -> 633 bytes Oobe/Oobe.Terms/res/terms/en_GB.txt | 51 +++++ Oobe/Oobe.Terms/res/terms/ko_KR.txt | 27 +++ Oobe/Oobe.Terms/res/terms/pl_PL.txt | 51 +++++ Oobe/Oobe/Managers/ProcessManager.cs | 5 +- Oobe/Oobe/Oobe.csproj | 2 +- Oobe/Oobe/Views/Page.cs | 2 + Oobe/OobeCommon/Styles/ButtonStyles.cs | 3 +- Oobe/OobeCommon/res/02_CTA_empty_selected.svg | 3 - .../02_CTA_empty_disabled.svg} | 4 +- Oobe/OobeLanguage/Model/LanguageManger.cs | 3 +- Oobe/OobeRegion/Model/RegionManager.cs | 3 +- Oobe/OobeRegion/res/regions_OOBE.xml | 6 +- Oobe/OobeTerms/Class1.cs | 8 - 23 files changed, 548 insertions(+), 22 deletions(-) create mode 100644 Oobe/Oobe.Terms/Model/TermsProvider.cs rename Oobe/{OobeTerms => Oobe.Terms}/OobeTerms.csproj (72%) create mode 100644 Oobe/Oobe.Terms/Styles/SwitchStyles.cs create mode 100644 Oobe/Oobe.Terms/Styles/TextLabelStyles.cs create mode 100644 Oobe/Oobe.Terms/TermsStep.cs create mode 100644 Oobe/Oobe.Terms/Views/TermsView.cs create mode 100644 Oobe/Oobe.Terms/res/Rectangle 861.svg create mode 100644 Oobe/Oobe.Terms/res/switch/07_check_off_active.png create mode 100644 Oobe/Oobe.Terms/res/switch/07_check_off_disabled.png create mode 100644 Oobe/Oobe.Terms/res/switch/07_check_on_active.png create mode 100644 Oobe/Oobe.Terms/res/terms/en_GB.txt create mode 100644 Oobe/Oobe.Terms/res/terms/ko_KR.txt create mode 100644 Oobe/Oobe.Terms/res/terms/pl_PL.txt delete mode 100644 Oobe/OobeCommon/res/02_CTA_empty_selected.svg rename Oobe/OobeCommon/res/{02_CTA_empty_active.svg => button/02_CTA_empty_disabled.svg} (59%) delete mode 100644 Oobe/OobeTerms/Class1.cs diff --git a/Oobe/Oobe.Terms/Model/TermsProvider.cs b/Oobe/Oobe.Terms/Model/TermsProvider.cs new file mode 100644 index 0000000..0716da4 --- /dev/null +++ b/Oobe/Oobe.Terms/Model/TermsProvider.cs @@ -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; + } + } +} diff --git a/Oobe/OobeTerms/OobeTerms.csproj b/Oobe/Oobe.Terms/OobeTerms.csproj similarity index 72% rename from Oobe/OobeTerms/OobeTerms.csproj rename to Oobe/Oobe.Terms/OobeTerms.csproj index 32a8584..0c3e8bc 100644 --- a/Oobe/OobeTerms/OobeTerms.csproj +++ b/Oobe/Oobe.Terms/OobeTerms.csproj @@ -12,4 +12,12 @@ + + + + + + + + diff --git a/Oobe/Oobe.Terms/Styles/SwitchStyles.cs b/Oobe/Oobe.Terms/Styles/SwitchStyles.cs new file mode 100644 index 0000000..af750b4 --- /dev/null +++ b/Oobe/Oobe.Terms/Styles/SwitchStyles.cs @@ -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 + { + 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 index 0000000..f7af6ac --- /dev/null +++ b/Oobe/Oobe.Terms/Styles/TextLabelStyles.cs @@ -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{ + 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{ + 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{ + 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{ + 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 index 0000000..96f4f18 --- /dev/null +++ b/Oobe/Oobe.Terms/TermsStep.cs @@ -0,0 +1,22 @@ +using Oobe.Common.Interfaces; +using Tizen.NUI.BaseComponents; +using Oobe.Terms.Model; +using Oobe.Terms.Views; + +namespace Oobe.Terms +{ + public class TermsStep : ProcessStep + { + private TermsProvider provider; + + public override void OnInitialized() + { + provider = new TermsProvider(); + } + + public override View CreateView(IProcessNavigation nav) + { + return new TermsView(nav, provider); + } + } +} diff --git a/Oobe/Oobe.Terms/Views/TermsView.cs b/Oobe/Oobe.Terms/Views/TermsView.cs new file mode 100644 index 0000000..f80a7bb --- /dev/null +++ b/Oobe/Oobe.Terms/Views/TermsView.cs @@ -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 index 0000000..c275304 --- /dev/null +++ b/Oobe/Oobe.Terms/res/Rectangle 861.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + 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 index 0000000000000000000000000000000000000000..48f948528907efb844607d9daac6e417aef3f5aa GIT binary patch literal 567 zcmV-70?7S|P)5Lp6o%h(qn+G*p&J>0fVj04l>UNFq6ao3fz z(}ga&tL|J%v6e!`O)~xj1zVTmA7};XA|JiYVD6C&bc_z25T?3nb~ky?`<#0?_nr{O zo_T3{XC4dC6)-M=&>q)R-Y|ASysb5TI!Nv3z{a4er|QD={JR8t1&y9&e9M6^$im%; z06S>644xI5FMwznnjWYuTsw>z0ZhAdp9Ec3Nz|QaSo2Z3oy|gHbCC5{OX(0W%v|G! zN~beFWJ}k72gX~KM(YI3OX;2cq2kb%n7E8fLI3W#WM4; zq5nJU%co7}Tu%_L0yJ0u+rm2lZD}e#9>gD>0npV7`~p*n+sJ#Q6XyT`002ovPDHLk FV1mZ920;J- literal 0 HcmV?d00001 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 index 0000000000000000000000000000000000000000..9d09cf49d8e55b9e2c2c9d1c33ec4e5eac13f37b GIT binary patch literal 583 zcmV-N0=WH&P)h>WSf#{W8YOJS(T3kgIv(?S53UFrJoOmUyVmk1^4nph%lr4Bl0; zu$+Y;4I9R0k;qO^s2k4#EGt=fk#;FdJgS+~*5Wz^+H8+vWIC-|vXDEh>#pxewkXtw zmGpmU*Q{iJ!aMFmfq~ULEKzE+{ht#3tA`fU-=2Wod*$B2Ga}rZE&0wehPHyZc?RHX z6xNzI!Pc4G-J!7qco~~T!5F7jtCjooHThDJ{^&3Tg1E7#q@U|}P*`g$fN5Sy|NJmS z0^L|ArWIB8pY}{H(9O%>|dg!KEZ)A1}Bi+2n;0It-N#I?MM>f-J zywfd7GGoD~1bB%+3oi5DhJN>;UauedX1yv{ltGyJi*L&|7@J_ksyua@h-`laegbb^ V1mO?kiv9oq002ovPDHLkV1loP5-k7# literal 0 HcmV?d00001 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 index 0000000000000000000000000000000000000000..6ff251ae2402e12fa15090a0f58e45b50ab8f94c GIT binary patch literal 633 zcmV-<0*3vGP)!RXLHWkIVV+udgJ-s_j`BmyLV;? zj+VFvh9tle05kxxsu=%-1;7Nj0geJnMN|IFe6cN^b6_9V>j>8RY=M`TQM&mdf+~PW zJP)vB6XMcRp2u@>j3!(_^O;xY#mn<3-DDY@GiMj?k-65>f%}I?SoRaiS>Sw#ArfB( z*iy5A^h6T5%~e>|AAIiq{s!SI1TX+L*bG333yr@1ahTV40QfNhEPzED1<-w?kV+YV;fScQ&fl zRNBD5Tu--Egf_ciQES;zjiYAgK9SV$l>LYx>B$uIt$e80L&R;ombL%z;0XNtKA8nP z7gKJtlZW$kGO9^~?VH=+oF4tGko5y-)~yNA-+o)_!MN@Iw!pw^S;x!my`1x3{m1?y T@wp2;00000NkvXXu0mjf3z{MP literal 0 HcmV?d00001 diff --git a/Oobe/Oobe.Terms/res/terms/en_GB.txt b/Oobe/Oobe.Terms/res/terms/en_GB.txt new file mode 100644 index 0000000..93d6c9e --- /dev/null +++ b/Oobe/Oobe.Terms/res/terms/en_GB.txt @@ -0,0 +1,51 @@ +Terms of Service For Product + +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 index 0000000..13ce66e --- /dev/null +++ b/Oobe/Oobe.Terms/res/terms/ko_KR.txt @@ -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 index 0000000..dddd337 --- /dev/null +++ b/Oobe/Oobe.Terms/res/terms/pl_PL.txt @@ -0,0 +1,51 @@ +Zasady i warunki użytkowania produktu + +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/Managers/ProcessManager.cs b/Oobe/Oobe/Managers/ProcessManager.cs index 20cabf5..6cc8f60 100644 --- a/Oobe/Oobe/Managers/ProcessManager.cs +++ b/Oobe/Oobe/Managers/ProcessManager.cs @@ -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>(new []{ new Lazy(() => new LanguageStep()), new Lazy(() => new RegionStep()), - new Lazy(() => new WelcomeStep())} + new Lazy(() => new TermsStep()), + new Lazy(() => new WelcomeStep()), + } ); //only for review steps.AddFirst(new Lazy(() => new WifiStep())); diff --git a/Oobe/Oobe/Oobe.csproj b/Oobe/Oobe/Oobe.csproj index f656a6c..fa81795 100644 --- a/Oobe/Oobe/Oobe.csproj +++ b/Oobe/Oobe/Oobe.csproj @@ -29,8 +29,8 @@ - + diff --git a/Oobe/Oobe/Views/Page.cs b/Oobe/Oobe/Views/Page.cs index ad840d1..fc0865c 100644 --- a/Oobe/Oobe/Views/Page.cs +++ b/Oobe/Oobe/Views/Page.cs @@ -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; } } diff --git a/Oobe/OobeCommon/Styles/ButtonStyles.cs b/Oobe/OobeCommon/Styles/ButtonStyles.cs index b8975cd..4c77f7c 100644 --- a/Oobe/OobeCommon/Styles/ButtonStyles.cs +++ b/Oobe/OobeCommon/Styles/ButtonStyles.cs @@ -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 index b9464a5..0000000 --- a/Oobe/OobeCommon/res/02_CTA_empty_selected.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Oobe/OobeCommon/res/02_CTA_empty_active.svg b/Oobe/OobeCommon/res/button/02_CTA_empty_disabled.svg similarity index 59% rename from Oobe/OobeCommon/res/02_CTA_empty_active.svg rename to Oobe/OobeCommon/res/button/02_CTA_empty_disabled.svg index 79eb1ae..9eb8959 100644 --- a/Oobe/OobeCommon/res/02_CTA_empty_active.svg +++ b/Oobe/OobeCommon/res/button/02_CTA_empty_disabled.svg @@ -1,3 +1,3 @@ - - + + diff --git a/Oobe/OobeLanguage/Model/LanguageManger.cs b/Oobe/OobeLanguage/Model/LanguageManger.cs index 7d3a59c..977dd23 100644 --- a/Oobe/OobeLanguage/Model/LanguageManger.cs +++ b/Oobe/OobeLanguage/Model/LanguageManger.cs @@ -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 +} diff --git a/Oobe/OobeRegion/Model/RegionManager.cs b/Oobe/OobeRegion/Model/RegionManager.cs index b097f9a..101988c 100644 --- a/Oobe/OobeRegion/Model/RegionManager.cs +++ b/Oobe/OobeRegion/Model/RegionManager.cs @@ -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 +} diff --git a/Oobe/OobeRegion/res/regions_OOBE.xml b/Oobe/OobeRegion/res/regions_OOBE.xml index b49c6ca..8a411d8 100644 --- a/Oobe/OobeRegion/res/regions_OOBE.xml +++ b/Oobe/OobeRegion/res/regions_OOBE.xml @@ -1,6 +1,6 @@ - - - + + + diff --git a/Oobe/OobeTerms/Class1.cs b/Oobe/OobeTerms/Class1.cs deleted file mode 100644 index c110a4e..0000000 --- a/Oobe/OobeTerms/Class1.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -namespace Oobe.Terms -{ - public class Class1 - { - } -} -- 2.7.4