add certificates gadget
authorYurii Zinchuk/Tizen Services & IoT (PLT) /SRPOL/Engineer/Samsung Electronics <y.zinchuk@samsung.com>
Fri, 2 Jun 2023 08:19:32 +0000 (10:19 +0200)
committerYurii Zinchuk/Tizen Services & IoT (PLT) /SRPOL/Engineer/Samsung Electronics <y.zinchuk@samsung.com>
Wed, 12 Jul 2023 07:37:46 +0000 (09:37 +0200)
SettingMainGadget/SettingMainGadget/About/AboutManageCertificatesGadget.cs
SettingMainGadget/SettingMainGadget/MainMenuProvider.cs

index 035c2c4395fc62ceec091b6d8c8c1a655260298a..eb505268e1bc57accf8219452dab868a5da58338 100644 (file)
@@ -1,14 +1,55 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
+using SettingMainGadget.TextResources;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+using SettingCore.Views;
+using SettingMainGadget;
 
-namespace SettingMainGadget.About
+namespace Setting.Menu.About
 {
     public class AboutManageCertificatesGadget : SettingCore.MenuGadget
     {
-        public override string ProvideTitle()
+        public override string ProvideTitle() => NUIGadgetResourceManager.GetString(nameof(Resources.IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB));
+
+        private ScrollableBase content;
+
+        protected override View OnCreate()
+        {
+            base.OnCreate();
+
+            content = new ScrollableBase()
+            {
+                WidthSpecification = LayoutParamPolicies.MatchParent,
+                HeightSpecification = LayoutParamPolicies.MatchParent,
+                ScrollingDirection = ScrollableBase.Direction.Vertical,
+                HideScrollbar = false,
+                Layout = new LinearLayout()
+                {
+                    LinearOrientation = LinearLayout.Orientation.Vertical,
+                },
+            };
+
+            CreateItems();
+
+            return content;
+        }
+
+        private void CreateItems()
         {
-            throw new NotImplementedException();
+            content.RemoveAllChildren(true);
+
+            var rootCertItem = TextListItem.CreatePrimaryTextItem(NUIGadgetResourceManager.GetString(nameof(Resources.IDS_ST_BODY_TRUSTED_ROOT_CA_CERTIFICATES_ABB)));
+            rootCertItem.Clicked += (o, e) =>
+            {
+            };
+            content.Add(rootCertItem);
+
+            var userCertItem = TextListItem.CreatePrimaryTextItem(NUIGadgetResourceManager.GetString(nameof(Resources.IDS_ST_BODY_USER_CERTIFICATES)));
+            userCertItem.Clicked += (o, e) =>
+            {
+                // TODO : NavigateTo(UserCert);
+            };
+            content.Add(userCertItem);
         }
     }
 }
index d2721293572c2bea961dc8b67be45d8b0c3219a6..1dc22411bef8b370142d99a6913b31ef5aab474d 100644 (file)
@@ -106,7 +106,7 @@ namespace SettingMainGadget
                 new SettingMenu(path: Language_TTS, defaultOrder: 68),
                 new SettingMenu(path: Language_STT, defaultOrder: 69),
                 new SettingMenu(path: About, defaultOrder: 70, type: typeof(Setting.Menu.AboutGadget)),
-                new SettingMenu(path: About_ManageCertificates, defaultOrder: 10),
+                new SettingMenu(path: About_ManageCertificates, defaultOrder: 10, type: typeof(Setting.Menu.About.AboutManageCertificatesGadget)),
                 new SettingMenu(path: About_OpenSourceLicenses, defaultOrder: 20, type: typeof(Setting.Menu.AboutLegalInfoGadget)),
                 new SettingMenu(path: About_ScalableUI, defaultOrder: -30, type: typeof(SettingMainGadget.About.AboutScalableGadget)),
                 new SettingMenu(path: About_DeviceInfo, defaultOrder: 40),