| | |
| | | bodyView.dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
|
| | | if (!bodyView.onDimmerBar)
|
| | | {
|
| | | bodyView.dimmerBar.Progress = Convert.ToInt32( updataTemp.GetAttrState(FunctionAttributeKey.Brightness));
|
| | | 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);
|
| | |
| | | LoadEvet_ChangeFadeTime();
|
| | | LoadEvet_ChangeColorTemplatrue();
|
| | | //回退刷新信息事件
|
| | | actionRefresh = () => {
|
| | | actionRefresh = () => |
| | | {
|
| | | btnFunctionName.Text = btnFunctionName_Out.Text = function.name;
|
| | | btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
|
| | | //function.SaveFunctionData(true);
|
| | |
| | | /// </summary>
|
| | | void LoadEvet_ChangeFadeTime()
|
| | | {
|
| | | //barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
|
| | | //{
|
| | | // function.fadeTime = e;
|
| | | // function.SaveFunctionData(true);
|
| | | //};
|
| | | if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null) |
| | | { |
| | | barFadeTime.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.FadeTime, e.ToString()); |
| | | function.SaveFunctionFile(); |
| | | }; |
| | | } |
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | 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());
|