From c96d62ac9c6bb1d880a9170f9dd477fcb5f76fc0 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 01 二月 2023 10:16:11 +0800
Subject: [PATCH] 备注同步功能
---
Crabtree/SmartHome/UI/SimpleControl/MqttCommon.cs | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/Crabtree/SmartHome/UI/SimpleControl/MqttCommon.cs b/Crabtree/SmartHome/UI/SimpleControl/MqttCommon.cs
index c8f0475..59f4969 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/MqttCommon.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/MqttCommon.cs
@@ -766,6 +766,10 @@
/// </summary>
static void SendPushSignOut ()
{
+#if DEBUG
+ return;
+#endif
+
byte [] message = CommonPage.MyEncodingUTF8.GetBytes (PushSignStr);
MqttRemoteSend (message, 4);
}
@@ -786,6 +790,7 @@
case 0:
topicName = $"/ClientToBusGateWay/{CommonConfig.Current.HomeGatewayInfo.gatewayId}/Common/ON";
if (!string.IsNullOrEmpty (mqttEncryptKey)) {
+ //Utlis.WriteLine ("mqttEncryptKey锛�" + mqttEncryptKey);
message = Shared.Securitys.EncryptionService.AesEncryptPayload (message, mqttEncryptKey);
}
await RemoteMqttClient.PublishAsync (new MqttApplicationMessage { Topic = topicName, Payload = message, Retain = false, QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce });
@@ -944,7 +949,7 @@
public partial class EncryptionService
{
- #region 鍔犲瘑
+#region 鍔犲瘑
/// <summary>
/// 鍔犲瘑涓婚涓築ase64
/// </summary>
@@ -999,10 +1004,10 @@
//浣跨敤AES灏嗘槑鏂囨祦杞垚瀵嗘枃瀛楄妭鏁扮粍
return cTransform.TransformFinalBlock (toEncryptArray, 0, toEncryptArray.Length);
}
- #endregion
+#endregion
- #region 瑙e瘑
+#region 瑙e瘑
/// <summary>
/// 瑙e瘑涓婚鏁版嵁
/// </summary>
@@ -1054,7 +1059,7 @@
//浣跨敤AES灏嗗瘑鏂囨祦杞垚鏄庢枃鐨勫瓧鑺傛暟缁�
return cTransform.TransformFinalBlock (toEncryptArray, 0, toEncryptArray.Length);
}
- #endregion
+#endregion
--
Gitblit v1.8.0