From 8aa777aedd7492b7f2e28a172c2874f4ee7366a1 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 18 三月 2022 10:46:27 +0800 Subject: [PATCH] 暂时移除离线功能 --- HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs | 111 +++++++++++++++++++++++++++++-------------------------- 1 files changed, 59 insertions(+), 52 deletions(-) diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs index d579862..c117f58 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using HDL_ON.DriverLayer; using HDL_ON.Entity; +using HDL_ON.UI.CSS; using HDL_ON.UI.Music; using Shared; @@ -9,54 +10,60 @@ { 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> + // /// <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> - /// 鏇存柊浜害鐘舵�� - /// </summary> - /// <param name="upfunc"></param> - static void UpdataBrightnessState(Function upfunc) - { - } /// <summary> @@ -79,7 +86,7 @@ btnSwitch.MouseUpEventHandler = (sender, e) => { - if (!function.online)//绂荤嚎涓嶅厑璁告搷浣� + if (!function.online2d)//绂荤嚎涓嶅厑璁告搷浣� { new Tip() { @@ -126,7 +133,7 @@ /// </summary> void LoadEvent_LightDimming(DiyImageSeekBar dimmerControlBar) { - if (!function.online)//绂荤嚎涓嶅厑璁告搷浣� + if (!function.online2d)//绂荤嚎涓嶅厑璁告搷浣� { //new Tip() //{ @@ -196,7 +203,7 @@ { btnClose.MouseUpEventHandler = (sender, e) => { - if (!function.online)//绂荤嚎涓嶅厑璁告搷浣� + if (!function.online2d)//绂荤嚎涓嶅厑璁告搷浣� { new Tip() { @@ -218,7 +225,7 @@ btnStop.MouseUpEventHandler = (sender, e) => { - if (!function.online)//绂荤嚎涓嶅厑璁告搷浣� + if (!function.online2d)//绂荤嚎涓嶅厑璁告搷浣� { new Tip() { @@ -239,7 +246,7 @@ btnOpen.MouseUpEventHandler = (sender, e) => { - if (!function.online)//绂荤嚎涓嶅厑璁告搷浣� + if (!function.online2d)//绂荤嚎涓嶅厑璁告搷浣� { new Tip() { @@ -273,7 +280,7 @@ }; btnUp.MouseUpEventHandler = (sender, e) => { - if (!function.online)//绂荤嚎涓嶅厑璁告搷浣� + if (!function.online2d)//绂荤嚎涓嶅厑璁告搷浣� { new Tip() { @@ -304,7 +311,7 @@ }; btnDown.MouseUpEventHandler = (sender, e) => { - if (!function.online)//绂荤嚎涓嶅厑璁告搷浣� + if (!function.online2d)//绂荤嚎涓嶅厑璁告搷浣� { new Tip() { -- Gitblit v1.8.0