| | |
| | | /// <summary>
|
| | | /// 渐变时间修改
|
| | | /// </summary>
|
| | | DiyImageSeekBar barFadeTime;
|
| | | //DiyImageSeekBar barFadeTime;
|
| | | /// <summary>
|
| | | /// 色温的滑动控件
|
| | | /// </summary>
|
| | |
| | | #endregion
|
| | |
|
| | | #region 区域变量
|
| | | Light light;
|
| | | Light lightTemp = new Light();
|
| | | Function function;
|
| | | Button btnCollection_Out;
|
| | | Button btnFunctionName_Out;
|
| | | Button btnFromFloor_Out;
|
| | |
| | | bodyView = null;
|
| | | }
|
| | |
|
| | | public ColorTureLampPage(Light func)
|
| | | public ColorTureLampPage(Function func)
|
| | | {
|
| | | bodyView = this;
|
| | | light = func;
|
| | | function = func;
|
| | | }
|
| | |
|
| | | public void LoadPage(Button btnCollectionIcon, Button btnFunctionNameOut, Button btnFromFloorOut)
|
| | |
| | | btnFunctionName_Out = btnFunctionNameOut;
|
| | | btnFromFloor_Out = btnFromFloorOut;
|
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor;
|
| | | //new TopViewDiv(bodyView, Language.StringByID(StringId.Lights)).LoadTopView(light,null);
|
| | | //new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Lights), light);
|
| | |
|
| | | controlView = new FrameLayout()
|
| | | {
|
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor,
|
| | | TextAlignment = TextAlignment.CenterLeft,
|
| | | TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
|
| | | Text = light.name,
|
| | | Text = function.name,
|
| | | };
|
| | | controlView.AddChidren(btnFunctionName);
|
| | |
|
| | |
| | | TextColor = CSS_Color.PromptingColor1,
|
| | | TextAlignment = TextAlignment.CenterLeft,
|
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
|
| | | Text = light.GetRoomListName()
|
| | | Text = function.GetRoomListName()
|
| | | };
|
| | | controlView.AddChidren(btnFromFoorAndRoom);
|
| | |
|
| | |
| | | Height = Application.GetMinRealAverage(40),
|
| | | SelectedImagePath = "Collection/CollectionIcon.png",
|
| | | UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
|
| | | IsSelected = light.collect
|
| | | IsSelected = function.collect
|
| | | };
|
| | | //controlView.AddChidren(btnCollection);
|
| | | controlView.AddChidren(btnCollection);
|
| | | //2020-12-16 如果是成员隐藏收藏功能
|
| | | if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
|
| | | {
|
| | | controlView.AddChidren(btnCollection);
|
| | | }
|
| | | //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare)
|
| | | //{
|
| | | // controlView.AddChidren(btnCollection);
|
| | | //}
|
| | |
|
| | | dimmerBar = new WaveSeekBarOn()
|
| | | {
|
| | | Gravity = Gravity.CenterHorizontal,
|
| | | Y = Application.GetRealHeight(74 + 16),
|
| | | Width = Application.GetRealWidth(142 - 40),
|
| | | Height = Application.GetRealHeight(222 - 16 - 16),
|
| | | Y = Application.GetRealHeight(108),
|
| | | Width = Application.GetRealWidth(142 - 16 - 16),
|
| | | Height = Application.GetRealHeight(222),
|
| | | BorderColor = 0x00000000,
|
| | | CornerRadius = Application.GetRealWidth(20),
|
| | | BorderWidth = 0,
|
| | | Progress = light.brightness,
|
| | | Progress = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.Brightness)),
|
| | | IsProgressTextShow = false,
|
| | | };
|
| | | controlView.AddChidren(dimmerBar);
|
| | | if (light.trait_on_off.curValue.ToString() == "on")
|
| | | if (function.trait_on_off.curValue.ToString() == "on")
|
| | | {
|
| | | dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
|
| | | }
|
| | |
| | | {
|
| | | dimmerBar.SetProgressBarColors(CSS_Color.DividingLineColor, CSS_Color.DividingLineColor);
|
| | | }
|
| | | dimmerBar.Progress = light.brightness;
|
| | | dimmerBar.Progress = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.Brightness));
|
| | | btnBrightnessText = new Button()
|
| | | {
|
| | | Gravity = Gravity.CenterHorizontal,
|
| | | Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16 - 16) / 100) + Application.GetRealWidth(40),
|
| | | Y = ((100 - Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80),
|
| | | Width = Application.GetRealWidth(56),
|
| | | Height = Application.GetRealWidth(46),
|
| | | UnSelectedImagePath = "FunctionIcon/Light/BrightnessBg.png",
|
| | | TextColor = CSS_Color.FirstLevelTitleColor,
|
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
|
| | | Text = light.brightness + "%",
|
| | | Text = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.Brightness)) + "%",
|
| | | };
|
| | | controlView.AddChidren(btnBrightnessText);
|
| | |
|
| | |
| | | //色温
|
| | | var btnTempClolor = new Button();
|
| | | btnTempClolor.X = Application.GetRealWidth(35);
|
| | | btnTempClolor.Y = Application.GetRealHeight(306);
|
| | | btnTempClolor.Y = Application.GetRealHeight(306 +60);
|
| | | btnTempClolor.Width = Application.GetRealWidth(224);
|
| | | btnTempClolor.Height = Application.GetRealHeight(21);
|
| | | btnTempClolor.TextAlignment = TextAlignment.CenterLeft;
|
| | |
| | | barColorTemplatrue.Y = btnTempClolorMin.Y - (barColorTemplatrue.Height - btnTempClolorMin.Height) / 2;
|
| | | //显示上方的Txt
|
| | | barColorTemplatrue.ShowCustomTextView(Application.GetRealWidth(50), CSS_FontSize.PromptFontSize_FirstLevel, CSS_Color.FirstLevelTitleColor);
|
| | | var cct = 27; |
| | | int.TryParse(function.GetAttrState(FunctionAttributeKey.CCT), out cct);
|
| | | barColorTemplatrue.Progress = cct;
|
| | | //设置初始值
|
| | | barColorTemplatrue.SetCustomText(barColorTemplatrue.Progress * 100 + "K");
|
| | |
|
| | |
| | | #endregion
|
| | |
|
| | | #region 渐变时间调节
|
| | | var btnGradualChangeText = new Button()
|
| | | {
|
| | | X = Application.GetRealWidth(35),
|
| | | Y = Application.GetRealHeight(385),
|
| | | Width = Application.GetRealWidth(224),
|
| | | Height = Application.GetRealHeight(21),
|
| | | TextAlignment = TextAlignment.CenterLeft,
|
| | | TextColor = CSS_Color.FirstLevelTitleColor,
|
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
|
| | | TextID = StringId.SpeedOfChange,
|
| | | };
|
| | | controlView.AddChidren(btnGradualChangeText);
|
| | | //var btnGradualChangeText = new Button()
|
| | | //{
|
| | | // X = Application.GetRealWidth(35),
|
| | | // Y = Application.GetRealHeight(385),
|
| | | // Width = Application.GetRealWidth(224),
|
| | | // Height = Application.GetRealHeight(21),
|
| | | // TextAlignment = TextAlignment.CenterLeft,
|
| | | // TextColor = CSS_Color.FirstLevelTitleColor,
|
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
|
| | | // TextID = StringId.SpeedOfChange,
|
| | | //};
|
| | | //controlView.AddChidren(btnGradualChangeText);
|
| | |
|
| | | var btnGradualChangeMinValuesText = new Button()
|
| | | {
|
| | | X = Application.GetRealWidth(35),
|
| | | Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
|
| | | Width = Application.GetRealWidth(22),
|
| | | Height = Application.GetRealHeight(21),
|
| | | Text = "0s",
|
| | | TextAlignment = TextAlignment.CenterLeft,
|
| | | TextColor = CSS_Color.PromptingColor1,
|
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
|
| | | };
|
| | | controlView.AddChidren(btnGradualChangeMinValuesText);
|
| | | //var btnGradualChangeMinValuesText = new Button()
|
| | | //{
|
| | | // X = Application.GetRealWidth(35),
|
| | | // Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
|
| | | // Width = Application.GetRealWidth(22),
|
| | | // Height = Application.GetRealHeight(21),
|
| | | // Text = "0s",
|
| | | // TextAlignment = TextAlignment.CenterLeft,
|
| | | // TextColor = CSS_Color.PromptingColor1,
|
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
|
| | | //};
|
| | | //controlView.AddChidren(btnGradualChangeMinValuesText);
|
| | |
|
| | | barFadeTime = new DiyImageSeekBar()
|
| | | {
|
| | | X = btnGradualChangeMinValuesText.Right,
|
| | | Y = Application.GetRealHeight(412 - 21) + Application.GetRealHeight(8),
|
| | | Width = Application.GetRealWidth(210),
|
| | | Height = Application.GetRealHeight(54),
|
| | | SeekBarViewHeight = Application.GetRealHeight(8),
|
| | | ThumbImagePath = "Public/ThumbImage.png",
|
| | | ThumbImageHeight = Application.GetRealHeight(54),
|
| | | ProgressBarColor = CSS_Color.MainColor,
|
| | | ProgressTextColor = CSS_Color.FirstLevelTitleColor,
|
| | | ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
|
| | | ProgressBarUnitSring = "s",
|
| | | MaxValue = 10,
|
| | | Progress = light.fadeTime,
|
| | | SeekBarPadding = Application.GetRealWidth(20),
|
| | | };
|
| | | controlView.AddChidren(barFadeTime);
|
| | | //barFadeTime = new DiyImageSeekBar()
|
| | | //{
|
| | | // X = btnGradualChangeMinValuesText.Right,
|
| | | // Y = Application.GetRealHeight(412 - 21) + Application.GetRealHeight(8),
|
| | | // Width = Application.GetRealWidth(210),
|
| | | // Height = Application.GetRealHeight(54),
|
| | | // SeekBarViewHeight = Application.GetRealHeight(8),
|
| | | // ThumbImagePath = "Public/ThumbImage.png",
|
| | | // ThumbImageHeight = Application.GetRealHeight(54),
|
| | | // ProgressBarColor = CSS_Color.MainColor,
|
| | | // ProgressTextColor = CSS_Color.FirstLevelTitleColor,
|
| | | // ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
|
| | | // ProgressBarUnitSring = "s",
|
| | | // MaxValue = 10,
|
| | | // Progress = function.fadeTime,
|
| | | // SeekBarPadding = Application.GetRealWidth(20),
|
| | | //};
|
| | | //controlView.AddChidren(barFadeTime);
|
| | |
|
| | | var btnGradualChangeMaxValuesText = new Button()
|
| | | {
|
| | | X = barFadeTime.Right,
|
| | | Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
|
| | | Width = Application.GetRealWidth(35),
|
| | | Height = Application.GetRealHeight(21),
|
| | | Text = "10s",
|
| | | TextAlignment = TextAlignment.CenterLeft,
|
| | | TextColor = CSS_Color.PromptingColor1,
|
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
|
| | | };
|
| | | controlView.AddChidren(btnGradualChangeMaxValuesText);
|
| | | //var btnGradualChangeMaxValuesText = new Button()
|
| | | //{
|
| | | // X = barFadeTime.Right,
|
| | | // Y = btnGradualChangeText.Bottom + Application.GetRealHeight(8),
|
| | | // Width = Application.GetRealWidth(35),
|
| | | // Height = Application.GetRealHeight(21),
|
| | | // Text = "10s",
|
| | | // TextAlignment = TextAlignment.CenterLeft,
|
| | | // TextColor = CSS_Color.PromptingColor1,
|
| | | // TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
|
| | | //};
|
| | | //controlView.AddChidren(btnGradualChangeMaxValuesText);
|
| | | #endregion
|
| | |
|
| | | btnSwitch = new Button()
|
| | | {
|
| | | X = Application.GetRealWidth(184),
|
| | | Y = Application.GetRealHeight(462),
|
| | | Width = Application.GetRealWidth(40),
|
| | | Height = Application.GetRealWidth(40),
|
| | | X = Application.GetRealWidth(180),
|
| | | Y = Application.GetRealHeight(466),
|
| | | Width = Application.GetRealWidth(32),
|
| | | Height = Application.GetRealWidth(32),
|
| | | UnSelectedImagePath = "Public/PowerClose.png",
|
| | | SelectedImagePath = "Public/PowerOpen.png",
|
| | | IsSelected = light.trait_on_off.curValue.ToString() == "on",
|
| | | IsSelected = function.trait_on_off.curValue.ToString() == "on",
|
| | | };
|
| | | controlView.AddChidren(btnSwitch);
|
| | |
|
| | | //色温的快捷方式图标
|
| | | btnShortcut = new Button();
|
| | | btnShortcut.X = Application.GetRealWidth(104);
|
| | | btnShortcut.X = Application.GetRealWidth(116);
|
| | | btnShortcut.Y = btnSwitch.Y;
|
| | | btnShortcut.Width = Application.GetRealWidth(40);
|
| | | btnShortcut.Height = Application.GetRealWidth(40);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/ColorTemperatrueQuick.png";
|
| | | btnShortcut.Width = Application.GetRealWidth(32);
|
| | | btnShortcut.Height = Application.GetRealWidth(32);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/CozyIconOn.png";
|
| | | controlView.AddChidren(btnShortcut);
|
| | | btnShortcut.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | |
| | |
|
| | | LoadEventList();
|
| | |
|
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Lights)).LoadTopView_FunctionTop(light, actionRefresh);
|
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Lights)).LoadTopView_FunctionTop(function, actionRefresh);
|
| | | new System.Threading.Thread(() =>
|
| | | {
|
| | | DriverLayer.Control.Ins.SendReadCommand(light);
|
| | | DriverLayer.Control.Ins.SendReadCommand(function);
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | }
|
| | |
| | | {
|
| | | //整个灰色界面
|
| | | var frameBack = new Dialog();
|
| | |
|
| | | var dialogBody = new FrameLayout(); |
| | | frameBack.AddChidren(dialogBody); |
| | | dialogBody.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | frameBack.Close(); |
| | | }; |
| | |
|
| | | frameBack.Show();
|
| | |
|
| | | //白色的背景(用图片整的)
|
| | |
| | | btnCozyIcon.Width = Application.GetRealWidth(24);
|
| | | btnCozyIcon.Height = Application.GetRealWidth(24);
|
| | | btnCozyIcon.UnSelectedImagePath = "FunctionIcon/Light/CozyIcon.png";
|
| | | btnCozyIcon.SelectedImagePath = "FunctionIcon/Light/CozyIconOn.png";
|
| | | frameWhite.AddChidren(btnCozyIcon);
|
| | | btnCozyIcon.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | { |
| | | barColorTemplatrue.Progress = 27;
|
| | | barColorTemplatrue.SetCustomText(barColorTemplatrue.Progress * 100 + "K");
|
| | | frameBack.Close();
|
| | | function.SetAttrState(FunctionAttributeKey.CCT, barColorTemplatrue.Progress * 100);
|
| | | barColorTemplatrue.SetCustomText((barColorTemplatrue.Progress * 100) + "K");
|
| | | frameBack.Close(); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.CCT, (barColorTemplatrue.Progress * 100).ToString());
|
| | | DriverLayer.Control.Ins.SendWriteCommand(function, d);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/CozyIconOn.png";
|
| | | };
|
| | | //温馨 2700k
|
| | | var btnCozy = new Button();
|
| | |
| | | btnCozy.Text = Language.StringByID(StringId.Cozy) + " 2700K";
|
| | | btnCozy.TextSize = CSS_FontSize.TextFontSize;
|
| | | btnCozy.TextColor = CSS_Color.FirstLevelTitleColor;
|
| | | btnCozy.SelectedTextColor = CSS_Color.MainColor;
|
| | | btnCozy.TextAlignment = TextAlignment.CenterLeft;
|
| | | frameWhite.AddChidren(btnCozy);
|
| | | btnCozy.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | barColorTemplatrue.Progress = 27;
|
| | | function.SetAttrState(FunctionAttributeKey.CCT, barColorTemplatrue.Progress * 100);
|
| | | barColorTemplatrue.SetCustomText((barColorTemplatrue.Progress * 100) + "K");
|
| | | frameBack.Close(); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.CCT, (barColorTemplatrue.Progress * 100).ToString());
|
| | | DriverLayer.Control.Ins.SendWriteCommand(function, d); barColorTemplatrue.Progress = 27;
|
| | | barColorTemplatrue.SetCustomText(barColorTemplatrue.Progress * 100 + "K");
|
| | | frameBack.Close();
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/CozyIconOn.png";
|
| | | };
|
| | |
|
| | | //会客图标
|
| | |
| | | btnMeetIcon.Width = Application.GetRealWidth(24);
|
| | | btnMeetIcon.Height = Application.GetRealWidth(24);
|
| | | btnMeetIcon.UnSelectedImagePath = "FunctionIcon/Light/MeetingGuestsIcon.png";
|
| | | btnMeetIcon.SelectedImagePath = "FunctionIcon/Light/MeetingGuestsIconOn.png";
|
| | | frameWhite.AddChidren(btnMeetIcon);
|
| | | btnMeetIcon.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | { |
| | | barColorTemplatrue.Progress = 30;
|
| | | barColorTemplatrue.SetCustomText(barColorTemplatrue.Progress * 100 + "K");
|
| | | frameBack.Close();
|
| | | function.SetAttrState(FunctionAttributeKey.CCT, barColorTemplatrue.Progress * 100);
|
| | | barColorTemplatrue.SetCustomText((barColorTemplatrue.Progress * 100) + "K");
|
| | | frameBack.Close(); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.CCT, (barColorTemplatrue.Progress * 100).ToString());
|
| | | DriverLayer.Control.Ins.SendWriteCommand(function, d);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/MeetingGuestsIconOn.png";
|
| | | };
|
| | |
|
| | | //会客 3000k
|
| | |
| | | btnMeet.Text = Language.StringByID(StringId.MeetingGuests) + " 3000K";
|
| | | btnMeet.TextSize = CSS_FontSize.TextFontSize;
|
| | | btnMeet.TextColor = CSS_Color.FirstLevelTitleColor;
|
| | | btnMeet.SelectedTextColor = CSS_Color.MainColor;
|
| | | btnMeet.TextAlignment = TextAlignment.CenterLeft;
|
| | | frameWhite.AddChidren(btnMeet);
|
| | | btnMeet.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | barColorTemplatrue.Progress = 30;
|
| | | barColorTemplatrue.SetCustomText(barColorTemplatrue.Progress * 100 + "K");
|
| | | frameBack.Close();
|
| | | function.SetAttrState(FunctionAttributeKey.CCT, barColorTemplatrue.Progress * 100);
|
| | | barColorTemplatrue.SetCustomText((barColorTemplatrue.Progress * 100) + "K");
|
| | | frameBack.Close(); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.CCT, (barColorTemplatrue.Progress * 100).ToString());
|
| | | DriverLayer.Control.Ins.SendWriteCommand(function, d);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/MeetingGuestsIconOn.png";
|
| | | };
|
| | |
|
| | | //阅读图标
|
| | |
| | | btnReadIcon.Width = Application.GetRealWidth(24);
|
| | | btnReadIcon.Height = Application.GetRealWidth(24);
|
| | | btnReadIcon.UnSelectedImagePath = "FunctionIcon/Light/ReadIcon.png";
|
| | | btnReadIcon.SelectedImagePath = "FunctionIcon/Light/ReadIconOn.png";
|
| | | frameWhite.AddChidren(btnReadIcon);
|
| | | btnReadIcon.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | { |
| | | barColorTemplatrue.Progress = 65;
|
| | | barColorTemplatrue.SetCustomText(barColorTemplatrue.Progress * 100 + "K");
|
| | | frameBack.Close();
|
| | | function.SetAttrState(FunctionAttributeKey.CCT, barColorTemplatrue.Progress * 100);
|
| | | barColorTemplatrue.SetCustomText((barColorTemplatrue.Progress * 100) + "K");
|
| | | frameBack.Close(); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.CCT, (barColorTemplatrue.Progress * 100).ToString());
|
| | | DriverLayer.Control.Ins.SendWriteCommand(function, d);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/ReadIconOn.png";
|
| | | };
|
| | | //阅读 6500k
|
| | | var btnRead = new Button();
|
| | |
| | | btnRead.Height = Application.GetRealWidth(24);
|
| | | btnRead.Text = Language.StringByID(StringId.Reading) + " 6500K";
|
| | | btnRead.TextSize = CSS_FontSize.TextFontSize;
|
| | | btnRead.TextColor = CSS_Color.MainColor;
|
| | | btnRead.TextColor = CSS_Color.FirstLevelTitleColor;
|
| | | btnRead.SelectedTextColor = CSS_Color.MainColor;
|
| | | btnRead.TextAlignment = TextAlignment.CenterLeft;
|
| | | frameWhite.AddChidren(btnRead);
|
| | | btnRead.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | { |
| | | barColorTemplatrue.Progress = 65;
|
| | | barColorTemplatrue.SetCustomText(barColorTemplatrue.Progress * 100 + "K");
|
| | | frameBack.Close();
|
| | | };
|
| | | function.SetAttrState(FunctionAttributeKey.CCT, barColorTemplatrue.Progress * 100);
|
| | | barColorTemplatrue.SetCustomText((barColorTemplatrue.Progress * 100) + "K");
|
| | | frameBack.Close(); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.CCT, (barColorTemplatrue.Progress * 100).ToString());
|
| | | DriverLayer.Control.Ins.SendWriteCommand(function, d);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/ReadIconOn.png";
|
| | | }; |
| | | btnCozy.IsSelected = false; |
| | | btnCozyIcon.IsSelected = false; |
| | | btnMeet.IsSelected = false; |
| | | btnMeetIcon.IsSelected = false; |
| | | btnRead.IsSelected = false; |
| | | btnReadIcon.IsSelected = false;
|
| | | if (function.GetAttrState(FunctionAttributeKey.CCT) == "2700") |
| | | { |
| | | btnCozy.IsSelected = true; |
| | | btnCozyIcon.IsSelected = true; |
| | | } |
| | | if (function.GetAttrState(FunctionAttributeKey.CCT) == "3000") |
| | | { |
| | | btnMeet.IsSelected = true; |
| | | btnMeetIcon.IsSelected = true; |
| | | }
|
| | | if (function.GetAttrState(FunctionAttributeKey.CCT) == "6500") |
| | | { |
| | | btnRead.IsSelected = true; |
| | | btnReadIcon.IsSelected = true; |
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|