From bfb3d0d4879dca8c59ff287c92f5113162f3a33a Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期二, 27 八月 2024 15:22:48 +0800 Subject: [PATCH] 代码备份 --- OnPro/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs | 227 -------------------------------------------------------- 1 files changed, 2 insertions(+), 225 deletions(-) diff --git a/OnPro/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs b/OnPro/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs index e75b636..d7b87d4 100644 --- a/OnPro/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs +++ b/OnPro/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs @@ -3,68 +3,12 @@ using HDL_ON.DriverLayer; using HDL_ON.Entity; using HDL_ON.UI.CSS; -using HDL_ON.UI.Music; using Shared; namespace HDL_ON.UI { public partial class FunctionControlZone { - // /// <summary> - // /// 鏇存柊寮�鍏崇姸鎬� - // /// </summary> - // /// <param name="upfunc"></param> - // public static void UpdataOnOffState(Function upfunc) - // { - // if(bodyDiv!= null) - // { - // Application.RunOnMainThread(() => { - // if(bodyDiv.Tag.ToString() == upfunc.sid) - // { - // for (var o = 0; o < bodyDiv.ChildrenCount; o++) - // { - // if (bodyDiv.GetChildren(o).GetType() == typeof(Button)) - // { - // var btn = bodyDiv.GetChildren(o) as Button; - // if (btn.Tag != null) - // { - // if (btn.Tag.ToString() == upfunc.sid + "_Switch")// + "_DimmerBar") - // { - // btn.IsSelected = upfunc.trait_on_off.curValue.ToString() == "on"; - // } - // } - // } - // else if (bodyDiv.GetChildren(o).GetType() == typeof(DiyImageSeekBar)) - // { - // var btn = bodyDiv.GetChildren(o) as DiyImageSeekBar; - // if (btn.Tag != null) - // { - // if (btn.Tag.ToString() == upfunc.sid + "_DimmerBar") - // { - // btn.Progress = Convert.ToInt32(upfunc.GetAttrState(FunctionAttributeKey.Brightness)); - // } - // } - // } - // } - - // } - // }); - // } - // } - /// <summary> - /// 鏇存柊鍦ㄧ嚎鐘舵�� - /// </summary> - public void UpdataOnline(bool online) - { - if (bodyDiv != null) - { - Application.RunOnMainThread(() => - { - bodyDiv.BackgroundColor = online ? CSS_Color.MainBackgroundColor : CSS_Color.PromptingColor2; - bodyDiv.btnOffline.Visible = !online; - }); - } - } /// <summary> /// 鍔犺浇鍔熻兘鏀惰棌鎸夐挳浜嬩欢 @@ -86,27 +30,8 @@ btnSwitch.MouseUpEventHandler = (sender, e) => { - if (!function.isOnline())//绂荤嚎涓嶅厑璁告搷浣� - { - new Tip() - { - CloseTime = 1, - Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - Direction = AMPopTipDirection.None, - }.Show(MainPage.BaseView); - return; - } btnSwitch.IsSelected = !btnSwitch.IsSelected; - if(SPK.NotStatusSpkList.Contains( function.spk )) - { - new System.Threading.Thread(() => { - System.Threading.Thread.Sleep(2000); - Application.RunOnMainThread(() => { - btnSwitch.IsSelected = !btnSwitch.IsSelected; - }); - }) { IsBackground = true }.Start(); - } new System.Threading.Thread(() => { @@ -133,16 +58,6 @@ /// </summary> void LoadEvent_LightDimming(DiyImageSeekBar dimmerControlBar) { - if (!function.isOnline())//绂荤嚎涓嶅厑璁告搷浣� - { - //new Tip() - //{ - // CloseTime = 1, - // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - // Direction = AMPopTipDirection.None, - //}.Show(MainPage.BaseView); - return; - } if (function.spk == SPK.LightDimming || function.spk == SPK.LightRGB || function.spk == SPK.LightCCT) { dimmerControlBar.OnStartTrackingTouchEvent = (sender, e) => { @@ -269,154 +184,16 @@ #endregion - /// <summary> - /// 鍔犺浇鏅捐。鏋舵帶鍒朵簨浠� - /// </summary> - void LoadEvent_ControlClothesHanger(Function function, Button btnUp, Button btnDown) - { - btnUp.MouseDownEventHandler = (sender, e) => - { - btnUp.IsSelected = true; - }; - btnUp.MouseUpEventHandler = (sender, e) => - { - if (!function.isOnline())//绂荤嚎涓嶅厑璁告搷浣� - { - new Tip() - { - CloseTime = 1, - Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - Direction = AMPopTipDirection.None, - }.Show(MainPage.BaseView); - return; - } - new System.Threading.Thread(() => - { - System.Threading.Thread.Sleep(2000); - Application.RunOnMainThread(() => - { - btnUp.IsSelected = false; - }); - }) - { IsBackground = true }.Start(); - function.SetAttrState(FunctionAttributeKey.Position, "up"); - Dictionary<string, string> d = new Dictionary<string, string>(); - d.Add(FunctionAttributeKey.Position, "up"); - Control.Ins.SendWriteCommand(function, d); - }; - - btnDown.MouseDownEventHandler = (sender, e) => - { - btnDown.IsSelected = true; - }; - btnDown.MouseUpEventHandler = (sender, e) => - { - if (!function.isOnline())//绂荤嚎涓嶅厑璁告搷浣� - { - new Tip() - { - CloseTime = 1, - Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - Direction = AMPopTipDirection.None, - }.Show(MainPage.BaseView); - return; - } - new System.Threading.Thread(() => - { - System.Threading.Thread.Sleep(2000); - Application.RunOnMainThread(() => - { - btnDown.IsSelected = false; - }); - }) - { IsBackground = true }.Start(); - function.SetAttrState(FunctionAttributeKey.Position, "down"); - Dictionary<string, string> d = new Dictionary<string, string>(); - d.Add(FunctionAttributeKey.Position, "down"); - Control.Ins.SendWriteCommand(function, d); - }; - } - - #region 绌鸿皟浜嬩欢 #endregion - /// <summary> - /// 闊充箰鎺у埗浜嬩欢鍒楄〃 - /// </summary> - /// <param name="btnStop"></param> - /// <param name="btnOpen"></param> - /// <param name="btnClose"></param> - /// <param name="curtain"></param> - void LoadEvent_ControlMusic(Button btnPlay,Button btnNext,Button btnPrev, Function a31player) - { - if (a31player == null) - return; - ///涓婁竴鏇茬偣鍑讳簨浠� - btnPrev.MouseDownEventHandler = (sender, e) => - { - btnPrev.IsSelected = true; - a31player.SetAttrState("song_step", "up"); - Dictionary<string, string> dic = new Dictionary<string, string>(); - dic.Add("song_step", "up"); - SendMethod.Current.SendControlCommand(a31player, dic); - }; - btnPrev.MouseUpEventHandler = (sender, e) => - { - btnPrev.IsSelected = false; - }; - ///鏆傚仠/鎾斁鐐瑰嚮浜嬩欢 - btnPlay.MouseDownEventHandler = (sender, e) => - { - string status = "off"; - if (btnPlay.IsSelected) - { - btnPlay.IsSelected = false; - status = "off"; - } - else - { - btnPlay.IsSelected = true; - status = "on"; - } - a31player.SetAttrState("on_off", status); - Dictionary<string, string> dic = new Dictionary<string, string>(); - dic.Add("on_off", status); - SendMethod.Current.SendControlCommand(a31player, dic); - }; - ///涓嬩竴鏇茬偣鍑讳簨浠� - btnNext.MouseDownEventHandler = (sender, e) => - { - btnNext.IsSelected = true; - a31player.SetAttrState("song_step", "down"); - Dictionary<string, string> dic = new Dictionary<string, string>(); - dic.Add("song_step", "down"); - SendMethod.Current.SendControlCommand(a31player, dic); - }; - btnNext.MouseUpEventHandler = (sender, e) => - { - btnNext.IsSelected = false; - }; - - } - + /// <summary> /// 鎺у埗鐣岄潰璺宠浆 /// </summary> void LoadEvent_DivSkipEvent() { - //if (function.spk == SPK.GroupControl) - //{ - // EventHandler<MouseEventArgs> handler = (sender, e) => { - // var dialog = new GroupControlPage(FunctionList.List.groupControls.Find((obj) => obj.sid == function.sid)); - // dialog.ShowDialog(); - // }; - // this.MouseUpEventHandler = handler; - // btnName.MouseUpEventHandler = handler; - // btnFromFloor.MouseUpEventHandler = handler; - // return; - //} - var eventHandler = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollectionIcon, btnName, btnFromFloor, UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.room,this.action); + var eventHandler = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollectionIcon, btnName, btnFromFloor, this.action); this.MouseUpEventHandler = eventHandler; btnName.MouseUpEventHandler = eventHandler; btnFromFloor.MouseUpEventHandler = eventHandler; -- Gitblit v1.8.0