Update Advanced Setting page. 00/285900/1
authorAkash <akash1.kumar@samsung.com>
Thu, 22 Dec 2022 06:33:24 +0000 (12:03 +0530)
committerAkash <akash1.kumar@samsung.com>
Thu, 22 Dec 2022 06:33:24 +0000 (12:03 +0530)
This patch adds 'Network Notification', 'SortBy' and 'Install Certificate' options on Advanced setting page.

Change-Id: I2cc2b170587ba726a18ef43244331839058af750
Signed-off-by: Akash <akash1.kumar@samsung.com>
SettingWiFi/SettingWiFi/res/locale/Resources.Designer.cs
SettingWiFi/SettingWiFi/res/locale/Resources.en.resx
SettingWiFi/SettingWiFi/res/locale/Resources.ko-KR.resx
SettingWiFi/SettingWiFi/res/locale/Resources.resx
SettingWiFi/SettingWiFi/view/AdvancedPage.cs
packaging/org.tizen.cssetting-wifi-1.0.0.tpk

index b2e53d4923a8a7efeea885fa9a31760c424c0685..141b3fef641ce62495f18c74d49a5a2a184a9247 100755 (executable)
@@ -793,6 +793,27 @@ namespace SettingWiFi.res.locale
                 return ResourceManager.GetString("IDS_ST_BUTTON_SECURITY_ABB", resourceCulture);
             }
         }
+        public static string IDS_WIFI_CERTIFICATE_SEARCH_RESULTS
+        {
+            get
+            {
+                return ResourceManager.GetString("IDS_WIFI_CERTIFICATE_SEARCH_RESULTS", resourceCulture);
+            }
+        }
+        public static string IDS_WIFI_NO_CERTIFICATE_FOUND
+        {
+            get
+            {
+                return ResourceManager.GetString("IDS_WIFI_NO_CERTIFICATE_FOUND", resourceCulture);
+            }
+        }
+        public static string IDS_WIFI_AFTER_YOU_INSTALL_THEY_WILL_BE_SHOWN_HERE
+        {
+            get
+            {
+                return ResourceManager.GetString("IDS_WIFI_AFTER_YOU_INSTALL_THEY_WILL_BE_SHOWN_HERE", resourceCulture);
+            }
+        }
 
     }
 }
index 278a14170e303192723a4cb8801704952b686ba0..e138bc76be331a811c4aedd1d3113fb93ac5512b 100755 (executable)
   <data name="IDS_ST_BUTTON_SECURITY_ABB" xml:space="preserve">\r
     <value>Security</value>\r
   </data>\r
-\r
-}\r
-</root>
\ No newline at end of file
+  <data name="IDS_WIFI_CERTIFICATE_SEARCH_RESULTS" xml:space="preserve">\r
+    <value>Certificate Search Results</value>\r
+  </data>\r
+  <data name="IDS_WIFI_NO_CERTIFICATE_FOUND" xml:space="preserve">\r
+    <value>No certificate found.</value>\r
+  </data>\r
+  <data name="IDS_WIFI_AFTER_YOU_INSTALL_THEY_WILL_BE_SHOWN_HERE" xml:space="preserve">\r
+    <value>After you install, they will be shown here.</value>\r
+  </data>\r
+</root>\r
index 1f18289cebb159d5e428113ae97cbd9a4df4b637..a93cdd5193281fc9ad4c0224bcc755c8824eb9d8 100755 (executable)
   <data name="IDS_ST_BUTTON_SECURITY_ABB" xml:space="preserve">\r
     <value>보호</value>\r
   </data>\r
-</root>
\ No newline at end of file
+  <data name="IDS_WIFI_CERTIFICATE_SEARCH_RESULTS" xml:space="preserve">\r
+    <value>인증서 검색 결과</value>\r
+  </data>\r
+  <data name="IDS_WIFI_NO_CERTIFICATE_FOUND" xml:space="preserve">\r
+    <value>인증서를 찾을 수 없습니다.</value>\r
+  </data>\r
+  <data name="IDS_WIFI_AFTER_YOU_INSTALL_THEY_WILL_BE_SHOWN_HERE" xml:space="preserve">\r
+    <value>설치가 완료되면 여기에 표시됩니다.</value>\r
+  </data>\r
+</root>\r
index 865cfb148764d2c430bfa5e69339c7d828c2384f..aca77fc7eb7ba7f221d5aed59e050dc18834da7d 100755 (executable)
   <data name="IDS_ST_BUTTON_SECURITY_ABB" xml:space="preserve">\r
     <value />\r
   </data>\r
-</root>
\ No newline at end of file
+  <data name="IDS_WIFI_CERTIFICATE_SEARCH_RESULTS" xml:space="preserve">\r
+    <value />\r
+  </data>\r
+  <data name="IDS_WIFI_NO_CERTIFICATE_FOUND" xml:space="preserve">\r
+    <value />\r
+  </data>\r
+  <data name="IDS_WIFI_AFTER_YOU_INSTALL_THEY_WILL_BE_SHOWN_HERE" xml:space="preserve">\r
+    <value />\r
+  </data>\r
+</root>\r
index b5c7fbb56a4c8aa496ba05e4dc5c8f957390c8c1..4e581e70cf1dbe2a31367dd6fb1661b12501d1ab 100644 (file)
@@ -2,12 +2,12 @@ using System.Collections.Generic;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Components;
+using Tizen.NUI.Binding;
 using SettingWiFi.res.locale;
 using static SettingWiFi.Logger;
 
 namespace SettingWiFi
 {
-    //This class still need to be completed
     internal class AdvancedPage : ContentPage
     {
         private WiFi mWifi;
@@ -21,34 +21,146 @@ namespace SettingWiFi
         internal void CreateComponents(APSource apSource)
         {
             mApSource = apSource;
-
-            var findView = new View()
+            View advacedView = new View()
             {
                 Layout = new LinearLayout()
                 {
                     LinearOrientation = LinearLayout.Orientation.Vertical,
+                    HorizontalAlignment = HorizontalAlignment.Center,
                 },
-                WidthSpecification = 200,
-                HeightSpecification = 100,
+                WidthSpecification = LayoutParamPolicies.MatchParent,
+                HeightSpecification = LayoutParamPolicies.MatchParent,
+            };
+
+            var networkNotification = new DefaultLinearItem()
+            {
+                WidthSpecification = LayoutParamPolicies.MatchParent,
+                Text = Resources.IDS_ST_BODY_NETWORK_NOTIFICATION,
+                IsSelectable = false,
             };
+            networkNotification.Label.HorizontalAlignment = HorizontalAlignment.Begin;
+            networkNotification.SubText = Resources.IDS_WIFI_BODY_RECEIVE_NOTIFICATIONS_WHEN_NETWORKS_ARE_AVAILABLE;
 
-            var cancelButton = new Button()
+            var onOffSwitch = new Switch()
             {
-                Text = Resources.IDS_WIFI_SK_CANCEL,
-                WidthSpecification = 300,
-                HeightSpecification = 80,
+                IsSelected = false,
             };
-            cancelButton.Clicked += (object source, ClickedEventArgs args) =>
+            networkNotification.Extra = onOffSwitch;
+
+            advacedView.Add(networkNotification);
+
+            var sortBy = new DefaultLinearItem()
+            {
+
+                WidthSpecification = LayoutParamPolicies.MatchParent,
+                Text = Resources.IDS_WIFI_BODY_SORT_BY,
+                IsSelectable = false,
+
+            };
+
+            sortBy.Clicked += OnSortByClicked;
+            sortBy.SubLabel.SetBinding(TextLabel.TextProperty, "SortBy");
+            sortBy.SubLabel.HorizontalAlignment = HorizontalAlignment.Begin;
+
+            advacedView.Add(sortBy);
+
+            var installCertificate = new DefaultLinearItem()
+            {
+                WidthSpecification = LayoutParamPolicies.MatchParent,
+                Text = Resources.IDS_ST_BODY_INSTALL_CERTIFICATE,
+                IsSelectable = false,
+            };
+            installCertificate.Clicked += OnInstallCerticateClicked;
+            advacedView.Add(installCertificate);
+
+            AppBar = CreateAppBar(Resources.IDS_WIFI_BODY_ADVANCED_SETTINGS);
+            Content = advacedView;
+        }
+
+        private void OnSortByClicked(object sender, ClickedEventArgs ev)
+        {
+            // TO DO: Need to be completed.
+            // IDS_EMAIL_POP_ALPHABETICAL
+            // IDS_WIFI_MBODY_SIGNAL_STRENGTH_KOR_SKT
+        }
+
+        private void OnInstallCerticateClicked(object obj, ClickedEventArgs arg)
+        {
+            var page = new CertificateSearchPage(mWifi);
+            page.CreateComponents(mApSource);
+            Navigator.Push(page);
+        }
+
+        protected virtual AppBar CreateAppBar(string title)
+        {
+            var appBar = new AppBar()
+            {
+                Title = title,
+                AutoNavigationContent = false,
+            };
+            var appBarStyle = ThemeManager.GetStyle("Tizen.NUI.Components.AppBar");
+            var navigationContent = new Button(((AppBarStyle)appBarStyle).BackButton);
+            navigationContent.Clicked += (o, e) =>
             {
                 Navigator.Pop();
             };
 
-            Content = new AlertDialog()
+            appBar.NavigationContent = navigationContent;
+            return appBar;
+        }
+    }
+
+    internal class CertificateSearchPage : ContentPage
+    {
+        private WiFi mWifi;
+        private APSource mApSource;
+
+        internal CertificateSearchPage(WiFi wifi)
+        {
+            mWifi = wifi;
+        }
+
+        internal void CreateComponents(APSource apSource)
+        {
+            mApSource = apSource;
+            View certificateView = new View()
+            {
+                Layout = new LinearLayout()
+                {
+                    LinearOrientation = LinearLayout.Orientation.Vertical,
+                    HorizontalAlignment = HorizontalAlignment.Center,
+                },
+                WidthSpecification = LayoutParamPolicies.MatchParent,
+                HeightSpecification = LayoutParamPolicies.MatchParent,
+            };
+
+            // TO DO: First search certificate. if not found then show this text.
+            TextLabel viewInfo1 = new TextLabel(Resources.IDS_WIFI_NO_CERTIFICATE_FOUND);
+            TextLabel viewInfo2 = new TextLabel(Resources.IDS_WIFI_AFTER_YOU_INSTALL_THEY_WILL_BE_SHOWN_HERE);
+
+            certificateView.Add(viewInfo1);
+            certificateView.Add(viewInfo2);
+
+            AppBar = CreateAppBar(Resources.IDS_WIFI_CERTIFICATE_SEARCH_RESULTS);
+            Content = certificateView;
+        }
+
+        protected virtual AppBar CreateAppBar(string title)
+        {
+            var appBar = new AppBar()
             {
-                Title = Resources.IDS_ST_BODY_ADVANCED,
-                Content = findView,
-                Actions = new View[] { cancelButton, },
+                Title = title,
+                AutoNavigationContent = false,
             };
+            var appBarStyle = ThemeManager.GetStyle("Tizen.NUI.Components.AppBar");
+            var navigationContent = new Button(((AppBarStyle)appBarStyle).BackButton);
+            navigationContent.Clicked += (o, e) =>
+            {
+                Navigator.Pop();
+            };
+
+            appBar.NavigationContent = navigationContent;
+            return appBar;
         }
     }
 }
index 4faa118904453ced8abac9a78c6f66d6defbfd3c..b0ae111ebea32fc8fe7c8267982c5fc4b0e94ef7 100644 (file)
Binary files a/packaging/org.tizen.cssetting-wifi-1.0.0.tpk and b/packaging/org.tizen.cssetting-wifi-1.0.0.tpk differ