File was renamed from HDL_ON/UI/UI2/FuntionControlView/Light/RelayFragmentBLL.cs |
| | |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | public partial class RelayFragment |
| | | public partial class RelayPage |
| | | { |
| | | /// <summary> |
| | | /// 加载事件列表 |
| | |
| | | void LoadCollectionEvent() |
| | | { |
| | | btnCollection.MouseUpEventHandler += (sender, e) => { |
| | | btnCollection.IsSelected = function.collection = !btnCollection.IsSelected; |
| | | btnCollection.IsSelected = light.collection = !btnCollection.IsSelected; |
| | | DB_ResidenceData.residenceData.SaveResidenceData(); |
| | | }; |
| | | } |
| | |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var light = function as Light; |
| | | var light = this.light as Light; |
| | | light.state = btnSwitch.IsSelected ? 1 : 0; |
| | | Control.Send("write", function, 3); |
| | | Control.Send("write", this.light, 3); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var light = function as Light; |
| | | var light = this.light as Light; |
| | | light.state = btnSwitch.IsSelected ? 1 : 0; |
| | | Control.Send("write", function, 3); |
| | | Control.Send("write", this.light, 3); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |