wxr
2020-03-19 b69d7735274b8d0f741da8a6bb8b8e1347477a5a
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
File was renamed from HDL_ON/UI/UI2/2-Classification/Room/FunctionDivBLL.cs
@@ -4,7 +4,7 @@
namespace HDL_ON.UI
{
    public partial class RoomControlZone
    public partial class FunctionControlZone
    {
        /// <summary>
        /// 加载功能收藏按钮事件
@@ -18,6 +18,7 @@
            };
        }
        #region 灯光的事件列表
        /// <summary>
        /// 灯光开关事件
        /// </summary>
@@ -28,9 +29,12 @@
                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();
            };
@@ -54,8 +58,8 @@
                    {
                        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();
@@ -63,8 +67,8 @@
                };
                dimmerControlBar.MouseUpEventHandler += (sender, e) =>
                {
                    light.dicPropert["brightness"] = (byte)dimmerControlBar.Progress;
                    Control.Send("write", function, 3);
                    light.brightness = dimmerControlBar.Progress;
                    Control.Send("write", function);
                };
            }
        }
@@ -111,11 +115,17 @@
                        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;