File was renamed from HDL_ON/UI/UI2/2-Classification/Room/FunctionDivBLL.cs |
| | |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | public partial class RoomControlZone |
| | | public partial class FunctionControlZone |
| | | { |
| | | /// <summary> |
| | | /// 加载功能收藏按钮事件 |
| | |
| | | }; |
| | | } |
| | | #region 灯光的事件列表 |
| | | |
| | | /// <summary> |
| | | /// 灯光开关事件 |
| | | /// </summary> |
| | |
| | | btnSwitch.IsSelected = !btnSwitch.IsSelected; |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var light = function as Light; |
| | | light.state = btnSwitch.IsSelected ? 1 : 0; |
| | | Control.Send("write", function, 3); |
| | | if (function.functionCategory == FunctionType.Light) |
| | | { |
| | | var light = function as Light; |
| | | light.on_off = btnSwitch.IsSelected ? 1 : 0; |
| | | Control.Send("write", function); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | |
| | | { |
| | | new System.Threading.Thread(() => |
| | | { |
| | | light.dicPropert["brightness"] = (byte)e; |
| | | Control.Send("write", function, 3); |
| | | light.brightness = e; |
| | | Control.Send("write", function); |
| | | dimmerControlBar.Tag = DateTime.Now; |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | |
| | | }; |
| | | dimmerControlBar.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | light.dicPropert["brightness"] = (byte)dimmerControlBar.Progress; |
| | | Control.Send("write", function, 3); |
| | | light.brightness = dimmerControlBar.Progress; |
| | | Control.Send("write", function); |
| | | }; |
| | | } |
| | | } |
| | |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | break; |
| | | case "Curtain": |
| | | var curtainView = new CurtainModulePage (function); |
| | | var curtainView = new CurtainModulePage(function); |
| | | MainPage.BasePageView.AddChidren(curtainView); |
| | | curtainView.LoadPage(btnCollectionIcon, btnName, btnFromFloor); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | break; |
| | | case "AC": |
| | | var acView = new ACPage(function); |
| | | MainPage.BasePageView.AddChidren(acView); |
| | | acView.LoadPage(btnCollectionIcon, btnName, btnFromFloor); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | break; |
| | | } |
| | | }; |
| | | this.MouseUpEventHandler = eventHandler; |