old mode 100644
new mode 100755
| | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | 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("on_off", function.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | if (function.spk == SPK.LightDimming || function.spk == SPK.LightRGB) |
| | | { |
| | | var light = function as Light; |
| | | d.Add(FunctionAttributeKey.OnOff, light.trait_on_off.curValue.ToString()); |
| | | if (btnSwitch.IsSelected) |
| | | { |
| | | d.Add(FunctionAttributeKey.Brightness, light.lastBrightness.ToString()); |
| | | } |
| | | else |
| | | { |
| | | light.lastBrightness = light.brightness; |
| | | } |
| | | Control.Ins.SendWriteCommand(light, d); |
| | | } |
| | | else |
| | | { |
| | | d.Add("on_off", function.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | |
| | | { |
| | | ShowMesBtnState(pushMessageInfoList[0], true); |
| | | }); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | isGetting = false; |
| | | } |
| | | |
| | | }); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | try |
| | | { |
| | | return Utlis.UnixToDateTimeWithFormatMS(time, "HH:mm"); |
| | | return Utlis.ToFriendlyDisplay(time); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | /// </summary> |
| | | void RegisterGetPushMessageAction() |
| | | { |
| | | //HDLCommon.GetPushMessageAction = () => { |
| | | // if (bodyView != null) |
| | | // { |
| | | // Utlis.WriteLine("GetPushMessageAction H收到推送"); |
| | | // GetUnreadPushMessages(); |
| | | // } |
| | | //}; |
| | | Action RegisterGetPushMessageAction = () => { |
| | | if (bodyView != null) |
| | | { |
| | | //Utlis.WriteLine("GetPushMessageAction H收到推送"); |
| | | GetUnreadPushMessages(); |
| | | } |
| | | }; |
| | | HDLCommon.GetPushMessageAction = RegisterGetPushMessageAction; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | void UnregisterGetPushMessageAction() |
| | | { |
| | | //HDLCommon.GetPushMessageAction = null; |
| | | HDLCommon.GetPushMessageAction = null; |
| | | } |
| | | |
| | | #endregion |