JLChen
2021-03-10 f9de7b8e7a567d71e336965117dd9ceb22be07c0
HDL_ON/UI/UI2/FuntionControlView/Electrical/FanPageBLL.cs
@@ -40,6 +40,7 @@
            actionRefresh = () => {
                btnFunctionName.Text = btnFunctionName_Out.Text = fan.name;
                btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = fan.GetRoomListName();
                //fan.SaveFunctionData(true);
            };
        }
@@ -49,8 +50,8 @@
        void LoadCollectionEvent()
        {
            btnCollection.MouseUpEventHandler += (sender, e) => {
                btnCollection.IsSelected = fan.collection = btnCollection_Out.IsSelected = !btnCollection.IsSelected;
                fan.SaveFunctionData();
                btnCollection.IsSelected = fan.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected;
                fan.CollectFunction();
            };
        }
@@ -69,6 +70,7 @@
                    //Control.Send(CommandType_A.write, this.fan);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("on_off", fan.trait_on_off.curValue.ToString());
                    d.Add("fan_speed_percent", fan.openLevel.ToString());
                    Control.Ins.SendWriteCommand(fan, d);
                })
                { IsBackground = true }.Start();
@@ -83,6 +85,7 @@
                    //Control.Send(CommandType_A.write, this.fan);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("on_off", fan.trait_on_off.curValue.ToString());
                    d.Add("fan_speed_percent", fan.openLevel.ToString());
                    Control.Ins.SendWriteCommand(fan, d);
                })
                { IsBackground = true }.Start();
@@ -96,6 +99,7 @@
                    //Control.Send(CommandType_A.write, this.fan);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("on_off", fan.trait_on_off.curValue.ToString());
                    d.Add("fan_speed_percent", fan.openLevel.ToString());
                    Control.Ins.SendWriteCommand(fan, d);
                })
                { IsBackground = true }.Start();