| | |
| | | <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"> |
| | |
| | | <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> |
| | |
| | | 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)) |
| | | { |
| | | //判断是否存在 |
| | |
| | | if (indexValue != -1) |
| | | { |
| | | //存在移除 |
| | | dicList.RemoveAt(indexValue); |
| | | dicSateteList.RemoveAt(indexValue); |
| | | //重新添加 |
| | | dicList.Insert(indexValue, dictionary); |
| | | dicSateteList.Insert(indexValue, dictionary); |
| | | } |
| | | else |
| | | { |
| | | //新添加 |
| | | dicList.Add(dictionary); |
| | | dicSateteList.Add(dictionary); |
| | | } |
| | | |
| | | } |
| | |
| | | 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)) |
| | | { |
| | | //判断是否存在 |
| | |
| | | if (indexValue != -1) |
| | | { |
| | | //存在移除 |
| | | dicList.RemoveAt(indexValue); |
| | | dicSateteList.RemoveAt(indexValue); |
| | | //重新添加 |
| | | dicList.Insert(indexValue, dictionary); |
| | | dicSateteList.Insert(indexValue, dictionary); |
| | | } |
| | | else |
| | | { |
| | | //新添加 |
| | | dicList.Add(dictionary); |
| | | dicSateteList.Add(dictionary); |
| | | } |
| | | |
| | | } |