| | |
| | | /// <summary>
|
| | | /// 渐变时间修改
|
| | | /// </summary>
|
| | | DiyImageSeekBar barFadeTime;
|
| | | //DiyImageSeekBar barFadeTime;
|
| | | /// <summary>
|
| | | /// 色温的滑动控件
|
| | | /// </summary>
|
| | |
| | | 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,
|
| | |
| | | //色温
|
| | | 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;
|
| | |
| | | #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 = light.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()
|
| | |
| | | btnShortcut = new Button();
|
| | | btnShortcut.X = Application.GetRealWidth(104);
|
| | | btnShortcut.Y = btnSwitch.Y;
|
| | | btnShortcut.Width = Application.GetRealWidth(40);
|
| | | btnShortcut.Height = Application.GetRealWidth(40);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/ColorTemperatrueQuick.png";
|
| | | btnShortcut.Width = Application.GetRealWidth(36);
|
| | | btnShortcut.Height = Application.GetRealWidth(36);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/CozyIconOn.png";
|
| | | controlView.AddChidren(btnShortcut);
|
| | | btnShortcut.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.CCT, light.Attr_CCT.curValue.ToString());
|
| | | DriverLayer.Control.Ins.SendWriteCommand(light, d);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/CozyIconOn.png";
|
| | | };
|
| | | //温馨 2700k
|
| | | var btnCozy = new Button();
|
| | |
| | | DriverLayer.Control.Ins.SendWriteCommand(light, d); barColorTemplatrue.Progress = 27;
|
| | | barColorTemplatrue.SetCustomText(barColorTemplatrue.Progress * 100 + "K");
|
| | | frameBack.Close();
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/CozyIconOn.png";
|
| | | };
|
| | |
|
| | | //会客图标
|
| | |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.CCT, light.Attr_CCT.curValue.ToString());
|
| | | DriverLayer.Control.Ins.SendWriteCommand(light, d);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/MeetingGuestsIconOn.png";
|
| | | };
|
| | |
|
| | | //会客 3000k
|
| | |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.CCT, light.Attr_CCT.curValue.ToString());
|
| | | DriverLayer.Control.Ins.SendWriteCommand(light, d);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/MeetingGuestsIconOn.png";
|
| | | };
|
| | |
|
| | | //阅读图标
|
| | |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.CCT, light.Attr_CCT.curValue.ToString());
|
| | | DriverLayer.Control.Ins.SendWriteCommand(light, d);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/ReadIconOn.png";
|
| | | };
|
| | | //阅读 6500k
|
| | | var btnRead = new Button();
|
| | |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.CCT, light.Attr_CCT.curValue.ToString());
|
| | | DriverLayer.Control.Ins.SendWriteCommand(light, d);
|
| | | btnShortcut.UnSelectedImagePath = "FunctionIcon/Light/ReadIconOn.png";
|
| | | }; |
| | | btnCozy.IsSelected = false; |
| | | btnCozyIcon.IsSelected = false; |