From 6b6a65cc86b668b57a84d6d8a7bec4c43ddcc0f5 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 02 十二月 2020 20:35:02 +0800
Subject: [PATCH] 2020-12-02-4

---
 HDL_ON/Entity/Function/Function.cs                                  |    8 +++++---
 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs              |   32 ++++++++++++++++++++++++++++++--
 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs      |    1 -
 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SelectTypeView.cs |    1 +
 .vs/HDL_APP_Project/xs/UserPrefs.xml                                |   18 ++++++++++++++----
 5 files changed, 50 insertions(+), 10 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 07375e4..54733bd 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,6 +1,12 @@
 锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
   <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.D4411691-F5B8-40F4-97C1-964F33115DBC" />
-  <MonoDevelop.Ide.Workbench>
+  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SelectTypeView.cs">
+    <Files>
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs" Line="138" Column="24" />
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs" Line="138" Column="69" />
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs" Line="244" Column="71" />
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SelectTypeView.cs" Line="5" Column="18" />
+    </Files>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
@@ -10,13 +16,17 @@
               <Node name="DAL" expanded="True">
                 <Node name="Server" expanded="True" />
               </Node>
+              <Node name="Entity" expanded="True">
+                <Node name="Enumerative" expanded="True" />
+                <Node name="Function" expanded="True" />
+              </Node>
               <Node name="UI" expanded="True">
-                <Node name="UI0-Public" expanded="True" />
                 <Node name="UI2" expanded="True">
                   <Node name="3-Intelligence" expanded="True">
                     <Node name="Automation" expanded="True">
-                      <Node name="LogicView" expanded="True" />
-                      <Node name="AddLogic.cs" selected="True" />
+                      <Node name="LogicView" expanded="True">
+                        <Node name="SelectTypeView.cs" selected="True" />
+                      </Node>
                     </Node>
                   </Node>
                   <Node name="FuntionControlView" expanded="True" />
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index d5646d3..86daa59 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -13,6 +13,7 @@
         public Function()
         {
         }
+      
 
         #region base info
         /// <summary>
@@ -72,15 +73,16 @@
                 }
             }
         }
-        /// <summary>
-        /// 鍔熻兘绫诲瀷
-        /// </summary>
+        ///// <summary>
+        ///// 鍔熻兘绫诲瀷
+        ///// </summary>
         public FunctionType functionType
         {
             get
             {
                 var _functionTypeString = sid.Substring(16, 4);
                 return (FunctionType)Enum.ToObject(typeof(FunctionType), Convert.ToInt32(_functionTypeString, 16));
+
             }
         }
 
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index b736297..086bd83 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -135,7 +135,6 @@
 
                     }
                 };
-
                 ///鍒犻櫎鎺т欢
                 inputView.btnDel.MouseUpEventHandler += (sender, e) =>
                 {
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
index 64c4bb1..5a1b895 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -123,8 +123,32 @@
         /// <returns></returns>
         public static List<HDL_ON.Entity.Function> GetGatewayDeviceList()
         {
-
-            return HDL_ON.Entity.DB_ResidenceData.functionList.GetAllFunction();
+            List<HDL_ON.Entity.Function> list = new List<Entity.Function>();
+            for (int i=0;i<3;i++) {
+                HDL_ON.Entity.Function function = new Entity.Function();
+                switch (i) {
+                    case 0: {
+                            function.sid = "1234560001212121020182";
+                            function.name ="鐏厜";
+                            list.Add(function);
+                        }
+                        break;
+                    case 1: {
+                          
+                            function.sid = "1234560001212121030182";
+                            function.name = "绐楀笜";
+                            list.Add(function);
+                        } break;
+                    case 2: {
+                            function.sid = "1234560001212121040182";
+                            function.name = "绌鸿皟";
+                            list.Add(function);
+                        } break;
+                     
+                }
+            }
+            return list;
+            //return HDL_ON.Entity.DB_ResidenceData.functionList.GetAllFunction();
         }
         /// <summary>
         /// 鑾峰彇缃戝叧鍦烘櫙鍒楄〃
@@ -296,11 +320,15 @@
             switch (if_type) {
                 case condition_if: {
                         deviceTypeList.Add(FunctionType.Relay);
+                        deviceTypeList.Add(FunctionType.Curtain);
+                        deviceTypeList.Add(FunctionType.AC);
                     }
                     break;
                 case target_if:
                     {
                         deviceTypeList.Add(FunctionType.Relay);
+                        deviceTypeList.Add(FunctionType.Curtain);
+                        deviceTypeList.Add(FunctionType.AC);
                     }
                     break;
             }
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SelectTypeView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SelectTypeView.cs
index dc9ea5c..8e33c87 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SelectTypeView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SelectTypeView.cs
@@ -120,6 +120,7 @@
             btnText.Gravity = Gravity.CenterVertical;
             btnText.TextAlignment = TextAlignment.CenterLeft;
             btnNextIcon.Gravity = Gravity.CenterVertical;
+            btnDeviceName.Gravity= Gravity.CenterVertical;
             frameLayout.AddChidren(btnIcon);
             frameLayout.AddChidren(btnText);
             frameLayout.AddChidren(btnDeviceName);

--
Gitblit v1.8.0