| | |
| | | {
|
| | | bodyView.dimmerBar.Progress = Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness));
|
| | | } |
| | | bodyView.btnBrightnessText.Text = updataTemp.GetAttrState(FunctionAttributeKey.Brightness) + "%"; |
| | | bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80);
|
| | | if (updataTemp.GetAttrState(FunctionAttributeKey.Brightness) != "0") |
| | | { |
| | | bodyView.btnBrightnessText.Text = updataTemp.GetAttrState(FunctionAttributeKey.Brightness) + "%"; |
| | | bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80); |
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | };
|
| | | }
|
| | |
|
| | | bool curDimmerStatus = false;
|
| | | /// <summary>
|
| | | /// 灯光调光事件
|
| | | /// </summary>
|
| | |
| | | // }.Show(MainPage.BaseView); |
| | | // return; |
| | | //}
|
| | | onDimmerBar = false;
|
| | | //onDimmerBar = false;
|
| | | curDimmerStatus = false; |
| | | function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress);
|
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
|
| | | d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString());
|
| | | d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString()); |
| | | d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime)); |
| | | if (dimmerBar.Progress > 0) |
| | | { |
| | | d.Add(FunctionAttributeKey.OnOff, "on"); |
| | | }
|
| | | Control.Ins.SendWriteCommand(function, d);
|
| | | //function.fadeTime = barFadeTime.Progress;
|
| | | btnBrightnessText.Text = dimmerBar.Progress + "%"; |
| | |
| | | function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
|
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
|
| | | d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
|
| | | d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime));
|
| | | if (btnSwitch.IsSelected)
|
| | | {
|
| | | d.Add(FunctionAttributeKey.Brightness, function.lastBrightness.ToString());
|