陈嘉乐
2021-01-13 824194b230373dfe6320e4fe21d460ca8275b99f
2021-1-13-1

优化一下代码
6个文件已修改
49 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/sqlite3/storage.ide 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shm 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,12 +1,10 @@
<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.D4411691-F5B8-40F4-97C1-964F33115DBC" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs">
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs">
    <Files>
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs" Line="302" Column="72" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs" Line="1" Column="1" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs" Line="62" Column="67" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/OutdoorEnvironment.cs" Line="6" Column="36" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs" Line="264" Column="70" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs" Line="219" Column="24" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SwitchView.cs" Line="5" Column="18" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs" Line="522" Column="13" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
@@ -19,9 +17,12 @@
                  <Node name="3-Intelligence" expanded="True">
                    <Node name="Automation" expanded="True">
                      <Node name="LogicView" expanded="True" />
                      <Node name="InpOrOutLogicMethod.cs" selected="True" />
                      <Node name="TargetDeviceFunList.cs" selected="True" />
                    </Node>
                  </Node>
                  <Node name="FuntionControlView" expanded="True">
                    <Node name="Music" expanded="True" />
                  </Node>
                </Node>
              </Node>
            </Node>
.vs/HDL_APP_Project/xs/sqlite3/storage.ide
Binary files differ
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shm
Binary files differ
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal
Binary files differ
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -183,21 +183,20 @@
            LogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.dictionary(dic, "value", selectedValue);
            AddDictionaryList(KeyValue, dic, dicSateteList);
            AddDictionaryList(KeyValue, dic);
        }
        /// <summary>
        /// 更新数据列表
        /// </summary>
        /// <param name="keyValue">设备属性值,云雀上定义好的</param> 
        /// <param name="dictionary">选中数据</param>
        /// <param name="dicList">存储数据列表</param>
        /// <param name="dictionary">添加选中数据</param>
        /// <returns></returns>
        private void AddDictionaryList(string keyValue, Dictionary<string, string> dictionary, List<Dictionary<string, string>> dicList)
        private void AddDictionaryList(string keyValue, Dictionary<string, string> dictionary)
        {
            int indexValue = -1;
            for (int i = 0; i < dicList.Count; i++)
            for (int i = 0; i < dicSateteList.Count; i++)
            {
                var dic = dicList[i];
                var dic = dicSateteList[i];
                if (dic.ContainsValue(keyValue))
                {
                    //判断是否存在
@@ -209,14 +208,14 @@
            if (indexValue != -1)
            {
                //存在移除
                dicList.RemoveAt(indexValue);
                dicSateteList.RemoveAt(indexValue);
                //重新添加
                dicList.Insert(indexValue, dictionary);
                dicSateteList.Insert(indexValue, dictionary);
            }
            else
            {
                //新添加
                dicList.Add(dictionary);
                dicSateteList.Add(dictionary);
            }
        }
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -538,21 +538,20 @@
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.dictionary(dic, "key", KeyValue);
            LogicMethod.dictionary(dic, "value", selectedValue);
            AddDictionaryList(KeyValue, dic, dicSateteList);
            AddDictionaryList(KeyValue, dic);
        }
        /// <summary>
        /// 更新数据列表
        /// </summary>
        /// <param name="keyValue">设备属性值,云雀上定义好的</param> 
        /// <param name="dictionary">选中数据</param>
        /// <param name="dicList">存储数据列表</param>
        /// <param name="dictionary">添加选中数据</param>
        /// <returns></returns>
        private void AddDictionaryList(string keyValue, Dictionary<string, string> dictionary, List<Dictionary<string, string>> dicList)
        private void AddDictionaryList(string keyValue, Dictionary<string, string> dictionary)
        {
            int indexValue = -1;
            for (int i = 0; i < dicList.Count; i++)
            for (int i = 0; i < dicSateteList.Count; i++)
            {
                var dic = dicList[i];
                var dic = dicSateteList[i];
                if (dic.ContainsValue(keyValue))
                {
                    //判断是否存在
@@ -564,14 +563,14 @@
            if (indexValue != -1)
            {
                //存在移除
                dicList.RemoveAt(indexValue);
                dicSateteList.RemoveAt(indexValue);
                //重新添加
                dicList.Insert(indexValue, dictionary);
                dicSateteList.Insert(indexValue, dictionary);
            }
            else
            {
                //新添加
                dicList.Add(dictionary);
                dicSateteList.Add(dictionary);
            }
        }