From 2835fe50d3e194c21b16fec1c53ff905dd3a3ceb Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期四, 01 七月 2021 13:12:36 +0800 Subject: [PATCH] 20210630 --- HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 42 insertions(+), 2 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs index b20523e..5da48b0 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs @@ -105,13 +105,33 @@ { lightTemp.SetRGBcolor(e2,function); colorChangeTime = DateTime.Now; - btnCurColor.BackgroundColor = (uint)(0xFF000000 + lightTemp.GetRGBcolor(function)); System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add(FunctionAttributeKey.RGB, lightTemp.GetRGBcolorString(function)); Control.Ins.SendWriteCommand(function, d); } + }; colorPicker.MouseDownEventHandler += (sender, e) => + { + if (function.trait_on_off.curValue.ToString() == "off") + { + return; + } + pointIsRight = this.CheckPoint(circleR, colorPicker.Width / 2, colorPicker.Height / 2, (int)e.X, (int)e.Y); + if (pointIsRight == false) + { + //鐐圭殑鍖哄煙涓嶆槸鍦嗙洏鍐� + return; + } + //鏄剧ず鐧界偣 + btnWhiteRound.X = (int)e.X - btnWhiteRound.Width / 2; + btnWhiteRound.Y = (int)e.Y - btnWhiteRound.Height / 2; + if (btnWhiteRound.Visible == true) + { + btnWhiteRound.Visible = false; + } + }; + colorPicker.MouseUpEventHandler += (sender, e) => { if (function.trait_on_off.curValue.ToString() == "off") { @@ -131,10 +151,30 @@ btnWhiteRound.Visible = true; } }; + + + colorPicker.MouseMoveEventHandler += (sender, e) => { //褰撻紶鏍囩偣涓嬩簨浠跺鐞� - colorPicker.MouseDownEventHandler(sender, e); + if (function.trait_on_off.curValue.ToString() == "off") + { + return; + } + pointIsRight = this.CheckPoint(circleR, colorPicker.Width / 2, colorPicker.Height / 2, (int)e.X, (int)e.Y); + if (pointIsRight == false) + { + //鐐圭殑鍖哄煙涓嶆槸鍦嗙洏鍐� + return; + } + //鏄剧ず鐧界偣 + btnWhiteRound.X = (int)e.X - btnWhiteRound.Width / 2; + btnWhiteRound.Y = (int)e.Y - btnWhiteRound.Height / 2; + if (btnWhiteRound.Visible == false) + { + btnWhiteRound.Visible = true; + } + btnCurColor.BackgroundColor = (uint)(0xFF000000 + lightTemp.GetRGBcolor(function)); }; } -- Gitblit v1.8.0