From dd01259a0590b6e6954470aa6ddb7658baa79fa7 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期二, 18 六月 2024 16:53:46 +0800
Subject: [PATCH] 备份

---
 OnPro/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs |   80 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 77 insertions(+), 3 deletions(-)

diff --git a/OnPro/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs b/OnPro/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs
index 158ed95..2f6bbd6 100644
--- a/OnPro/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs
+++ b/OnPro/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs
@@ -23,7 +23,7 @@
 
             FrameLayout viewLayout = new FrameLayout
             {
-                Y = Application.GetRealHeight(74),
+                Y = Application.GetRealHeight(64),
                 Width = Application.GetRealWidth(LogicView.TextSize.view375),
                 Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64),
                 BackgroundColor = CSS.CSS_Color.viewMiddle,
@@ -36,6 +36,13 @@
             sceneView.btnIcon.UnSelectedImagePath = "LogicIcon/scene.png";
             viewLayout.AddChidren(sceneView.FLayoutView());
 
+            //瀹夐槻
+            LogicView.SelectTypeView securityView = new LogicView.SelectTypeView();
+            securityView.frameLayout.Y = sceneView.frameLayout.Bottom;
+            securityView.btnText.TextID = StringId.anfang;
+            securityView.btnIcon.UnSelectedImagePath = "LogicIcon/security.png";
+            viewLayout.AddChidren(securityView.FLayoutView());
+
             //寤舵椂
             LogicView.SelectTypeView delayView = new LogicView.SelectTypeView();
             delayView.frameLayout.Y = sceneView.frameLayout.Bottom;
@@ -45,10 +52,32 @@
 
 
 
-           
+            var colorfulRgbList = FunctionList.List.GetLightList().FindAll((obj) => obj.spk == SPK.LightRGB
+            && obj.GetAttributes().Contains(FunctionAttributeKey.Colorful));
+            //var seriesList = FunctionList.List.GetSeries();
+            //if (colorfulRgbList.Count > 0 || FunctionList.List.GetSeries().Count>0)
+            //{
+            //    LogicView.SelectTypeView seriesView = new LogicView.SelectTypeView();
+            //    seriesView.frameLayout.Y = securityView.frameLayout.Bottom;
+            //    seriesView.btnText.TextID = StringId.HorseRaceLamp;
+            //    seriesView.btnIcon.UnSelectedImagePath = "FunctionIcon/Icon/HorseRaceLampIcon.png";
+            //    viewLayout.AddChidren(seriesView.FLayoutView());
+            //    seriesView.btnClick.MouseUpEventHandler = (sender, e) =>
+            //    {
+            //        var settingPage = new LogicSeriesSettingPage();
+            //        MainPage.BasePageView.AddChidren(settingPage);
+            //        settingPage.LoadPage(colorfulRgbList);
+            //        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+
+            //    };
+            //    new FunTpye(LogicMethod.target_if).FunTypeView(viewLayout, seriesView.frameLayout.Bottom, 3);
+            //}
+            //else
+            {
                 ////鍔熻兘
                 ///浜у搧缁忕悊鍚涚剷瑕佹眰锛岃澶囧姛鑳界Щ鍒拌繖閲屻��<2022-3-7>
-                new FunTpye(LogicMethod.target_if).FunTypeView(viewLayout, sceneView.frameLayout.Bottom, 2);
+                new FunTpye(LogicMethod.target_if).FunTypeView(viewLayout, securityView.frameLayout.Bottom, 2);
+            }
             #endregion
 
             #region  鎵�鏈夌偣鍑讳簨浠�
@@ -56,6 +85,16 @@
             sceneView.btnClick.MouseUpEventHandler += (sen, e) =>
             {
                 SceneMethod();
+            };
+            //瀹夐槻鐐瑰嚮浜嬩欢
+            securityView.btnClick.MouseUpEventHandler += (sen, e) =>
+            {
+                Security security = new Security();
+                MainPage.BasePageView.AddChidren(security);
+                security.Show();
+                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+
+                //SecurityMethod(this);
             };
             //寤舵椂鐐瑰嚮浜嬩欢
             delayView.btnClick.MouseUpEventHandler += (sen, e) =>
@@ -101,6 +140,41 @@
             });
         }
         /// <summary>
+        /// 娣诲姞瀹夐槻
+        /// </summary>
+        public void SecurityMethod(FrameLayout frameLayout, bool edit=false, int index1=-1)
+        {
+            //List<string> stateList = new List<string>();
+            //if (edit&& index1 != -1) {
+            //    Output output = Logic.currlogic.output[index1];
+            //    var security = LogicMethod.Current.GetSecurity(output.sid);
+            //    stateList.Add(security.name);
+            //}
+            //var securityList = LogicMethod.Current.GetSecurityList(); 
+            //List<string> nameList = new List<string>();
+            //for (int i = 0; i < securityList.Count; i++)
+            //{
+            //    var security = securityList[i];
+            //    nameList.Add(security.name); 
+            //}
+            //PublicInterface publicInterface = new PublicInterface();
+            //publicInterface.FrameOrVv(frameLayout, nameList, stateList,Language.StringByID(StringId.addSecurityLogic),(index) =>
+            //{
+            //    var securitySelecetd = securityList[index];
+            //    Output outputDevice = new Output();
+            //    outputDevice.target_type = "3";
+            //    outputDevice.sid = securitySelecetd.sid;
+            //    //娌″暐浣滅敤锛屼负浜嗗彂閫佹暟鎹牸寮忕粺涓�;
+            //    outputDevice.status = new List<Dictionary<string, string>> { new Dictionary<string, string> { { "key", "security" }, { "value", "0" } } };
+            //    AddOutput(outputDevice,true);
+            //    LogicMethod.Current.RemoveAllView();
+            //    AddLogic addLogic = new AddLogic();
+            //    MainPage.BasePageView.AddChidren(addLogic);
+            //    addLogic.Show();
+            //    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+            //});
+        }
+        /// <summary>
         /// 寤舵椂鏃堕棿鏂规硶
         /// </summary>
         /// <param name="fLayout">鍦ㄥ摢涓晫闈㈡樉绀�</param>

--
Gitblit v1.8.0