| | |
| | | 15975=正在上传备份文件 |
| | | 15976=确认删除全部消息? |
| | | 15977=确认标记全部消息为已读? |
| | | 15978=通信链接失败 |
| | | 15979=获取网络SSID失败 |
| | | 15980=密码发送失败 |
| | | 15981=选择hdlZigbeeGW-xxxx网络 |
| | | 15982=请连接家庭WiFi |
| | | 15983=正在获取分享数据 |
| | | |
| | | ;★★★★下面这些是接口的返回信息翻译,从18000开始★★★★
|
| | | 18004=指定网关已经被绑定
|
| | |
| | | <AndroidAsset Include="Assets\Phone\Item\Add_Category.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Item\Add_GW.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Item\Back.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Item\BottomShadow.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Item\CancelIcon.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Item\Category_FunctionBG.png" />
|
| | | <AndroidAsset Include="Assets\Phone\Item\Category_FunctionBGSelected.png" />
|
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="2019112601" android:installLocation="auto" android:versionName="1.0.19112601"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="2019112901" android:installLocation="auto" android:versionName="1.0.19112901"> |
| | | <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="26" /> |
| | | <permission android:name="com.hdl.home.permission.JPUSH_MESSAGE" android:protectionLevel="signature" /> |
| | | <uses-permission android:name="android.permission.WAKE_LOCK" /> |
old mode 100755
new mode 100644
| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string CodeIDString = "1.0.19112601"; |
| | | public static string CodeIDString = "1.0.19112901"; |
| | | /// <summary> |
| | | /// 注册来源(0:HDL On 1:Zigbee) |
| | | /// </summary> |
| | |
| | | #if DEBUG |
| | | System.Console.WriteLine(e.Message);
|
| | | #endif |
| | | //Log出力 |
| | | Phone.UserCenter.HdlLogLogic.Current.WriteLog(e); |
| | | return null; |
| | | } |
| | | } |
old mode 100644
new mode 100755
| | |
| | | var revertData = responseDataObj; |
| | | Config.ReFresh(); |
| | | Config.Instance.Account = revertData.Account; |
| | | Config.Instance.MqttKey = revertData.MqttKey; |
| | | Config.Instance.Password = passwordStr;
|
| | | Config.Instance.MD5PWD = revertData.MD5PWD;
|
| | | Config.Instance.Guid = revertData.Guid; |
| | | Config.Instance.LoginDateTime = DateTime.Now; |
| | | Config.Instance.ConnectZigbeeMqttBrokerPwd = revertData.ConnectZigbeeMqttBrokerPwd; |
| | | Config.Instance.ConnectZigbeeMqttClientId = revertData.ConnectZigbeeMqttClientId; |
| | | Config.Instance.ZigbeeMqttBrokerLoadSubDomain = revertData.ZigbeeMqttBrokerLoadSubDomain; |
| | | if (Config.Instance.AccountList.Find((obj) => obj == revertData.Account) == null) |
| | | { |
| | | Config.Instance.AccountList.Add(revertData.Account); |
| | |
| | | var re = await isBindAuthAsync(authStr); |
| | | if (re) |
| | | { |
| | | //直接登录 |
| | | HomePage.Instance.ShowLoginLoadView(); |
| | | Application.RunOnMainThread(() => |
| | | {
|
| | | //直接登录
|
| | | HomePage.Instance.ShowLoginLoadView(); |
| | | }); |
| | | var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID(); |
| | | var homes = await House.GetHomeLists();
|
| | | //启动ZigBee
|
| | |
| | | #endif |
| | |
|
| | | #if iOS |
| | | Home.IOS.AppDelegate.WXLogin(); |
| | | Home.IOS.AppDelegate.WXLogin();
|
| | | Home.IOS.AppDelegate.RespAction = (authStr) => |
| | | { |
| | | if (authStr == null) |
| | |
| | | Config.Instance.Account = revertData.Account; |
| | | Config.Instance.MD5PWD = revertData.MD5PWD; |
| | | Config.Instance.Guid = revertData.Guid; |
| | | Config.Instance.MqttKey = revertData.MqttKey; |
| | | Config.Instance.LoginDateTime = DateTime.Now; |
| | | Config.Instance.ConnectZigbeeMqttBrokerPwd = revertData.ConnectZigbeeMqttBrokerPwd; |
| | | Config.Instance.ConnectZigbeeMqttClientId = revertData.ConnectZigbeeMqttClientId; |
| | | Config.Instance.ZigbeeMqttBrokerLoadSubDomain = revertData.ZigbeeMqttBrokerLoadSubDomain; |
| | | if (Config.Instance.AccountList.Find((obj) => obj == revertData.Account) == null) |
| | | { |
| | | Config.Instance.AccountList.Add(revertData.Account); |
| | |
| | | var revertData = responseDataObj; |
| | | Config.ReFresh(); |
| | | Config.Instance.Account = revertData.Account; |
| | | Config.Instance.MqttKey = revertData.MqttKey; |
| | | Config.Instance.Guid = revertData.Guid; |
| | | Config.Instance.MD5PWD = revertData.MD5PWD; |
| | | Config.Instance.LoginDateTime = DateTime.Now; |
| | | Config.Instance.ConnectZigbeeMqttBrokerPwd = revertData.ConnectZigbeeMqttBrokerPwd; |
| | | Config.Instance.ConnectZigbeeMqttClientId = revertData.ConnectZigbeeMqttClientId; |
| | | Config.Instance.ZigbeeMqttBrokerLoadSubDomain = revertData.ZigbeeMqttBrokerLoadSubDomain; |
| | | if (Config.Instance.AccountList.Find((obj) => obj == revertData.Account) == null) |
| | | { |
| | | Config.Instance.AccountList.Add(revertData.Account); |
| | |
| | | { |
| | | |
| | | timevalue = int.Parse(Common.Logic.CurrentLogic.Actions[isInt]["DelayTime"].ToString()); |
| | | var minutevalue1 = timevalue / 60; |
| | | var secondvalue1 = timevalue % 60; |
| | | //更新最新状态 |
| | | mUIPickerView.setCurrentItems(minutevalue1, secondvalue1, 0); |
| | | if (timevalue > 3600)
|
| | | {
|
| | | //更新最新状态
|
| | | mUIPickerView.setCurrentItems(60, timevalue - 3600, 0);
|
| | | }
|
| | | else
|
| | | {
|
| | | var minutevalue1 = timevalue / 60;
|
| | | var secondvalue1 = timevalue % 60;
|
| | | //更新最新状态
|
| | | mUIPickerView.setCurrentItems(minutevalue1, secondvalue1, 0);
|
| | | } |
| | | value = timevalue; |
| | | } |
| | | string selectde = ""; |
| | |
| | | /// <summary>
|
| | | /// 主键
|
| | | /// </summary>
|
| | | public string Id = string.Empty;
|
| | | /// <summary>
|
| | | /// 我也不知道这个是什么鬼
|
| | | /// </summary>
|
| | | public string RegId = string.Empty;
|
| | | /// <summary>
|
| | | /// 消息内容
|
| | |
| | | return Application.GetRealWidth(realWidth + 20);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 添加底部阴影特效(确保拥有父控件后才调用)
|
| | | /// </summary>
|
| | | /// <param name="view">为哪个控件添加阴影特效,省略时,为当前控件添加</param>
|
| | | /// <param name="average">添加的阴影特效是否按平均值设置高宽度</param>
|
| | | public void AddBottomShadow(View view = null, bool average = false)
|
| | | {
|
| | | //需要扩大的高度
|
| | | int heightValue = 21;
|
| | | //需要扩大的宽度
|
| | | int widthValue = 15;
|
| | | //最大高度
|
| | | int maxHeight = 0;
|
| | | if (average == false)
|
| | | {
|
| | | heightValue = Application.GetRealHeight(heightValue);
|
| | | widthValue = Application.GetRealWidth(widthValue);
|
| | | maxHeight = Application.GetRealHeight(460);
|
| | | }
|
| | | else
|
| | | {
|
| | | heightValue = Application.GetMinRealAverage(heightValue);
|
| | | widthValue = Application.GetMinRealAverage(widthValue);
|
| | | maxHeight = Application.GetMinRealAverage(460);
|
| | | }
|
| | | if (view == null)
|
| | | {
|
| | | //省略时,指定为当前控件
|
| | | view = this;
|
| | | }
|
| | | //先移除
|
| | | this.btnBottomShadowView1?.RemoveFromParent();
|
| | | this.btnBottomShadowView2?.RemoveFromParent();
|
| | |
|
| | | int realHeight = view.Height + heightValue * 2;
|
| | | if (realHeight <= maxHeight)
|
| | | {
|
| | | //阴影控件
|
| | | this.btnBottomShadowView1 = new Button();
|
| | | btnBottomShadowView1.UnSelectedImagePath = "Item/BottomShadow.png";
|
| | | btnBottomShadowView1.Height = realHeight;
|
| | | btnBottomShadowView1.Width = view.Width + widthValue * 2;
|
| | | btnBottomShadowView1.X = view.X - widthValue;
|
| | | btnBottomShadowView1.Y = view.Y;
|
| | | view.Parent.AddChidren(btnBottomShadowView1);
|
| | | view.BringToFront();
|
| | | }
|
| | | else
|
| | | {
|
| | | //超过最大时,特殊处理
|
| | | this.btnBottomShadowView1 = new Button();
|
| | | btnBottomShadowView1.UnSelectedImagePath = "Item/BottomShadow.png";
|
| | | btnBottomShadowView1.Height = view.Height - heightValue * 2;
|
| | | btnBottomShadowView1.Width = view.Width + widthValue * 2;
|
| | | btnBottomShadowView1.X = view.X - widthValue;
|
| | | btnBottomShadowView1.Y = view.Y + heightValue * 2;
|
| | | view.Parent.AddChidren(btnBottomShadowView1);
|
| | |
|
| | | this.btnBottomShadowView2 = new Button();
|
| | | btnBottomShadowView2.UnSelectedImagePath = "Item/BottomShadow.png";
|
| | | btnBottomShadowView2.Height = maxHeight;
|
| | | btnBottomShadowView2.Width = view.Width + widthValue * 2;
|
| | | btnBottomShadowView2.X = view.X - widthValue;
|
| | | btnBottomShadowView2.Y = view.Bottom - maxHeight + heightValue * 2;
|
| | | view.Parent.AddChidren(btnBottomShadowView2);
|
| | | view.BringToFront();
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ Log出力____________________________
|
| | |
| | | /// <param name="i_width">宽度,真实值</param>
|
| | | /// <param name="i_height">高度,真实值</param>
|
| | | /// <param name="i_radius">圆角度(只对安卓有效)</param>
|
| | | public BottomLeftClickButton(int i_width, int i_height, int i_radius = 8)
|
| | | public BottomLeftClickButton(int i_width, int i_height, uint i_radius = 8)
|
| | | {
|
| | | this.Height = i_height;
|
| | | this.Width = i_width;
|
| | | this.Gravity = Gravity.BottomLeft;
|
| | |
|
| | | #if Android
|
| | | this.Radius = 8;
|
| | | this.Radius = i_radius;
|
| | | #endif
|
| | | }
|
| | |
|
| | |
| | | /// <param name="i_width">宽度,真实值</param>
|
| | | /// <param name="i_height">高度,真实值</param>
|
| | | /// <param name="i_radius">圆角度(只对安卓有效)</param>
|
| | | public BottomRightClickButton(int i_width, int i_height, int i_radius = 8)
|
| | | public BottomRightClickButton(int i_width, int i_height, uint i_radius = 8)
|
| | | {
|
| | | this.Height = i_height;
|
| | | this.Width = i_width;
|
| | | this.Gravity = Gravity.BottomRight;
|
| | |
|
| | | #if Android
|
| | | this.Radius = 8;
|
| | | this.Radius = i_radius;
|
| | | #endif
|
| | | }
|
| | |
|
| | |
| | | this.frameTable.AddChidren(btnMsg);
|
| | | }
|
| | | //添加底部阴影特效
|
| | | this.btnTime.AddBottomShadow(this.frameTable);
|
| | | this.frameTable.SetViewShadow(true);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | this.Height = realHeight + Application.GetRealHeight(44);
|
| | | }
|
| | | //添加底部阴影特效
|
| | | this.btnTime.AddBottomShadow(this.frameTable);
|
| | | this.frameTable.SetViewShadow(true);
|
| | |
|
| | | return value;
|
| | | }
|
| | |
| | | /// <summary>
|
| | | /// 做成一个存在于右上角的菜单控件
|
| | | /// </summary>
|
| | | /// <param name="i_RowCount">一共有几行</param>
|
| | | /// <param name="i_RowCount">一共有几行(不含标题)</param>
|
| | | /// <param name="i_width">这个菜单有多宽</param>
|
| | | /// <param name="titleText">标题文本(如果不为空,菜单模式变更为拥有标题的模式)</param>
|
| | | public TopRightMenuControl(int i_RowCount, int i_width = 395, string titleText = null)
|
| | |
| | |
|
| | | //最大显示5个
|
| | | int rowCount = this.RowCount > 5 ? 5 : this.RowCount;
|
| | | if (rowCount < 5 && titleText != null)
|
| | | {
|
| | | //菜单+1
|
| | | rowCount++;
|
| | | }
|
| | | //桌布
|
| | | var frameTable = new FrameLayout();
|
| | | frameTable.X = Application.GetRealWidth(662 - (RowWidth - 395));
|
| | |
| | | }
|
| | |
|
| | | //消息
|
| | | var btnMsg = new NormalViewControl(frameBack.Width - Application.GetRealWidth(60 * 2), Application.GetRealHeight(180), false);
|
| | | var btnMsg = new NormalViewControl(frameBack.Width - Application.GetRealWidth(55 * 2), Application.GetRealHeight(180), false);
|
| | | btnMsg.Y = Application.GetRealHeight(141);
|
| | | btnMsg.IsMoreLines = true;
|
| | | btnMsg.TextAlignment = TextAlignment.Center;
|
| | |
| | | var file2 = System.IO.File.Create(checkFile);
|
| | | file2.Close();
|
| | |
|
| | | //重新刷新住宅对象
|
| | | UserCenterLogic.RefreshHomeObject();
|
| | |
|
| | | return 1;
|
| | | }
|
| | |
|
| | |
| | | /// <returns></returns> |
| | | private async static Task<bool> GetFirmwareVersionAndSetToMemmory(FirmwareLevelType levelType, GetFirmwareVersionPra pra)
|
| | | {
|
| | | string resultValue = await UserCenterLogic.GetResponseDataByRequestHttps("FirmwareMana/DetectionPlatformUploadFirmware", false, pra);
|
| | | if (resultValue == null)
|
| | | var listNotShow = new List<string>() { "NotSetAgain" };
|
| | | string resultValue = await UserCenterLogic.GetResponseDataByRequestHttps("FirmwareMana/DetectionPlatformUploadFirmware", false, pra, listNotShow);
|
| | | if (string.IsNullOrEmpty(resultValue) == true)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | List<string> listBackupGwId = new List<string>();
|
| | | var fileData = Global.ReadFileByDirectory(DirNameResourse.LocalMemoryDirectory, DirNameResourse.BackupGatewayIdFile);
|
| | | if (fileData != null)
|
| | | {
|
| | | //新增:虽然概率低,但是确实发生了。如果有网络时,App重新绑定记录的网关失败的话
|
| | | //不应该删除它
|
| | | listBackupGwId = JsonConvert.DeserializeObject<List<string>>(System.Text.Encoding.UTF8.GetString(fileData));
|
| | | }
|
| | |
|
| | | List<string> listDelete = new List<string>(); |
| | | foreach (var gatewayId in this.dicGateway.Keys)
|
| | | {
|
| | | if (result.ContainsKey(gatewayId) == false)
|
| | | if (result.ContainsKey(gatewayId) == false && listBackupGwId.Contains(gatewayId) == false)
|
| | | {
|
| | | //本地存在云端不存在的网关,则删除
|
| | | listDelete.Add(gatewayId);
|
| | |
| | | /// <summary>
|
| | | /// 获取成员共享列表然后保存到本地(用完之后最好调用清空 ClearShardDirectory函数清空)
|
| | | /// </summary>
|
| | | /// <param name="SubAccountDistributedMark">成员列表接口返回的SubAccountDistributedMark</param>
|
| | | /// <param name="memberShardInfo">
|
| | | /// <para>成员的分享数据</para>
|
| | | /// <para>如果不知道这是什么东西,就New一个,然后缓存起来,调用其他函数都需要这个东西</para>
|
| | |
| | | }
|
| | | memberShardInfo.Refresh = false;
|
| | |
|
| | | //打开进度条
|
| | | ProgressBar.Show();
|
| | | //正在获取分享数据
|
| | | ProgressFormBar.Current.Start();
|
| | | ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uShardContentGetting));
|
| | |
|
| | | var infoPra = new
|
| | | {
|
| | |
| | | if (result == null)
|
| | | {
|
| | | //关闭进度条
|
| | | ProgressBar.Close();
|
| | | ProgressFormBar.Current.Close();
|
| | | return false;
|
| | | }
|
| | | var listData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ReceiveShardInfoResult>>(result);
|
| | |
| | | if (listFile == null)
|
| | | {
|
| | | //关闭进度条
|
| | | ProgressBar.Close();
|
| | | ProgressFormBar.Current.Close();
|
| | | return false;
|
| | | }
|
| | |
|
| | |
| | | this.GetMemberShardContentListFromLocal(memberShardInfo);
|
| | |
|
| | | //关闭进度条
|
| | | ProgressBar.Close();
|
| | | ProgressFormBar.Current.Close();
|
| | |
|
| | | return true;
|
| | | }
|
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Security.Cryptography;
|
| | | using System.Text;
|
| | |
|
| | | namespace Shared.Phone.UserCenter
|
| | |
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 当前Wifi的Ip地址
|
| | | /// </summary>
|
| | | public string IpAddress
|
| | | {
|
| | | get
|
| | | {
|
| | | var temp = new Shared.Net.NetWiFi();
|
| | | return temp.GetIPAddress();
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 当前是否是网关热点
|
| | | /// </summary>
|
| | | public bool IsGatewayHotspot
|
| | | {
|
| | | get
|
| | | {
|
| | | string myId = this.SSID;
|
| | |
|
| | | if (myId.StartsWith("hdlZigbeeGW") == true)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 当前wifi的SSID,也叫Wifi的名字(取不到时,会返回null)
|
| | | /// </summary>
|
| | | public string SSID
|
| | |
| | | {
|
| | | System.Threading.Thread.Sleep(50);
|
| | | count++;
|
| | | if (count == 60)
|
| | | if (count == 20)
|
| | | {
|
| | | //3秒超时
|
| | | //1秒超时
|
| | | return null;
|
| | | }
|
| | | }
|
| | |
| | | private Com.Mediatek.Elian.ElianNative hdlWiFi = null;
|
| | | #endif
|
| | |
|
| | | /// <summary>
|
| | | /// TCP协议
|
| | | /// </summary>
|
| | | private System.Net.Sockets.TcpClient tcpClient = null;
|
| | | /// <summary>
|
| | | /// 链接流对象
|
| | | /// </summary>
|
| | | private System.Net.Sockets.NetworkStream networkStream = null;
|
| | | /// <summary>
|
| | | /// Ap模式网关返回的秘钥
|
| | | /// </summary>
|
| | | private string randDesKey = null;
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ Ap模式的TCP链接____________________
|
| | |
|
| | | /// <summary>
|
| | | /// 打开Ap模式的TCP链接(有错误时,直接返回错误消息。没有错误时,返回null)
|
| | | /// </summary>
|
| | | /// <returns></returns>
|
| | | public string StartApTcpConnection()
|
| | | {
|
| | | try
|
| | | {
|
| | | //TCP连接
|
| | | tcpClient = new System.Net.Sockets.TcpClient();
|
| | | tcpClient.Connect("192.168.8.1", 5000);
|
| | | networkStream = tcpClient.GetStream();
|
| | | //加密数据
|
| | | string sendDataMsg = "hdl1985.";
|
| | | string DefaultdesKey = "hdl1985.";
|
| | | //44bytes 加密数据 DES加密 base64密文
|
| | | var sendData = Encoding.UTF8.GetBytes(DesEncrypt(sendDataMsg, DefaultdesKey));
|
| | | //将数据写入网络流
|
| | | networkStream.Write(sendData, 0, sendData.Length);
|
| | |
|
| | | System.Threading.Thread.Sleep(500);
|
| | | //2.接收状态,长度<1024字节
|
| | | byte[] bytes = new Byte[1024];
|
| | | int length = networkStream.Read(bytes, 0, bytes.Length);
|
| | | if (length == 0)
|
| | | {
|
| | | //通信链接失败
|
| | | return Language.StringByID(R.MyInternationalizationString.uCommunicationLinkFail);
|
| | | }
|
| | | string data = Encoding.UTF8.GetString(bytes, 0, length);
|
| | | //网关返回的秘钥
|
| | | this.randDesKey = DESDecrypt(data, DefaultdesKey);
|
| | |
|
| | | return null;
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | HdlLogLogic.Current.WriteLog(ex);
|
| | | this.CloseApTcpConnection();
|
| | | //通信链接失败
|
| | | return Language.StringByID(R.MyInternationalizationString.uCommunicationLinkFail);
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// Ap模式 发送密码到家庭的路由器
|
| | | /// </summary>
|
| | | /// <param name="ssid"></param>
|
| | | /// <param name="password"></param>
|
| | | /// <returns></returns>
|
| | | public bool SendApHomeWifiPassword(string ssid, string password)
|
| | | {
|
| | | try
|
| | | {
|
| | | //加密数据
|
| | | string data2 = "ssid:" + ssid + "," + "pwd:" + password;
|
| | | var sendData2 = Encoding.UTF8.GetBytes(DesEncrypt(data2, randDesKey));
|
| | | //将数据写入网络流
|
| | | networkStream.Write(sendData2, 0, sendData2.Length);
|
| | | return true;
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | HdlLogLogic.Current.WriteLog(ex);
|
| | | return false;
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 关闭Ap模式的tcp链接
|
| | | /// </summary>
|
| | | public void CloseApTcpConnection()
|
| | | {
|
| | | try
|
| | | {
|
| | | //关闭客户端
|
| | | tcpClient?.Close();
|
| | | tcpClient = null;
|
| | | networkStream = null;
|
| | | randDesKey = null;
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | HdlLogLogic.Current.WriteLog(ex);
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 加密解密___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// //加密数据
|
| | | /// </summary>
|
| | | /// <param name="pToDesEncrypt"></param>
|
| | | /// <param name="sKey">DES秘钥</param>
|
| | | /// <returns></returns>
|
| | | private string DesEncrypt(string pToDesEncrypt, string sKey)
|
| | | {
|
| | | // 创建des加密没
|
| | | using (DESCryptoServiceProvider des = new DESCryptoServiceProvider())
|
| | | {
|
| | | // 得到UTF-8的数据源
|
| | | byte[] inputByteArray = Encoding.UTF8.GetBytes(pToDesEncrypt);
|
| | | // 设置key和iv密钥
|
| | | des.Key = ASCIIEncoding.ASCII.GetBytes(sKey);
|
| | | des.IV = ASCIIEncoding.ASCII.GetBytes(sKey);
|
| | | //由于java是使用默认加密模式,C#默认是CBC,需要修改为ECB
|
| | | des.Mode = CipherMode.CBC;
|
| | | des.Padding = PaddingMode.PKCS7;
|
| | | // 创建数据流并进行加密
|
| | | var ms = new System.IO.MemoryStream();
|
| | | using (CryptoStream cs = new CryptoStream(ms, des.CreateEncryptor(), CryptoStreamMode.Write))
|
| | | {
|
| | | cs.Write(inputByteArray, 0, inputByteArray.Length);
|
| | | cs.FlushFinalBlock();
|
| | | cs.Close();
|
| | | }
|
| | | // 关闭数据流
|
| | | ms.Close();
|
| | | return Convert.ToBase64String(ms.ToArray());//base64密文
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 解密
|
| | | /// </summary>
|
| | | /// <param name="pToDecrypt"></param>
|
| | | /// <param name="key">解密密匙</param>
|
| | | /// <returns></returns>
|
| | | private string DESDecrypt(string pToDecrypt, string key = null)
|
| | | {
|
| | | byte[] inputByteArray = Convert.FromBase64String(pToDecrypt);
|
| | | using (DESCryptoServiceProvider des = new DESCryptoServiceProvider())
|
| | | {
|
| | |
|
| | | des.Key = ASCIIEncoding.ASCII.GetBytes(key);
|
| | | des.IV = ASCIIEncoding.ASCII.GetBytes(key);
|
| | |
|
| | | var ms = new System.IO.MemoryStream();
|
| | | using (CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(), CryptoStreamMode.Write))
|
| | | {
|
| | | cs.Write(inputByteArray, 0, inputByteArray.Length);
|
| | | cs.FlushFinalBlock();
|
| | | cs.Close();
|
| | | }
|
| | | string str = Encoding.UTF8.GetString(ms.ToArray());
|
| | | ms.Close();
|
| | | return str;
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 一般方法___________________________
|
| | |
| | | /// </summary>
|
| | | public static void RefreshAllMemory()
|
| | | {
|
| | | //备份的数据,有可能是主人自己上传的,如果管理员登陆时,他获取的备份数据有点特殊
|
| | | //比如下面这三个东西在主账号那里是不需要的
|
| | | bool isOthreShare = Config.Instance.Home.IsOthreShare;
|
| | | int accountType = Config.Instance.Home.AccountType;
|
| | | string mainMark = Config.Instance.Home.MainUserDistributedMark;
|
| | | //还原住宅对象
|
| | | Config.Instance.Home = House.GetHouseByHouseId(Config.Instance.Home.Id);
|
| | | Config.Instance.Home.IsOthreShare = isOthreShare;
|
| | | Config.Instance.Home.AccountType = accountType;
|
| | | Config.Instance.Home.MainUserDistributedMark = mainMark;
|
| | | Config.Instance.Home.Save(false);
|
| | |
|
| | | //刷新住宅对象
|
| | | RefreshHomeObject();
|
| | | //刷新本地网关文件
|
| | | HdlGatewayLogic.Current.ReFreshByLocal();
|
| | | //刷新本地设备
|
| | |
| | | HdlGatewayLogic.Current.SynchronizeDbGateway();
|
| | | //从本地重新加载全部的房间
|
| | | Common.Room.RefreshAllRoomByLocation();
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 刷新住宅对象
|
| | | /// </summary>
|
| | | public static void RefreshHomeObject()
|
| | | {
|
| | | //备份的数据,有可能是主人自己上传的,如果管理员登陆时,他获取的备份数据有点特殊
|
| | | //比如下面这三个东西在主账号那里是不需要的
|
| | | bool isOthreShare = Config.Instance.Home.IsOthreShare;
|
| | | int accountType = Config.Instance.Home.AccountType;
|
| | | string mainMark = Config.Instance.Home.MainUserDistributedMark;
|
| | | double Longitude = Config.Instance.Home.Longitude;
|
| | | double Latitude = Config.Instance.Home.Latitude;
|
| | | //还原住宅对象
|
| | | Config.Instance.Home = House.GetHouseByHouseId(Config.Instance.Home.Id);
|
| | | Config.Instance.Home.IsOthreShare = isOthreShare;
|
| | | Config.Instance.Home.AccountType = accountType;
|
| | | Config.Instance.Home.MainUserDistributedMark = mainMark;
|
| | | Config.Instance.Home.Longitude = Longitude;
|
| | | Config.Instance.Home.Latitude = Latitude;
|
| | | Config.Instance.Home.Save(false);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | /// <summary>
|
| | | /// 关闭所有打开了的界面
|
| | | /// </summary>
|
| | | public static void CloseAllOpenForm()
|
| | | /// <param name="tagetFrom">目标界面,如果指定了的话,则关闭目标界面上层的全部界面(它自身不关闭)</param>
|
| | | public static void CloseAllOpenForm(string tagetFrom = "")
|
| | | {
|
| | | while (UserView.HomePage.Instance.ChildrenCount > 0)
|
| | | {
|
| | | var view = UserView.HomePage.Instance.GetChildren(UserView.HomePage.Instance.ChildrenCount - 1);
|
| | | if (view is CommonFormBase)
|
| | | {
|
| | | if (((CommonFormBase)view).FormID == tagetFrom)
|
| | | {
|
| | | //只关闭到指定目标界面
|
| | | return;
|
| | | }
|
| | | ((CommonFormBase)view).CloseForm();
|
| | | }
|
| | | else if (view is UserView.UserPage)
|
| | | {
|
| | | break;
|
| | | return;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | UserCenterResourse.Option.UserPictruePath = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Config.Instance.Guid, DirNameResourse.UserPictrueDirectory);
|
| | |
|
| | | //初始化登陆账号的信息
|
| | | await InitUserAccoutInfo();
|
| | | //初始化管理员权限信息
|
| | | await InitAdminConnectMqttInfo(true);
|
| | | var hadNet = await InitUserAccoutInfo();
|
| | | //如果有网络的话
|
| | | if (hadNet == true)
|
| | | {
|
| | | //重新发送命令去绑定断网情况下备份的网关
|
| | | HdlGatewayLogic.Current.ResetComandToBindBackupGateway();
|
| | | }
|
| | |
|
| | | //初始化缓存成员的信息
|
| | | InitLocalMemberListInfo();
|
| | |
|
| | | //重新发送命令去绑定断网情况下备份的网关
|
| | | HdlGatewayLogic.Current.ResetComandToBindBackupGateway();
|
| | |
|
| | | //预创建个人中心全部的文件夹
|
| | | CreatAllUserCenterDirectory();
|
| | |
| | | UserCenterResourse.Option.OldAccountId = Common.Config.Instance.Account;
|
| | |
|
| | | //同步数据(二次调用没关系)
|
| | | var result = await HdlAutoBackupLogic.SynchronizeDbAutoBackupData();
|
| | | int result = -1;
|
| | | if (hadNet == true)
|
| | | {
|
| | | result = await HdlAutoBackupLogic.SynchronizeDbAutoBackupData();
|
| | | }
|
| | |
|
| | | //初始化本地的网关信息
|
| | | HdlGatewayLogic.Current.ReFreshByLocal();
|
| | | //初始化本地的设备信息
|
| | | Common.LocalDevice.Current.ReFreshByLocal();
|
| | |
|
| | | //同步云端的网关id,如果本地拥有云端不存在的id,则表示应该被换绑了,直接删除
|
| | | HdlGatewayLogic.Current.SynchronizeDbGateway();
|
| | | if (hadNet == true)
|
| | | {
|
| | | //同步云端的网关id,如果本地拥有云端不存在的id,则表示应该被换绑了,直接删除
|
| | | HdlGatewayLogic.Current.SynchronizeDbGateway();
|
| | | }
|
| | |
|
| | | //初始化住宅对象
|
| | | Common.Config.Instance.Home = House.GetHouseByHouseId(Common.Config.Instance.HomeId);
|
| | |
| | | var info = JsonConvert.DeserializeObject<MemberAdministratorResult>(result);
|
| | | Config.Instance.AdminRequestBaseUrl = info.RequestBaseUrl;
|
| | | Config.Instance.AdminRequestToken = info.RequestToken;
|
| | |
|
| | | return true;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化管理员权限的远程连接信息
|
| | | /// </summary>
|
| | | /// <param name="stopRemote">是否中断远程</param>
|
| | | /// <returns></returns>
|
| | | public static async Task<bool> InitAdminConnectMqttInfo(bool stopRemote = false)
|
| | | {
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo != 2 && UserCenterResourse.UserInfo.AuthorityNo != 3)
|
| | | {
|
| | | //只有成员分身才能调用这个函数
|
| | | return true;
|
| | | }
|
| | | var praMqtt = new
|
| | | {
|
| | | CommonPage.RequestVersion,
|
| | | LoginAccessToken = Config.Instance.Token,
|
| | | Config.Instance.Home.MainUserDistributedMark,
|
| | | HomeId = Config.Instance.Home.Id
|
| | | };
|
| | |
|
| | | var listNotShow = new List<string>() { "NotSetAgain" };
|
| | | var result2 = await GetResponseDataByRequestHttps("App/GetConnectMainUserMqttInfo", false, praMqtt, listNotShow);
|
| | | if (string.IsNullOrEmpty(result2) == true)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | //远程Mqtt
|
| | | var info2 = JsonConvert.DeserializeObject<MemberAdministratorMqttResult>(result2);
|
| | | Config.Instance.AdminConnectZigbeeMqttBrokerPwd = info2.ConnectZigbeeMqttBrokerPwd;
|
| | | Config.Instance.AdminConnectZigbeeMqttClientId = info2.ConnectZigbeeMqttClientId;
|
| | | Config.Instance.AdminMqttKey = info2.MqttKey;
|
| | | Config.Instance.AdminZigbeeMqttBrokerLoadSubDomain = info2.ZigbeeMqttBrokerLoadSubDomain;
|
| | | Config.Instance.AdminConnectZigbeeMqttBrokerName = info2.ConnectZigbeeMqttBrokerName;
|
| | |
|
| | | return true;
|
| | | }
|
| | |
| | | /// </summary> |
| | | public static List<CommonDevice> oldTargetList = new List<CommonDevice>(); |
| | | |
| | | //public static async System.Threading.Tasks.Task<int> RemoveTargets(BindObj.BindListResponseObj bindDevice, Panel currentKey) |
| | | //{ |
| | | // var delDevice = new BindObj.DelDeviceBindData(); |
| | | // delDevice.DeviceAddr = currentKey.DeviceAddr; |
| | | // delDevice.Epoint = currentKey.DeviceEpoint; |
| | | |
| | | // if (bindDevice.BindType == 0 || bindDevice.BindType == 1) |
| | | // { |
| | | // var removeDevice = new BindObj.RemoveBindListObj(); |
| | | // removeDevice.BindCluster = bindDevice.BindCluster; |
| | | // removeDevice.BindType = 0; |
| | | // removeDevice.BindMacAddr = bindDevice.BindMacAddr; |
| | | // removeDevice.BindEpoint = bindDevice.BindEpoint; |
| | | // delDevice.RemoveBindList.Add(removeDevice); |
| | | // } |
| | | // else if (bindDevice.BindType == 2) |
| | | // { |
| | | // var removeDevice = new BindObj.RemoveBindListObj(); |
| | | // removeDevice.BindCluster = bindDevice.BindCluster; |
| | | // removeDevice.BindType = 1; |
| | | // removeDevice.BindScenesId = bindDevice.BindScenesId; |
| | | // delDevice.RemoveBindList.Add(removeDevice); |
| | | // } |
| | | // var delResult = await currentKey.DelDeviceBindAsync(delDevice); |
| | | // foreach (var re in delResult.delDeviceBindResponseData.RemoveBindList) |
| | | // { |
| | | // switch (re.Result) |
| | | // { |
| | | // case 0: |
| | | // return 0; |
| | | // break; |
| | | // case 4: |
| | | |
| | | // if (delResult.removeBindResultResponseData != null) |
| | | // { |
| | | // if (delResult.removeBindResultResponseData.Result == 0) |
| | | // { |
| | | // return 0; |
| | | // } |
| | | // } |
| | | // break; |
| | | // } |
| | | // } |
| | | // return -1; |
| | | //} |
| | | |
| | | public static async System.Threading.Tasks.Task<int> RemoveTargets(BindObj.BindListResponseObj bindDevice, Panel currentKey) |
| | | { |
| | | var delDevice = new BindObj.DelDeviceBindData(); |
| | |
| | | delDevice.RemoveBindList.Add(removeDevice); |
| | | } |
| | | var delResult = await currentKey.DelDeviceBindAsync(delDevice); |
| | | foreach (var re in delResult.delDeviceBindResponseData.RemoveBindList) |
| | | if (delResult != null && delResult.removeBindResultResponseData != null) |
| | | { |
| | | switch (re.Result) |
| | | if (delResult.removeBindResultResponseData.Result == 0) |
| | | { |
| | | case 0: |
| | | return 0; |
| | | break; |
| | | case 4: |
| | | |
| | | if (delResult.removeBindResultResponseData != null) |
| | | { |
| | | if (delResult.removeBindResultResponseData.Result == 0) |
| | | { |
| | | return 0; |
| | | } |
| | | } |
| | | break; |
| | | return 0; |
| | | } |
| | | else |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.RemoveFailed), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | } |
| | | return -1; |
| | | } |
| | |
| | | { |
| | | CommonPage.Loading.Start(""); |
| | | var bindResult = await currentKey.ClearBindInfoAsync(); |
| | | if (bindResult.clearBindInfoResponseData != null) |
| | | if (bindResult != null && bindResult.clearBindInfoResponseData != null) |
| | | { |
| | | if (bindResult.clearBindInfoResponseData.Result != 0) |
| | | { |
| | |
| | | isDelSuccess = true; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(btnDel); |
| | | } |
| | | } |
| | | catch { } |
| | |
| | | CommonPage.Loading.Start(""); |
| | | var delResult = new DelDeviceBindResponseAllData(); |
| | | delResult = await currentKey.DelDeviceBindAsync(delDevice); |
| | | //if (delResult != null) |
| | | //{ |
| | | // if (delResult.removeBindResultResponseData != null) |
| | | // { |
| | | // if (delResult.removeBindResultResponseData.Result == 0) |
| | | // { |
| | | // currentKey.bindList.Remove(bindDevice); |
| | | // RefreshList(); |
| | | // return 0; |
| | | // } |
| | | // else |
| | | // { |
| | | // new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.RemoveFailed), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | // } |
| | | // } |
| | | // else if (delResult.delDeviceBindResponseData != null) |
| | | // { |
| | | // foreach (var remTarget in delResult.delDeviceBindResponseData.RemoveBindList) |
| | | // { |
| | | // if (remTarget.Result == 0) |
| | | // { |
| | | // currentKey.bindList.Remove(bindDevice); |
| | | // RefreshList(); |
| | | // //如果是场景,用户删除清空当前到房间列表 |
| | | // currentKey.RoomId = ""; |
| | | // currentKey.ReSave(); |
| | | // return 0; |
| | | // } |
| | | // else |
| | | // { |
| | | // new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.RemoveFailed), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | // } |
| | | // } |
| | | // } |
| | | //} |
| | | //else |
| | | //{ |
| | | // new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | //} |
| | | |
| | | if (delResult.delDeviceBindResponseData?.RemoveBindList != null) |
| | | { |
| | | foreach (var re in delResult.delDeviceBindResponseData.RemoveBindList) |
| | |
| | | CommonPage.Loading.Hide(); |
| | | } |
| | | break; |
| | | case 4: |
| | | case 2: |
| | | if (delResult.removeBindResultResponseData != null) |
| | | { |
| | | if (delResult.removeBindResultResponseData.Result == 0) |
| | |
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1)
|
| | | {
|
| | | Action action = null;
|
| | | if (!UserCenterResourse.Option.DoorUnLockByRemote)
|
| | | Action actionNone = null;
|
| | | action = () =>
|
| | | {
|
| | | var userManagement = new Shared.Phone.UserCenter.DoorLock.UserManagement(doorLock);
|
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userManagement);
|
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
|
| | | userManagement.Show();
|
| | | };
|
| | | actionNone = () =>
|
| | | {
|
| | | Shared.Phone.UserCenter.DoorLock.DoorLockCommonLayout.SecurityRequest(doorLock, action);
|
| | | }
|
| | | else
|
| | | {
|
| | | action = async () =>
|
| | | {
|
| | | var userManagement = new Shared.Phone.UserCenter.DoorLock.UserManagement(doorLock);
|
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userManagement);
|
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
|
| | | userManagement.Show();
|
| | | };
|
| | | HdlCheckLogic.Current.CheckSecondarySecurity(action);
|
| | | }
|
| | | };
|
| | | HdlCheckLogic.Current.CheckSecondarySecurity(action, actionNone);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | var result = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockOperateAccess(doorLock, Shared.Common.Config.Instance.Guid);
|
| | | if (result == false)
|
| | | {
|
| | | var userManagement = new Shared.Phone.UserCenter.DoorLock.UserManagement(doorLock);
|
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userManagement);
|
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
|
| | | userManagement.Show();
|
| | | Action action = null;
|
| | | Action actionNone = null;
|
| | | action = () =>
|
| | | {
|
| | | var userManagement = new Shared.Phone.UserCenter.DoorLock.UserManagement(doorLock);
|
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userManagement);
|
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
|
| | | userManagement.Show();
|
| | | };
|
| | | actionNone = () =>
|
| | | {
|
| | | Shared.Phone.UserCenter.DoorLock.DoorLockCommonLayout.SecurityRequest(doorLock, action);
|
| | | };
|
| | | HdlCheckLogic.Current.CheckSecondarySecurity(action, actionNone);
|
| | |
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | |
| | | //主线程的异步会阻塞主线程,导致界面有段时间会白屏,所以这样子让界面先出来 |
| | | //然后再刷新数据 |
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | HdlThreadLogic.Current.RunMainInThread(() =>
|
| | | {
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | //初始化记录列表
|
| | | this.InitLogListInfo();
|
| | | });
|
| | | //初始化记录列表
|
| | | this.InitLogListInfo();
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | btnScreeningIcon.Gravity = Gravity.CenterVertical;
|
| | | btnScreeningIcon.UnSelectedImagePath = "Item/ScreeningType.png";
|
| | | frameTitle.AddChidren(btnScreeningIcon, ChidrenBindMode.NotBind);
|
| | | btnScreeningIcon.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //显示类型筛选界面
|
| | | this.ShowDoorLockScreeningTypeForm();
|
| | | };
|
| | |
|
| | | //底线
|
| | | frameTitle.AddBottomLine();
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | btnIcon.UnSelectedImagePath = "Item/UnLockSuccess.png";
|
| | | btnIcon.UnSelectedImagePath = "Item/UnLockFail.png";
|
| | | }
|
| | |
|
| | | //信息
|
| | |
| | | List<string> listUser = null;
|
| | | if (listSearchUserId.Contains("-1") == false)
|
| | | {
|
| | | listUser = new List<string>();
|
| | | listUser.AddRange(listSearchUserId);
|
| | | //移除其他,因为云端固定会给
|
| | | listUser.Remove("");
|
| | |
| | | List<int> listLock = null;
|
| | | if (listSearchLockId.Contains(-1) == false)
|
| | | {
|
| | | listLock = new List<int>();
|
| | | listLock.AddRange(listSearchLockId);
|
| | | }
|
| | |
|
| | |
| | | doorDialog.dialogMidFraFrameLayout.Height = Application.GetRealHeight(69); |
| | | doorDialog.dialogMidFraFrameLayout.X = Application.GetRealWidth(58); |
| | | doorDialog.dialogMidFraFrameLayout.Y = Application.GetRealHeight(213); |
| | | doorDialog.dialogMidFraFrameLayout.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBorder; |
| | | doorDialog.dialogMidFraFrameLayout.BackgroundColor = BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBorder; |
| | | |
| | | var editInputPasswordFrameLayout = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(677) - 2, |
| | | Height = Application.GetRealHeight(69) - 2, |
| | | X = 1, |
| | | Y = 1, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite, |
| | | }; |
| | | doorDialog.dialogMidFraFrameLayout.AddChidren(editInputPasswordFrameLayout); |
| | | |
| | | var editInputPassword = new EditText() |
| | | { |
| | | Width = Application.GetRealWidth(672), |
| | | Height = Application.GetRealHeight(63), |
| | | X = Application.GetRealWidth(3), |
| | | Y = Application.GetRealHeight(3), |
| | | TextSize = 14, |
| | | X = Application.GetRealHeight(25), |
| | | TextSize = 13, |
| | | PlaceholderTextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | PlaceholderText = Language.StringByID(R.MyInternationalizationString.InputUnlockPasswrd), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | doorDialog.dialogMidFraFrameLayout.AddChidren(editInputPassword); |
| | | editInputPasswordFrameLayout.AddChidren(editInputPassword); |
| | | |
| | | doorDialog.dialogBtnCancel.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | |
| | | /// <summary> |
| | | /// 弹窗取消按键 |
| | | /// </summary> |
| | | public Button dialogLine = new Button |
| | | { |
| | | Height = 1, |
| | | Y = Application.GetRealHeight(380), |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine, |
| | | }; |
| | | |
| | | /// <summary> |
| | | /// 弹窗取消按键 |
| | | /// </summary> |
| | | public Button dialogBtnCancel = new Button |
| | | { |
| | | Width = Application.GetRealWidth(397), |
| | | Height = Application.GetRealHeight(127), |
| | | Y = Application.GetRealHeight(380), |
| | | TextID = R.MyInternationalizationString.Cancel, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout, |
| | | TextSize = 14, |
| | | }; |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public Button dialogBtnConfirm = new Button |
| | | { |
| | | Width = Application.GetRealWidth(398), |
| | | Height = Application.GetRealHeight(128), |
| | | X = Application.GetRealWidth(397), |
| | | Y = Application.GetRealHeight(380), |
| | | TextID = R.MyInternationalizationString.confrim, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMWhite, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextSize = 14, |
| | | }; |
| | | |
| | | /// <summary> |
| | |
| | | Y = Application.GetRealHeight(691 - 184), |
| | | X = Application.GetRealWidth(144), |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite, |
| | | Radius = 6, |
| | | }; |
| | | flMain.AddChidren(dialogFrameLayout); |
| | | |
| | |
| | | Y = Application.GetRealHeight(69), |
| | | Text = title, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextSize = 16, |
| | | }; |
| | | dialogFrameLayout.AddChidren(dialogTitle); |
| | | #region 底部圆角UI |
| | | var rFrameLayout0 = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(397), |
| | | Height = Application.GetRealHeight(50), |
| | | Y = Application.GetRealHeight(380) + 1, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout, |
| | | }; |
| | | |
| | | var rFrameLayout1 = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(398), |
| | | Height = Application.GetRealHeight(50), |
| | | X = Application.GetRealWidth(397), |
| | | Y = Application.GetRealHeight(380) + 1, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | }; |
| | | |
| | | var rFrameLayout2 = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealHeight(128) - 1, |
| | | X = Application.GetRealWidth(397 - 50), |
| | | Y = Application.GetRealHeight(380) + 1, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout, |
| | | }; |
| | | |
| | | var rFrameLayout3 = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealHeight(128) - 1, |
| | | X = Application.GetRealWidth(397), |
| | | Y = Application.GetRealHeight(380) + 1, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | }; |
| | | |
| | | var r1FrameLayout = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(397), |
| | | Height = Application.GetRealHeight(128) - 1, |
| | | Y = Application.GetRealHeight(380) + 1, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout, |
| | | Radius = 6, |
| | | }; |
| | | |
| | | var r2FrameLayout = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(398), |
| | | Height = Application.GetRealHeight(128) - 1, |
| | | X = Application.GetRealWidth(397), |
| | | Y = Application.GetRealHeight(380) + 1, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | Radius = 6, |
| | | }; |
| | | dialogFrameLayout.AddChidren(rFrameLayout0); |
| | | dialogFrameLayout.AddChidren(rFrameLayout1); |
| | | dialogFrameLayout.AddChidren(rFrameLayout2); |
| | | dialogFrameLayout.AddChidren(rFrameLayout3); |
| | | dialogFrameLayout.AddChidren(r1FrameLayout); |
| | | dialogFrameLayout.AddChidren(r2FrameLayout); |
| | | #endregion |
| | | dialogFrameLayout.AddChidren(dialogTitle); |
| | | dialogFrameLayout.AddChidren(dialogMidFraFrameLayout); |
| | | dialogFrameLayout.AddChidren(dialogBtnConfirm); |
| | | dialogFrameLayout.AddChidren(dialogBtnCancel); |
| | | dialogFrameLayout.AddChidren(dialogLine); |
| | | r2FrameLayout.AddChidren(dialogBtnConfirm); |
| | | r1FrameLayout.AddChidren(dialogBtnCancel); |
| | | } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | private CommonDevice deviceObj = null; |
| | | Action action; |
| | | Action actionNone; |
| | | string modifyDeviceName = ""; |
| | | bool IsModifyName = true; |
| | | public Action<string> devicNameAction; |
| | |
| | | { |
| | | if (currentIndex == 3) |
| | | { |
| | | if (!UserCenterResourse.Option.DoorUnLockByRemote) |
| | | action = async () => |
| | | { |
| | | SecurityRequest(doorLock, action); |
| | | } |
| | | else |
| | | var temporaryPassword = new Shared.Phone.UserCenter.DoorLock.TemporaryPassword(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(temporaryPassword); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | temporaryPassword.Show(); |
| | | }; |
| | | actionNone = async () => |
| | | { |
| | | action = async () => |
| | | { |
| | | var temporaryPassword = new Shared.Phone.UserCenter.DoorLock.TemporaryPassword(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(temporaryPassword); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | temporaryPassword.Show(); |
| | | }; |
| | | HdlCheckLogic.Current.CheckSecondarySecurity(action); |
| | | } |
| | | Shared.Phone.UserCenter.DoorLock.DoorLockCommonLayout.SecurityRequest(doorLock, action); |
| | | }; |
| | | HdlCheckLogic.Current.CheckSecondarySecurity(action, actionNone); |
| | | } |
| | | else if (currentIndex == 4) |
| | | { |
| | |
| | | { |
| | | }; |
| | | this.midFrameLayout.AddChidren(bodyView); |
| | | MidRefresh(); |
| | | |
| | | bodyView.BeginHeaderRefreshingAction += () => |
| | | { |
| | | bodyView.BeginHeaderRefreshing(); |
| | | ReadDoorLockUserInfo(); |
| | | bodyView.EndHeaderRefreshing(); |
| | | }; |
| | | MidRefresh(); |
| | | } |
| | | |
| | | public async void MidRefresh() |
| | |
| | | btnAddFrameLayout.Width = Application.GetRealWidth(72); |
| | | } |
| | | |
| | | MidFrameLayoutContent(); |
| | | if (doorLock.IsFailedToGetDoorLockInfo[curAccountObj.SubAccountDistributedMark] == true) |
| | | { |
| | | CommonPage.Loading.Start("Loading..."); |
| | |
| | | } |
| | | else |
| | | { |
| | | MidFrameLayoutContent(); |
| | | RefreshList(); |
| | | } |
| | | } |
| | |
| | | { |
| | | System.Threading.Tasks.Task.Run(async () => |
| | | { |
| | | //Application.RunOnMainThread(() => {; }); |
| | | try |
| | | { |
| | | var localAccountListTemp = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.LocalAccountList(); |
| | |
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | //下一步
|
| | | var btnNext = new BottomClickButton();
|
| | | btnNext.TextID = R.MyInternationalizationString.uNextway;
|
| | | bodyFrameLayout.AddChidren(btnNext);
|
| | | btnNext.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //如果不是热点模式
|
| | | if (HdlWifiLogic.Current.IsGatewayHotspot == false)
|
| | | {
|
| | | //选择hdlZigbeeGW-xxxx网络
|
| | | this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseSelectGatewayXXNet));
|
| | | return;
|
| | | }
|
| | | var errorMsg = HdlWifiLogic.Current.StartApTcpConnection();
|
| | | if (errorMsg != null)
|
| | | {
|
| | | //拥有错误
|
| | | this.ShowMassage(ShowMsgType.Error, errorMsg);
|
| | | return;
|
| | | }
|
| | | var form = new WirelessApSelectNetworkForm();
|
| | | this.AddFromAndRemoveNowForm(form);
|
| | | };
|
| | | //如果不是网关热点
|
| | | if (HdlWifiLogic.Current.IsGatewayHotspot == false)
|
| | | {
|
| | | btnNext.Visible = false;
|
| | | }
|
| | |
|
| | | //图片
|
| | | var framePic = new FrameLayout();
|
| | | framePic.Width = Application.GetMinRealAverage(852);
|
| | |
| | | btnSettion.Text = Language.StringByID(R.MyInternationalizationString.uGotoSettion);
|
| | | btnSettion.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | HdlWifiLogic.Current.OpenAppWifiSettion();
|
| | | btnNext.Visible = true;
|
| | | };
|
| | | bodyFrameLayout.AddChidren(btnSettion);
|
| | | //底线
|
| | |
| | | {
|
| | | var form = new DeviceDirection.DeviceDirectionHelpForm();
|
| | | form.AddForm("WirelessUdp");
|
| | | };
|
| | |
|
| | | //下一步
|
| | | var btnNext = new BottomClickButton();
|
| | | btnNext.TextID = R.MyInternationalizationString.uNextway;
|
| | | bodyFrameLayout.AddChidren(btnNext);
|
| | | btnNext.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new WirelessApSelectNetworkForm();
|
| | | this.AddFromAndRemoveNowForm(form);
|
| | | };
|
| | | }
|
| | |
|
| | |
| | | /// </summary>
|
| | | public class WirelessApDirection3Form : EditorCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 初始化_____________________________
|
| | |
|
| | | /// <summary>
|
| | |
| | | bodyFrameLayout.AddChidren(btnNext);
|
| | | btnNext.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //如果还是热点模式
|
| | | if (HdlWifiLogic.Current.IsGatewayHotspot == true)
|
| | | {
|
| | | //请链接家庭Wifi
|
| | | this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseLinkHomeWifi));
|
| | | return;
|
| | | }
|
| | | var form = new WirelessApSearchForm();
|
| | | this.AddFromAndRemoveNowForm(form);
|
| | | };
|
| | | btnNext.Visible = false;
|
| | |
|
| | | //图片
|
| | | var framePic = new FrameLayout();
|
| | |
| | | btnSettion.Text = Language.StringByID(R.MyInternationalizationString.uGotoSettion);
|
| | | btnSettion.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | HdlWifiLogic.Current.OpenAppWifiSettion();
|
| | | btnNext.Visible = true;
|
| | | };
|
| | | bodyFrameLayout.AddChidren(btnSettion);
|
| | | //底线
|
| | |
| | | //计时时间
|
| | | int timeCount = 0;
|
| | | //超时时间
|
| | | int timeOut = 120;
|
| | | int timeOut = 240;
|
| | | while (btnGwImage.Parent != null)
|
| | | {
|
| | | timeCount++;
|
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Security.Cryptography;
|
| | | using System.Text;
|
| | |
|
| | | namespace Shared.Phone.UserCenter.GatewayAdd
|
| | |
| | | frameBack.AddChidren(btnTitle);
|
| | |
|
| | | //WIFI
|
| | | var rowWifi = new FrameCaptionInputControl("WiFi", HdlWifiLogic.Current.SSID);
|
| | | var rowWifi = new FrameCaptionInputControl("WiFi", "");
|
| | | rowWifi.Y = Application.GetRealHeight(124);
|
| | | frameBack.AddChidren(rowWifi);
|
| | | rowWifi.InitControl();
|
| | |
| | | btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uPleaseInputWifiPassword);
|
| | | return;
|
| | | }
|
| | | //发送密码
|
| | | var result = HdlWifiLogic.Current.SendApHomeWifiPassword(rowWifi.Text, btnPsw.Text);
|
| | | if (result == false)
|
| | | {
|
| | | //密码发送失败
|
| | | this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uSendPasswordFail));
|
| | | return;
|
| | | }
|
| | |
|
| | | var form = new WirelessApDirection3Form();
|
| | | this.AddFromAndRemoveNowForm(form);
|
| | | };
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 界面关闭___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 界面关闭
|
| | | /// </summary>
|
| | | public override void CloseFormBefore()
|
| | | {
|
| | | //关闭Tcp链接
|
| | | HdlWifiLogic.Current.CloseApTcpConnection();
|
| | |
|
| | | base.CloseFormBefore();
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|
| | |
| | | //打开进度条
|
| | | this.ShowProgressBar();
|
| | | var ssid = HdlWifiLogic.Current.SSID;
|
| | | if (ssid == null)
|
| | | {
|
| | | //关闭进度条
|
| | | this.CloseProgressBar(ShowReLoadMode.YES);
|
| | | return;
|
| | | }
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | | if (ssid == null)
|
| | | {
|
| | | //获取网络SSID失败
|
| | | string msg = Language.StringByID(R.MyInternationalizationString.uGetSsidFail);
|
| | | this.ShowMassage(ShowMsgType.Error, msg);
|
| | | return;
|
| | | }
|
| | |
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //初始化中部信息
|
| | |
| | | frameAdd.AddChidren(btnAdd, ChidrenBindMode.BindEventOnly);
|
| | | frameAdd.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //关闭自身
|
| | | this.CloseForm();
|
| | | //关闭列表界面
|
| | | this.CloseFormByFormName("WiredGatewayListForm");
|
| | | //让它退到菜单选择界面
|
| | | UserCenterLogic.CloseAllOpenForm("NewGateWayMenuSelectForm");
|
| | | };
|
| | |
|
| | | //返回主页
|
| | |
| | | bodyFrameLayout.AddChidren(btnGoback);
|
| | | btnGoback.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //关闭自身
|
| | | this.CloseForm();
|
| | | //关闭列表界面
|
| | | this.CloseFormByFormName("WiredGatewayListForm");
|
| | | //关闭菜单选择界面
|
| | | this.CloseFormByFormName("NewGateWayMenuSelectForm");
|
| | | //让它退到主页
|
| | | UserCenterLogic.CloseAllOpenForm();
|
| | | };
|
| | | }
|
| | |
|
| | |
| | | bodyFrameLayout.AddChidren(frame);
|
| | |
|
| | | //用户图标
|
| | | var btnUserIcon = new PicViewControl(207, 207);
|
| | | string iconPath = System.IO.Path.Combine(UserCenterResourse.Option.UserPictruePath, memberResult.DistributedMark + ".png");
|
| | | var btnUserIcon = new ImageView();
|
| | | btnUserIcon.Height = Application.GetMinRealAverage(207);
|
| | | btnUserIcon.Width = Application.GetMinRealAverage(207);
|
| | | btnUserIcon.Y = Application.GetRealHeight(104);
|
| | | btnUserIcon.Gravity = Gravity.CenterHorizontal;
|
| | | btnUserIcon.UnSelectedImagePath = "Center/Admin.png";
|
| | | if (System.IO.File.Exists(iconPath) == true)
|
| | | {
|
| | | btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(iconPath);
|
| | | }
|
| | | else
|
| | | {
|
| | | btnUserIcon.ImagePath = "Center/Admin.png";
|
| | | }
|
| | | frame.AddChidren(btnUserIcon);
|
| | |
|
| | | //昵称
|
| | |
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | //房间图片
|
| | | var framePic = new FrameLayout();
|
| | | framePic.Y = Application.GetRealHeight(60);
|
| | | framePic.Width = Application.GetMinRealAverage(887);
|
| | | framePic.Height = Application.GetMinRealAverage(444);
|
| | | framePic.Gravity = Gravity.CenterHorizontal;
|
| | | framePic.Radius = 8;
|
| | | framePic.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
|
| | | bodyFrameLayout.AddChidren(framePic);
|
| | | var btnPic = new ImageView();
|
| | | btnPic.Y = Application.GetRealHeight(60);
|
| | | btnPic.Width = Application.GetMinRealAverage(887);
|
| | | btnPic.Height = Application.GetMinRealAverage(444);
|
| | | btnPic.Gravity = Gravity.CenterHorizontal;
|
| | | btnPic.Radius = 8;
|
| | | btnPic.ImagePath = "RoomIcon/0.JPG";
|
| | | bodyFrameLayout.AddChidren(btnPic);
|
| | | framePic.AddChidren(btnPic);
|
| | | btnPic.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | //房间图片选择
|
| | | this.RoomPictrueSelect(btnPic);
|
| | | };
|
| | | //添加阴影特效
|
| | | var btnTemp = new ButtonBase();
|
| | | btnTemp.AddBottomShadow(btnPic, true);
|
| | | btnTemp = null;
|
| | | framePic.SetViewShadow(true);
|
| | |
|
| | | this.newRoom = new Common.Room();
|
| | | newRoom.FloorId = this.floorKeys;
|
| | |
| | | string picName = $"RoomIcon_{DateTime.Now.ToString("yyyyMMddHHmmss")}.png";
|
| | | string picFullName = System.IO.Path.Combine(Common.Config.Instance.FullPath, picName);
|
| | | Shared.IO.FileUtils.WriteFileByBytes(picFullName, btnPic.ImageBytes);
|
| | | newRoom.BackgroundImage = picFullName;
|
| | | newRoom.BackgroundImage = picName;
|
| | | //备份
|
| | | Phone.UserCenter.HdlAutoBackupLogic.AddOrEditorFile(picName);
|
| | | }
|
| | |
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | //房间图片
|
| | | var framePic = new FrameLayout();
|
| | | framePic.Y = Application.GetRealHeight(60);
|
| | | framePic.Width = Application.GetMinRealAverage(887);
|
| | | framePic.Height = Application.GetMinRealAverage(444);
|
| | | framePic.Gravity = Gravity.CenterHorizontal;
|
| | | framePic.Radius = 8;
|
| | | framePic.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
|
| | | bodyFrameLayout.AddChidren(framePic);
|
| | | var btnPic = new ImageView();
|
| | | btnPic.Y = Application.GetRealHeight(60);
|
| | | btnPic.Width = Application.GetMinRealAverage(887);
|
| | | btnPic.Height = Application.GetMinRealAverage(444);
|
| | | btnPic.Gravity = Gravity.CenterHorizontal;
|
| | | btnPic.Radius = 8;
|
| | | btnPic.ImagePath = this.editorRoom.BackgroundImage;
|
| | | bodyFrameLayout.AddChidren(btnPic);
|
| | | framePic.AddChidren(btnPic);
|
| | | if (this.editorRoom.BackgroundImageType == 0)
|
| | | {
|
| | | btnPic.ImagePath = this.editorRoom.BackgroundImage;
|
| | | }
|
| | | else
|
| | | {
|
| | | btnPic.ImageBytes = Common.Global.ReadFileByHomeId(this.editorRoom.BackgroundImage);
|
| | | }
|
| | | btnPic.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | //房间图片选择
|
| | | this.RoomPictrueSelect(btnPic);
|
| | | };
|
| | | //添加阴影特效
|
| | | var btnTemp = new ButtonBase();
|
| | | btnTemp.AddBottomShadow(btnPic, true);
|
| | | btnTemp = null;
|
| | | framePic.SetViewShadow(true);
|
| | |
|
| | | //初始化桌布
|
| | | var tableContr = new InformationEditorControl();
|
| | |
| | | if (editorRoom.BackgroundImageType == 1 || editorRoom.BackgroundImageType == 2)
|
| | | {
|
| | | //删除掉原来的自定义图片
|
| | | if (System.IO.File.Exists(editorRoom.BackgroundImage) == true)
|
| | | if (Common.Global.IsExistsByHomeId(editorRoom.BackgroundImage) == true)
|
| | | {
|
| | | System.IO.File.Delete(editorRoom.BackgroundImage);
|
| | | Common.Global.DeleteFilebyHomeId(editorRoom.BackgroundImage);
|
| | | }
|
| | | //备份
|
| | | string[] MyArry = editorRoom.BackgroundImage.Split(new string[] { "/", @"\" }, StringSplitOptions.RemoveEmptyEntries);
|
| | | HdlAutoBackupLogic.DeleteFile(MyArry[MyArry.Length - 1]);
|
| | | HdlAutoBackupLogic.DeleteFile(editorRoom.BackgroundImage);
|
| | | }
|
| | | //自定义图片
|
| | | if (cloneRoom.BackgroundImageType == 1 || cloneRoom.BackgroundImageType == 2)
|
| | |
| | | string picName = $"RoomIcon_{DateTime.Now.ToString("yyyyMMddHHmmss")}.png";
|
| | | string picFullName = System.IO.Path.Combine(Common.Config.Instance.FullPath, picName);
|
| | | Shared.IO.FileUtils.WriteFileByBytes(picFullName, btnPic.ImageBytes);
|
| | | cloneRoom.BackgroundImage = picFullName;
|
| | | cloneRoom.BackgroundImage = picName;
|
| | | //备份
|
| | | HdlAutoBackupLogic.AddOrEditorFile(picName);
|
| | | }
|
| | |
| | | listView.AddChidrenFrame(frameDevice);
|
| | | frameDevice.InitControl(device);
|
| | | //添加阴影特效
|
| | | var btnTemp = new ButtonBase();
|
| | | btnTemp.AddBottomShadow(frameDevice);
|
| | | frameDevice.SetViewShadow(true);
|
| | |
|
| | | string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
|
| | | this.dicSensorStatuView[mainkeys] = frameDevice;
|
| | |
| | | frameInput.AddChidren(btnFild);
|
| | |
|
| | | //您的反馈和意见会让我们变得更好
|
| | | var txtInput = new TextInputControl(bodyFrameLayout.Width - ControlCommonResourse.XXLeft * 2, Application.GetRealHeight(470), false); |
| | | //var txtInput = new TextInputControl(bodyFrameLayout.Width - ControlCommonResourse.XXLeft * 2, Application.GetRealHeight(470), false); |
| | | var txtInput = new EditTextView();
|
| | | txtInput.Width = bodyFrameLayout.Width - ControlCommonResourse.XXLeft * 2;
|
| | | txtInput.Height = Application.GetRealHeight(470);
|
| | | txtInput.Y = Application.GetRealHeight(32);
|
| | | txtInput.TextAlignment = TextAlignment.TopLeft;
|
| | | txtInput.Gravity = Gravity.CenterHorizontal;
|
| | | txtInput.TextColor = UserCenterColor.Current.TextColor1;
|
| | | txtInput.PlaceholderTextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | txtInput.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uYouSuggestionMsg);
|
| | | frameInput.AddChidren(txtInput);
|
| | | txtInput.TextChangeEventHandler += (sender, txtvalue) =>
|
| | |
| | | var dicData = await this.GetMessageData();
|
| | | //关闭进度条
|
| | | this.CloseProgressBar(dicData == null && showReload == true ? ShowReLoadMode.YES : ShowReLoadMode.NO);
|
| | | |
| | |
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //关闭刷新特效
|
| | |
| | | var rowControl = new RowLayoutControl(frameList.rowSpace / 2);
|
| | | frameList.AddChidren(rowControl);
|
| | | rowControl.Name = frameList.ChildrenCount.ToString();
|
| | | rowControl.MainKeys = recordInfo.RegId;
|
| | | rowControl.MainKeys = recordInfo.Id;
|
| | | this.dicAllRow[frameList.Name + "-" + rowControl.Name] = rowControl;
|
| | |
|
| | | //图标(现在测试)
|
| | |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uDeleteMessageMsg);
|
| | | this.ShowMassage(ShowMsgType.Confirm, msg, async () =>
|
| | | {
|
| | | await this.DeleteMsg(recordInfo.RegId, frameList, rowControl);
|
| | | await this.DeleteMsg(recordInfo.Id, frameList, rowControl);
|
| | | });
|
| | | };
|
| | |
|
| | |
| | | if (sender != null)
|
| | | {
|
| | | //标记已读(不管它成功不成功)
|
| | | await this.SetTickIsRead(recordInfo.RegId);
|
| | | await this.SetTickIsRead(recordInfo.Id);
|
| | | }
|
| | | };
|
| | | }
|
| | |
| | | private async System.Threading.Tasks.Task<bool> SetTickIsRead(string strId)
|
| | | {
|
| | | string strUrl = "ZigbeeUsers/TickIsRead?Id=" + strId;
|
| | | var result = await Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(strUrl, null, Common.Config.Instance.Token, "GET");
|
| | | var revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResponsePack>(Encoding.UTF8.GetString(result));
|
| | | //检测是否存在错误信息
|
| | | var falge = UserCenterLogic.CheckNotEorrorMsg(revertObj, "ZigbeeUsers/TickIsRead", null, null);
|
| | | return falge;
|
| | |
|
| | | var result = await Common.CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync(strUrl, null, "GET");
|
| | | if (result == null)
|
| | | {
|
| | | return UserCenterLogic.CheckNotEorrorMsg(null, "ZigbeeUsers/TickIsRead", null, null);
|
| | | }
|
| | | //云端是不会返回东西的
|
| | | return true;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | {
|
| | | string strUrl = "ZigbeeUsers/DeletePushMessage?Id=" + strId;
|
| | |
|
| | | var result = await Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(strUrl, null, Common.Config.Instance.Token, "GET");
|
| | | var result = await Common.CommonPage.Instance.RequestHttpsZigbeeBytesResultAsync(strUrl, null, "GET");
|
| | | if (result == null)
|
| | | {
|
| | | return UserCenterLogic.CheckNotEorrorMsg(null, "ZigbeeUsers/DeletePushMessage", null, null);
|
| | | }
|
| | | var revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResponsePack>(Encoding.UTF8.GetString(result));
|
| | | //检测是否存在错误信息
|
| | | var falge = UserCenterLogic.CheckNotEorrorMsg(revertObj, "ZigbeeUsers/DeletePushMessage", null, null);
|
| | |
|
| | | if (falge == true && frameList != null)
|
| | | //云端是不会返回东西的
|
| | | if (frameList != null)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | |
| | | this.AdjustControlLocation(frameList, rowContr);
|
| | | });
|
| | | }
|
| | | return falge;
|
| | | return true;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | { |
| | | return -1; |
| | | } |
| | | //初始化管理员权限信息(里面有特殊判断了,可以直接调用) |
| | | await UserCenter.UserCenterLogic.InitAdminConnectMqttInfo(); |
| | | |
| | | var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString()); |
| | | var revertData = responseDataObj; |
| | |
| | | Config.Instance.Password = password;
|
| | | Config.Instance.MD5PWD = revertData.MD5PWD; |
| | | Config.Instance.Guid = revertData.Guid; |
| | | Config.Instance.MqttKey = revertData.MqttKey; |
| | | Config.Instance.LoginDateTime = DateTime.Now; |
| | | Config.Instance.ConnectZigbeeMqttBrokerPwd = revertData.ConnectZigbeeMqttBrokerPwd; |
| | | Config.Instance.ConnectZigbeeMqttClientId = revertData.ConnectZigbeeMqttClientId; |
| | | Config.Instance.ZigbeeMqttBrokerLoadSubDomain = revertData.ZigbeeMqttBrokerLoadSubDomain; |
| | | if (Config.Instance.AccountList.Find((obj) => obj == revertData.Account) == null) |
| | | { |
| | | Config.Instance.AccountList.Add(revertData.Account); |
| | |
| | | return config; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 账户登录成功的MqttKey |
| | | /// </summary> |
| | | public string MqttKey
|
| | | {
|
| | | get
|
| | | {
|
| | | if (Phone.UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 2
|
| | | || Phone.UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 3) |
| | | {
|
| | | return AdminMqttKey;
|
| | | }
|
| | | return MeMqttKey;
|
| | | }
|
| | | set { MeMqttKey = value; }
|
| | | } |
| | | /// <summary> |
| | | /// 当前需要连接云端ZigbeeMqttBroker的连接地址 |
| | | /// </summary> |
| | | public string ZigbeeMqttBrokerLoadSubDomain
|
| | | {
|
| | | get
|
| | | {
|
| | | if (Phone.UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 2
|
| | | || Phone.UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 3) |
| | | {
|
| | | return AdminZigbeeMqttBrokerLoadSubDomain;
|
| | | }
|
| | | return MeZigbeeMqttBrokerLoadSubDomain;
|
| | | }
|
| | | set { MeZigbeeMqttBrokerLoadSubDomain = value; }
|
| | | } |
| | | /// <summary> |
| | | /// 当前需要连接云端ZigbeeMqttBroker的连接的ClientId |
| | | /// </summary> |
| | | public string ConnectZigbeeMqttClientId
|
| | | {
|
| | | get
|
| | | {
|
| | | if (Phone.UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 2
|
| | | || Phone.UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 3) |
| | | {
|
| | | return AdminConnectZigbeeMqttClientId;
|
| | | }
|
| | | return MeConnectZigbeeMqttClientId;
|
| | | }
|
| | | set { MeConnectZigbeeMqttClientId = value; }
|
| | | } |
| | | /// <summary> |
| | | /// 当前需要连接云端ZigbeeMqttBroker的连接的密码 |
| | | /// </summary> |
| | | public string ConnectZigbeeMqttBrokerPwd
|
| | | {
|
| | | get
|
| | | {
|
| | | if (Phone.UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 2
|
| | | || Phone.UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 3) |
| | | {
|
| | | return AdminConnectZigbeeMqttBrokerPwd;
|
| | | }
|
| | | return MeConnectZigbeeMqttBrokerPwd;
|
| | | }
|
| | | set { MeConnectZigbeeMqttBrokerPwd = value; }
|
| | | }
|
| | | /// <summary> |
| | | /// 当前需要连接云端ZigbeeMqttBroker的连接的密码 |
| | | /// </summary> |
| | | public string ConnectZigbeeMqttBrokerName
|
| | | {
|
| | | get
|
| | | {
|
| | | if (Phone.UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 2
|
| | | || Phone.UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 3) |
| | | {
|
| | | return AdminConnectZigbeeMqttBrokerName;
|
| | | }
|
| | | return Config.Instance.Account;
|
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 当前需要连接云端ZigbeeMqttBroker的连接的密码 |
| | | /// </summary> |
| | | public string ConnectGuid |
| | | { |
| | | get |
| | | { |
| | | if (Phone.UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 2 |
| | | || Phone.UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 3) |
| | | { |
| | | return AdminConnectZigbeeMqttBrokerName; |
| | | } |
| | | return Config.Instance.Guid; |
| | | } |
| | | } |
| | |
|
| | | /// <summary> |
| | | /// 账户登录成功的MqttKey |
| | | /// </summary> |
| | | private string MeMqttKey = string.Empty; |
| | | /// <summary> |
| | | /// 当前需要连接云端ZigbeeMqttBroker的连接地址 |
| | | /// </summary> |
| | | private string MeZigbeeMqttBrokerLoadSubDomain = string.Empty; |
| | | /// <summary> |
| | | /// 当前需要连接云端ZigbeeMqttBroker的连接的ClientId |
| | | /// </summary> |
| | | private string MeConnectZigbeeMqttClientId = string.Empty; |
| | | /// <summary> |
| | | /// 当前需要连接云端ZigbeeMqttBroker的连接的密码 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | private string MeConnectZigbeeMqttBrokerPwd = string.Empty;
|
| | | /// <summary> |
| | | /// 账户登录成功的MqttKey(管理员身份用) |
| | | /// </summary> |
| | | public string AdminMqttKey = string.Empty; |
| | | /// <summary> |
| | | /// 当前需要连接云端ZigbeeMqttBroker的连接地址(管理员身份用) |
| | | /// </summary> |
| | | public string AdminZigbeeMqttBrokerLoadSubDomain = string.Empty; |
| | | /// <summary> |
| | | /// 当前需要连接云端ZigbeeMqttBroker的连接的ClientId(管理员身份用) |
| | | /// </summary> |
| | | public string AdminConnectZigbeeMqttClientId = string.Empty; |
| | | /// <summary>
|
| | | /// 应该是叫远程连接的名字吧
|
| | | /// </summary> |
| | | public string AdminConnectZigbeeMqttBrokerName = string.Empty; |
| | | /// <summary> |
| | | /// 当前需要连接云端ZigbeeMqttBroker的连接的密码(管理员身份用) |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public string AdminConnectZigbeeMqttBrokerPwd = string.Empty;
|
| | |
|
| | | /// <summary> |
| | | /// 服务器注册ID |
| | |
| | | /// 成员请求控制主帐号此住宅时请求基地址的LoginAccessToken的值
|
| | | /// </summary> |
| | | public string AdminRequestToken = string.Empty; |
| | | /// <summary> |
| | | /// 固件名称 |
| | | /// </summary> |
| | | //public string Name = string.Empty; |
| | | ///// <summary> |
| | | ///// 固件唯一标识 |
| | | ///// </summary> |
| | | //public string DistributedMark = string.Empty; |
| | | ///// <summary> |
| | | ///// 固件版本 |
| | | ///// </summary> |
| | | //public string FirmwareVersion = string.Empty; |
| | | ///// <summary> |
| | | ///// 固件备注 |
| | | ///// </summary> |
| | | //public string Remarks = string.Empty; |
| | | ///// <summary> |
| | | ///// 固件ID |
| | | ///// </summary> |
| | | //public string Id; |
| | | |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | /// <summary> |
| | | /// 当前帐号的Token |
| | | /// </summary> |
| | | private string Token1 = ""; |
| | | public string Token |
| | | { |
| | | get |
| | |
| | | .WithTcpServer(brokerName, 1883)
|
| | | .WithKeepAlivePeriod(TimeSpan.FromSeconds(20))
|
| | | .WithCleanSession()
|
| | | .WithCommunicationTimeout(TimeSpan.FromSeconds(4))
|
| | | //.WithCommunicationTimeout(TimeSpan.FromSeconds(10))
|
| | | .WithCredentials("", "")
|
| | | .Build();
|
| | | await localMqttClient.ConnectAsync(options, CancellationToken.None);
|
| | |
| | | { |
| | | DebugPrintLog($"远程连接断开"); |
| | | await DisConnectRemoteMqttClient("StartRemoteMqtt.DisconnectedHandler"); |
| | | await StartRemoteMqtt(); |
| | | //await StartRemoteMqtt(); |
| | | }); |
| | | } |
| | | if (RemoteMqttClient.ConnectedHandler == null) |
| | |
| | | |
| | | try |
| | | {
|
| | | var jsonData = new Dictionary<string, object> { ["RequestVersion"] = "RequestVersion", ["RequestSource"] = 0, ["LoginAccessToken"] = Config.Instance.Token, ["RequestProtocolType"] = 0 };
|
| | | var bytes = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(jsonData)); |
| | | |
| | | var result = await CommonPage.Instance.DoRequestZigbeeHttpsInterface("https://global.hdlcontrol.com/HangZhouHdlCloudApi/EmqMqtt/GetConnMqttInfo", bytes, Config.Instance.Token); |
| | | //{ |
| | | //"ResponseVersion": "RequestVersion1", |
| | | //"StateCode": "Success", |
| | | //"ErrorInfo": null, |
| | | //"ResponseData": { < !--如下信息只能使用一次,即便你连接失败!-- > |
| | | // "ConnEmqDomainPort": "tcp://developer.hdlcontrol.com:1883", |
| | | // "ConnEmqClientId": "ZigbeeClientTcp_33094de8-34ba-4e38-93c2-ac8da16d0e68_Zigbee", |
| | | // "ConnEmqUserName": "33094de8-34ba-4e38-93c2-ac8da16d0e68", |
| | | // "ConnEmqPwd": "4a265b65-d6cc-4a" |
| | | //} |
| | | //} |
| | | byte[] result = null;
|
| | | if (Config.Instance.Home.IsOthreShare == false)
|
| | | {
|
| | | //主人
|
| | | var jsonData = new Dictionary<string, object>
|
| | | {
|
| | | ["RequestVersion"] = CommonPage.RequestVersion,
|
| | | ["RequestSource"] = 0,
|
| | | ["LoginAccessToken"] = Config.Instance.Token,
|
| | | ["RequestProtocolType"] = 0
|
| | | };
|
| | | var bytes = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(jsonData));
|
| | | result = await CommonPage.Instance.DoRequestZigbeeHttpsInterface("https://global.hdlcontrol.com/HangZhouHdlCloudApi/EmqMqtt/GetConnMqttInfo", bytes, Config.Instance.Token);
|
| | | } |
| | | else
|
| | | {
|
| | | //分享的
|
| | | var jsonData = new Dictionary<string, object>
|
| | | {
|
| | | ["RequestVersion"] = CommonPage.RequestVersion,
|
| | | ["RequestSource"] = 0,
|
| | | ["LoginAccessToken"] = Config.Instance.Token,
|
| | | ["RequestProtocolType"] = 0,
|
| | | ["MainUserDistributedMark"] = Config.Instance.Home.MainUserDistributedMark,
|
| | | ["HomeId"] = Config.Instance.Home.Id
|
| | | };
|
| | | var bytes = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(jsonData));
|
| | | result = await CommonPage.Instance.DoRequestZigbeeHttpsInterface("https://global.hdlcontrol.com/HangZhouHdlCloudApi/EmqMqtt/ShareMemberConnMqttInfo", bytes, Config.Instance.Token);
|
| | | } |
| | | if (result != null) |
| | | { |
| | | var jobject = Newtonsoft.Json.Linq.JObject.Parse(Encoding.UTF8.GetString(result)); |
| | |
| | | .WithCredentials(connEmqUserName, connEmqPwd)
|
| | | .WithKeepAlivePeriod(TimeSpan.FromSeconds(20))
|
| | | .WithCleanSession()
|
| | | .WithCommunicationTimeout(TimeSpan.FromSeconds(6))
|
| | | //.WithCommunicationTimeout(TimeSpan.FromSeconds(10))
|
| | | .Build();
|
| | | await DisConnectRemoteMqttClient("StartRemoteMqtt");
|
| | | await RemoteMqttClient.ConnectAsync(options, CancellationToken.None);
|
| | |
| | | //文件流不用加密 |
| | | if (topic != "FileTransfer/SendFile") |
| | | { |
| | | topic = ZigBee.Common.SecuritySet.AesEncrypt(System.Text.Encoding.UTF8.GetBytes(topic), Password);
|
| | | topic = topic.Replace("/", "[[$-MQTT_TILT_SYMBOL_REPLACE-$]]").Replace("+", "[[$-MQTT_PLUS_SYMBOL_REPLACE-$]]"); |
| | | message = System.Text.Encoding.UTF8.GetBytes(SecuritySet.AesEncrypt(message, password)); |
| | | message = SecuritySet.AesEncryptBytes(message, password); |
| | | } |
| | | }
|
| | | if (localIsConnected) |
| | |
| | | }
|
| | | catch(Exception e)
|
| | | { |
| | | DebugPrintLog($"Local主动断开_{e.Message}");
|
| | | await DisConnectLocalMqttClient(e.Message); |
| | | await StartLocalMqtt("ReConnect");
|
| | | if (localIsConnected)
|
| | |
| | | { |
| | | try |
| | | { |
| | | var topic = e.ApplicationMessage.Topic.TrimStart('/');
|
| | | topic = topic.Replace("[[$-MQTT_TILT_SYMBOL_REPLACE-$]]", "/").Replace("[[$-MQTT_PLUS_SYMBOL_REPLACE-$]]", "+"); |
| | | var topic = e.ApplicationMessage.Topic.TrimStart('/'); |
| | | var payload = e.ApplicationMessage.Payload; |
| | | |
| | | var message = string.Empty; |
| | |
| | | { |
| | | return; |
| | | } |
| | | if (topics[2]== "NotifyGateWayInfoChagne") { |
| | | if (topics[2]== "NotifyGateWayInfoChange") { |
| | | initGateWayBaseInfomation(); |
| | | return; |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | var topic = e.ApplicationMessage.Topic;
|
| | | topic = topic.Replace("[[$-MQTT_TILT_SYMBOL_REPLACE-$]]", "/").Replace("[[$-MQTT_PLUS_SYMBOL_REPLACE-$]]", "+"); |
| | | var message = System.Text.Encoding.UTF8.GetString(e.ApplicationMessage.Payload); |
| | | var topic = e.ApplicationMessage.Topic; |
| | | string payloadString = ""; |
| | | |
| | | if (IsEncry) |
| | | { |
| | | //主题 |
| | | topic = Common.SecuritySet.AesDecrypt(System.Text.Encoding.UTF8.GetBytes(topic), Password); |
| | | //下载的字节流不需要解密 |
| | | if (topic.Split('/')[0] + "/" + topic.Split('/')[1] == topic.Split('/')[0] + "/" + "FileTransfer") |
| | | { |
| | | if (topic.Split('/')[2] != "DownloadFile") |
| | | { |
| | | message = Common.SecuritySet.AesDecrypt(e.ApplicationMessage.Payload, Password); |
| | | payloadString = System.Text.Encoding.UTF8.GetString(Common.SecuritySet.AesDecryptBytes(e.ApplicationMessage.Payload, Password)); |
| | | } |
| | | } |
| | | else if (topic == topic.Split('/')[0] + "/" + "SendAESKey_Respon") { }//回复主题是秘文,数据是明文 |
| | | else |
| | | { |
| | | message = Common.SecuritySet.AesDecrypt(e.ApplicationMessage.Payload, Password); |
| | | payloadString = System.Text.Encoding.UTF8.GetString(Common.SecuritySet.AesDecryptBytes(e.ApplicationMessage.Payload, Password)); |
| | | } |
| | | } |
| | | |
| | | #if DEBUG |
| | | DebugPrintLog($"网关返回的主题:{topic}_网关返回的负载:{message}_{System.DateTime.Now.ToString()}"); |
| | | #endif |
| | | ReceiveMessage(topic, message, e.ApplicationMessage.Payload); |
| | | else
|
| | | {
|
| | | payloadString = System.Text.Encoding.UTF8.GetString(e.ApplicationMessage.Payload);
|
| | | } |
| | | DebugPrintLog($"网关返回的主题:{topic}_网关返回的负载:{payloadString}"); |
| | | ReceiveMessage(topic, payloadString, e.ApplicationMessage.Payload); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | #if DEBUG |
| | | DebugPrintLog($"接收网关数据异常:{ex.Message}"); |
| | | #endif |
| | | } |
| | | } |
| | | |
| | |
| | | /// 确认标记全部消息为已读?
|
| | | /// </summary>
|
| | | public const int uUnTipAllMessageMsg = 15977;
|
| | | /// <summary>
|
| | | /// 通信链接失败
|
| | | /// </summary>
|
| | | public const int uCommunicationLinkFail = 15978;
|
| | | /// <summary>
|
| | | /// 获取网络SSID失败
|
| | | /// </summary>
|
| | | public const int uGetSsidFail = 15979;
|
| | | /// <summary>
|
| | | /// 密码发送失败
|
| | | /// </summary>
|
| | | public const int uSendPasswordFail = 15980;
|
| | | /// <summary>
|
| | | /// 选择hdlZigbeeGW-xxxx网络
|
| | | /// </summary>
|
| | | public const int uPleaseSelectGatewayXXNet = 15981;
|
| | | /// <summary>
|
| | | /// 请连接家庭WiFi
|
| | | /// </summary>
|
| | | public const int uPleaseLinkHomeWifi = 15982;
|
| | | /// <summary>
|
| | | /// 正在获取分享数据
|
| | | /// </summary>
|
| | | public const int uShardContentGetting = 15983;
|
| | |
|
| | | //★★★★下面这些是接口的返回信息翻译,从18000开始★★★★
|
| | | /// <summary>
|