From 404cdc88627f942df7944af04ee05b9d527752d6 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 30 九月 2019 13:22:40 +0800 Subject: [PATCH] 合并了徐梅的按键面板绑定 --- ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedMainForm.cs | 595 ++++++++++++++++++++++++++++++----------------------------- 1 files changed, 301 insertions(+), 294 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedMainForm.cs index ae6cfbb..39b1f8c 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedMainForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedMainForm.cs @@ -9,7 +9,7 @@ /// <summary> /// 鏌ョ湅宸查厤缃叡浜唴瀹圭殑涓荤晫闈� /// </summary> - public class SearchConfigureSharedMainForm : UserCenterCommonForm + public class SearchConfigureSharedMainForm : EditorCommonForm { #region 鈻� 鍙橀噺澹版槑___________________________ @@ -35,7 +35,7 @@ private Common.Room room = null; /// <summary> /// Tab鐨勯�夋嫨銆�1锛氬姛鑳絋ab 2锛氬満鏅疶ab - /// </summary> + /// </summary> private int TabSelectIndex = 1; #endregion @@ -43,327 +43,334 @@ /// <summary> /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) - /// </summary> - /// <param name="i_room">鎴块棿淇℃伅</param> - /// <param name="i_memberResult">鎴愬憳淇℃伅</param> - /// <param name="i_memberShardInfo">鎴愬憳鐨勫垎浜暟鎹�</param> - public void ShowForm(Common.Room i_room, MemberInfoRes i_memberResult, MemberShardInfoData i_memberShardInfo) - { - this.memberResult = i_memberResult; - this.room = i_room; - this.memberShardInfo = i_memberShardInfo; - - //璁剧疆澶撮儴淇℃伅 - base.SetTitleText(i_room.Name); - - //鍒濆鍖栦腑閮ㄤ俊鎭� - this.InitMiddleFrame(); - } - - /// <summary> - /// 鍒濆鍖栦腑閮ㄤ俊鎭� - /// </summary> - private void InitMiddleFrame() - { - bodyFrameLayout.RemoveAll(); + /// </summary> + /// <param name="i_room">鎴块棿淇℃伅</param> + /// <param name="i_memberResult">鎴愬憳淇℃伅</param> + /// <param name="i_memberShardInfo">鎴愬憳鐨勫垎浜暟鎹�</param> + public void ShowForm(Common.Room i_room, MemberInfoRes i_memberResult, MemberShardInfoData i_memberShardInfo) + { + this.memberResult = i_memberResult; + this.room = i_room; + this.memberShardInfo = i_memberShardInfo; - //鍒濆鍖朤ab鎺т欢 - var frame = this.InitTabControl(); + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(i_room.Name); - this.listDeviceView = new VerticalScrolViewLayout(); - listDeviceView.Y = frame.Bottom; - listDeviceView.Height = bodyFrameLayout.Height - frame.Bottom; - listDeviceView.Visible = this.TabSelectIndex == 1; - bodyFrameLayout.AddChidren(listDeviceView); - - this.listSceneView = new VerticalScrolViewLayout(); - listSceneView.Y = frame.Bottom; - listSceneView.Height = bodyFrameLayout.Height - frame.Bottom; - listSceneView.Visible = this.TabSelectIndex == 2; - bodyFrameLayout.AddChidren(listSceneView); - - new System.Threading.Thread(() => - { - //鍒濆鍖栧姛鑳絋ab鍒楄〃 - this.InitFunctionTabList(); - //鍒濆鍖栧満鏅疶ab鍒楄〃 - this.InitSceneTabList(); - }) - { IsBackground = true }.Start(); + //鍒濆鍖栦腑閮ㄤ俊鎭� + //this.InitMiddleFrame(); } + + ///// <summary> + ///// 鍒濆鍖栦腑閮ㄤ俊鎭� + ///// </summary> + //private void InitMiddleFrame() + //{ + // //娓呯┖bodyFrame + // this.ClearBodyFrame(); + + // //鍒濆鍖朤ab鎺т欢 + // var frame = this.InitTabControl(); + + // this.listDeviceView = new VerticalScrolViewLayout(); + // listDeviceView.Y = frame.Bottom; + // listDeviceView.Height = bodyFrameLayout.Height - frame.Bottom; + // listDeviceView.Visible = this.TabSelectIndex == 1; + // bodyFrameLayout.AddChidren(listDeviceView); + + // this.listSceneView = new VerticalScrolViewLayout(); + // listSceneView.Y = frame.Bottom; + // listSceneView.Height = bodyFrameLayout.Height - frame.Bottom; + // listSceneView.Visible = this.TabSelectIndex == 2; + // bodyFrameLayout.AddChidren(listSceneView); + + // new System.Threading.Thread(() => + // { + // //鍒濆鍖栧姛鑳絋ab鍒楄〃 + // this.InitFunctionTabList(); + // //鍒濆鍖栧満鏅疶ab鍒楄〃 + // this.InitSceneTabList(); + // }) + // { IsBackground = true }.Start(); + //} #endregion - #region 鈻� 鍒濆鍖朤ab鎺т欢______________________ + //#region 鈻� 鍒濆鍖朤ab鎺т欢______________________ - /// <summary> - /// 鍒濆鍖朤ab鎺т欢 - /// </summary> - /// <returns></returns> - private FrameLayout InitTabControl() - { - //Tab鍒囨崲鎺т欢 - var frameSwich = new FrameLayout(); - frameSwich.Height = Application.GetRealHeight(150); - frameSwich.BackgroundColor = UserCenterColor.Current.TopFrameLayout; - bodyFrameLayout.AddChidren(frameSwich); - - //鍔熻兘 - var btnFunction = new ViewNormalControl(frameSwich.Width / 2, Application.GetRealHeight(100)); - btnFunction.Gravity = Gravity.CenterVertical; - btnFunction.TextID = R.MyInternationalizationString.Function; - btnFunction.TextAlignment = TextAlignment.Center; - btnFunction.TextColor = UserCenterColor.Current.SelectTextColor; - btnFunction.TextAlignment = TextAlignment.Center; - frameSwich.AddChidren(btnFunction); - - //鍦烘櫙 - var btnScene = new ViewNormalControl(frameSwich.Width / 2, Application.GetRealHeight(100)); - btnScene.Gravity = Gravity.CenterVertical; - btnScene.X = frameSwich.Width / 2; - btnScene.TextID = R.MyInternationalizationString.uScence; - btnScene.TextAlignment = TextAlignment.Center; - frameSwich.AddChidren(btnScene); - - //绾� - var btnLine = new ProgressLine(); - btnLine.Gravity = Gravity.BottomLeft; - frameSwich.AddChidren(btnLine); - btnLine.SetValue(50, true); - - if (this.TabSelectIndex == 2) - { - btnScene.TextColor = UserCenterColor.Current.SelectTextColor; - btnFunction.TextColor = Common.ZigbeeColor.Current.TextColor; - btnLine.SetValue(50, false); - } - - //鍔熻兘Tab - btnFunction.MouseUpEventHandler += (sender, e) => - { - if (this.TabSelectIndex == 1) - { - return; - } - btnScene.TextColor = Common.ZigbeeColor.Current.TextColor; - btnFunction.TextColor = UserCenterColor.Current.SelectTextColor; - btnLine.SetValue(50); - this.TabSelectIndex = 1; + ///// <summary> + ///// 鍒濆鍖朤ab鎺т欢 + ///// </summary> + ///// <returns></returns> + //private FrameLayout InitTabControl() + //{ + // //Tab鍒囨崲鎺т欢 + // var frameSwich = new FrameLayout(); + // frameSwich.Height = Application.GetRealHeight(150); + // frameSwich.BackgroundColor = UserCenterColor.Current.TopFrameLayout; + // bodyFrameLayout.AddChidren(frameSwich); - //闅愯棌鍦烘櫙鍒楄〃鎺т欢,鏄剧ず璁惧鍒楄〃鎺т欢 - this.listSceneView.Visible = false; - this.listDeviceView.Visible = true; - }; - - //鍦烘櫙Tab - btnScene.MouseUpEventHandler += (sender, e) => - { - if (this.TabSelectIndex == 2) - { - return; - } - btnScene.TextColor = UserCenterColor.Current.SelectTextColor; - btnFunction.TextColor = Common.ZigbeeColor.Current.TextColor; - btnLine.SetValue(50, false); - this.TabSelectIndex = 2; + // //鍔熻兘 + // var btnFunction = new NormalViewControl(frameSwich.Width / 2, Application.GetRealHeight(100)); + // btnFunction.Gravity = Gravity.CenterVertical; + // btnFunction.TextID = R.MyInternationalizationString.Function; + // btnFunction.TextAlignment = TextAlignment.Center; + // btnFunction.TextColor = UserCenterColor.Current.SelectTextColor; + // btnFunction.TextAlignment = TextAlignment.Center; + // frameSwich.AddChidren(btnFunction); - //闅愯棌璁惧鍒楄〃鎺т欢,鏄剧ず鍦烘櫙鍒楄〃鎺т欢 - this.listDeviceView.Visible = false; - this.listSceneView.Visible = true; - }; + // //鍦烘櫙 + // var btnScene = new NormalViewControl(frameSwich.Width / 2, Application.GetRealHeight(100)); + // btnScene.Gravity = Gravity.CenterVertical; + // btnScene.X = frameSwich.Width / 2; + // btnScene.TextID = R.MyInternationalizationString.uScence; + // btnScene.TextAlignment = TextAlignment.Center; + // frameSwich.AddChidren(btnScene); - return frameSwich; - } + // //绾� + // var btnLine = new ProgressLine(); + // btnLine.Gravity = Gravity.BottomLeft; + // frameSwich.AddChidren(btnLine); + // btnLine.SetValue(50, true); - #endregion + // if (this.TabSelectIndex == 2) + // { + // btnScene.TextColor = UserCenterColor.Current.SelectTextColor; + // btnFunction.TextColor = Common.ZigbeeColor.Current.TextColor; + // btnLine.SetValue(50, false); + // } - #region 鈻� 鏄剧ず鍔熻兘Tab鍒楄〃____________________ + // //鍔熻兘Tab + // btnFunction.MouseUpEventHandler += (sender, e) => + // { + // if (this.TabSelectIndex == 1) + // { + // return; + // } + // btnScene.TextColor = Common.ZigbeeColor.Current.TextColor; + // btnFunction.TextColor = UserCenterColor.Current.SelectTextColor; + // btnLine.SetValue(50); + // this.TabSelectIndex = 1; - /// <summary> - /// 鍒濆鍖栧姛鑳絋ab鍒楄〃 - /// </summary> - private void InitFunctionTabList() - { - //鑾峰彇鍒嗕韩鐨勮澶� - var listDevice = this.GetShardListDevice(); + // //闅愯棌鍦烘櫙鍒楄〃鎺т欢,鏄剧ず璁惧鍒楄〃鎺т欢 + // this.listSceneView.Visible = false; + // this.listDeviceView.Visible = true; + // }; - foreach (var device in listDevice) - { - Application.RunOnMainThread(() => - { - //娣诲姞璁惧鐨勬槑缁嗚 - this.AddDeviceDetailRow(device); - }); - } - } + // //鍦烘櫙Tab + // btnScene.MouseUpEventHandler += (sender, e) => + // { + // if (this.TabSelectIndex == 2) + // { + // return; + // } + // btnScene.TextColor = UserCenterColor.Current.SelectTextColor; + // btnFunction.TextColor = Common.ZigbeeColor.Current.TextColor; + // btnLine.SetValue(50, false); + // this.TabSelectIndex = 2; - /// <summary> - /// 娣诲姞璁惧鐨勬槑缁嗚 - /// </summary> - /// <param name="device">璁惧瀵硅薄</param> - private void AddDeviceDetailRow(CommonDevice device) - { - var row = new StatuRowLayout(listDeviceView); + // //闅愯棌璁惧鍒楄〃鎺т欢,鏄剧ず鍦烘櫙鍒楄〃鎺т欢 + // this.listDeviceView.Visible = false; + // this.listSceneView.Visible = true; + // }; - //鍥剧墖 - var btnIcon = new RowLeftIconView(); - Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, device); - row.AddChidren(btnIcon, ChidrenBindMode.NotBind); + // return frameSwich; + //} - //璁惧绫诲瀷鐨勭炕璇戝悕瀛� - var btnName = new RowCenterView(); - btnName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device); - row.AddChidren(btnName, ChidrenBindMode.NotBind); - - //绉婚櫎 - var btnDelete = new RowDeleteButton(); - btnDelete.TextID = R.MyInternationalizationString.RemoveBotton; - row.AddRightView(btnDelete); - btnDelete.MouseUpEventHandler += (sender, e) => - { - //纭畾绉婚櫎閫変腑鐨勮澶囷紵 - string msg = Language.StringByID(R.MyInternationalizationString.uConfirmRemoveSelectDeviceMsg); - this.ShowConfirmMsg(msg, "DeleteShardDevice", row, device); - }; - } + //#endregion - /// <summary> - /// 鍒犻櫎鍏变韩璁惧 - /// </summary> - /// <param name="row"></param> - /// <param name="device"></param> - public async void DeleteShardDevice(StatuRowLayout row, CommonDevice device) - { - var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, this.room, new List<CommonDevice>() { device }, new List<Common.SceneUI>()); - if (result == true) - { - Application.RunOnMainThread(() => - { - row.RemoveFromParent(); - if (this.listDeviceView.ChildrenCount == 0 && this.listSceneView.ChildrenCount == 0) - { - //浠�涔堥兘娌℃湁浜�,鍒欏叧闂晫闈� - this.CloseForm(); - } - }); - } - } + //#region 鈻� 鏄剧ず鍔熻兘Tab鍒楄〃____________________ - #endregion + ///// <summary> + ///// 鍒濆鍖栧姛鑳絋ab鍒楄〃 + ///// </summary> + //private void InitFunctionTabList() + //{ + // //鑾峰彇鍒嗕韩鐨勮澶� + // var listDevice = this.GetShardListDevice(); - #region 鈻� 鏄剧ず鍦烘櫙Tab鍒楄〃____________________ + // foreach (var device in listDevice) + // { + // Application.RunOnMainThread(() => + // { + // if (this.Parent != null) + // { + // //娣诲姞璁惧鐨勬槑缁嗚 + // this.AddDeviceDetailRow(device); + // } + // }); + // } + //} - /// <summary> - /// 鍒濆鍖栧満鏅疶ab鍒楄〃 - /// </summary> - private void InitSceneTabList() - { - foreach (var sceneUi in this.room.SceneUIList) - { - if (sceneUi == null || memberShardInfo.dicAllMemberShard[this.room.FileName].Contains(sceneUi.FileName) == false) - { - //寮傚父锛屾垨鑰呬笉瀛樺湪,鍒欎笉鏄剧ず - continue; - } - Application.RunOnMainThread(() => - { - //娣诲姞鍦烘櫙琛� - this.AddSceneDetailRow(sceneUi); - }); - } - } + ///// <summary> + ///// 娣诲姞璁惧鐨勬槑缁嗚 + ///// </summary> + ///// <param name="device">璁惧瀵硅薄</param> + //private void AddDeviceDetailRow(CommonDevice device) + //{ + // var row = new StatuRowLayout(listDeviceView); - /// <summary> - /// 娣诲姞鍦烘櫙鐨勬槑缁嗚 - /// </summary> - /// <param name="sceneUI">鍦烘櫙瀵硅薄</param> - private void AddSceneDetailRow(Common.SceneUI sceneUI) - { - var sceneRow = new SceneViewRow(this.listSceneView, sceneUI); - - //绉婚櫎 - var btnDelete = new RowDeleteButton(); - btnDelete.TextID = R.MyInternationalizationString.RemoveBotton; - sceneRow.AddRightView(btnDelete); - btnDelete.MouseUpEventHandler += (sender, e) => - { - //纭畾绉婚櫎閫変腑鐨勫満鏅紵 - string msg = Language.StringByID(R.MyInternationalizationString.uConfirmRemoveSelectSceneMsg); - this.ShowConfirmMsg(msg, "DeleteShardScene", sceneRow, sceneUI); - }; - } + // //鍥剧墖 + // var btnIcon = new RowLeftIconView(); + // Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, device); + // row.AddChidren(btnIcon, ChidrenBindMode.NotBind); - /// <summary> - /// 鍒犻櫎鍏变韩鍦烘櫙 - /// </summary> - /// <param name="row"></param> - /// <param name="sceneUI"></param> - public async void DeleteShardScene(SceneViewRow row, Common.SceneUI sceneUI) - { - var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, this.room, new List<CommonDevice>(), new List<Common.SceneUI>() { sceneUI }); - if (result == true) - { - Application.RunOnMainThread(() => - { - row.RemoveFromParent(); - if (this.listDeviceView.ChildrenCount == 0 && this.listSceneView.ChildrenCount == 0) - { - //浠�涔堥兘娌℃湁浜�,鍒欏叧闂晫闈� - this.CloseForm(); - } - }); - } - } + // //璁惧绫诲瀷鐨勭炕璇戝悕瀛� + // var btnName = new RowCenterView(); + // btnName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device); + // row.AddChidren(btnName, ChidrenBindMode.NotBind); - #endregion + // //绉婚櫎 + // var btnDelete = new RowDeleteButton(); + // btnDelete.TextID = R.MyInternationalizationString.RemoveBotton; + // row.AddRightView(btnDelete); + // btnDelete.MouseUpEventHandler += (sender, e) => + // { + // //纭畾绉婚櫎閫変腑鐨勮澶囷紵 + // string msg = Language.StringByID(R.MyInternationalizationString.uConfirmRemoveSelectDeviceMsg); + // this.ShowConfirmMsg(msg, "DeleteShardDevice", row, device); + // }; + //} - #region 鈻� 鑾峰彇鍙互鍒嗕韩鐨勮澶嘷________________ + ///// <summary> + ///// 鍒犻櫎鍏变韩璁惧 + ///// </summary> + ///// <param name="row"></param> + ///// <param name="device"></param> + //public async void DeleteShardDevice(StatuRowLayout row, CommonDevice device) + //{ + // var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, this.room, new List<CommonDevice>() { device }, new List<Common.SceneUI>()); + // if (result == true) + // { + // Application.RunOnMainThread(() => + // { + // row?.RemoveFromParent(); + // if (this.listDeviceView != null && this.listDeviceView.ChildrenCount == 0 && this.listSceneView.ChildrenCount == 0) + // { + // //浠�涔堥兘娌℃湁浜�,鍒欏叧闂晫闈� + // this.CloseForm(); + // } + // }); + // } + //} - /// <summary> - /// 鑾峰彇鍒嗕韩鐨勮澶� - /// </summary> - /// <returns></returns> - private List<CommonDevice> GetShardListDevice() - { - //鑾峰彇杩欎釜鎴块棿閲岄潰鐨勫垎浜澶囩殑璺緞 - var listDeviceFile = new List<string>(); - foreach (var ui in this.room.DeviceUIList) - { - if (ui.CommonDevice != null && memberShardInfo.dicAllMemberShard[this.room.FileName].Contains(ui.CommonDevice.FilePath) == true) - { - listDeviceFile.Add(ui.CommonDevice.FilePath); - } - } + //#endregion - var listFile = HdlShardLogic.Current.GetLocalAllShardFile(); - var listDevice = new List<CommonDevice>(); - foreach (string file in listFile) - { - //濡傛灉涓嶆槸璁惧鏂囦欢锛屾垨鑰呰繖涓埧闂撮噷闈㈡病鏈夎繖涓澶� - if (file.StartsWith(Common.LocalDevice.deviceFirstName) == false || listDeviceFile.Contains(file) == false) - { - continue; - } - var strArry = file.Split('_'); - if (strArry.Length < 3) - { - continue; - } - //浠庡垎浜枃浠朵腑搴忓垪鍖栧洖鏉� - var deviceData = HdlShardLogic.Current.GetShardFileContent(file); - var device = ZigBee.Device.CommonDevice.CommonDeviceByByteString(strArry[1], System.Text.Encoding.UTF8.GetString(deviceData)); - if (device != null) - { - listDevice.Add(device); - } - } - return listDevice; - } + //#region 鈻� 鏄剧ず鍦烘櫙Tab鍒楄〃____________________ - #endregion + ///// <summary> + ///// 鍒濆鍖栧満鏅疶ab鍒楄〃 + ///// </summary> + //private void InitSceneTabList() + //{ + // foreach (var sceneUi in this.room.SceneUIList) + // { + // if (sceneUi == null || memberShardInfo.dicAllMemberShard[this.room.FileName].Contains(sceneUi.FileName) == false) + // { + // //寮傚父锛屾垨鑰呬笉瀛樺湪,鍒欎笉鏄剧ず + // continue; + // } + // Application.RunOnMainThread(() => + // { + // if (this.Parent != null) + // { + // //娣诲姞鍦烘櫙琛� + // this.AddSceneDetailRow(sceneUi); + // } + // }); + // } + //} - #region 鈻� 涓�鑸柟娉昣__________________________ + ///// <summary> + ///// 娣诲姞鍦烘櫙鐨勬槑缁嗚 + ///// </summary> + ///// <param name="sceneUI">鍦烘櫙瀵硅薄</param> + //private void AddSceneDetailRow(Common.SceneUI sceneUI) + //{ + // var sceneRow = new SceneViewRow(this.listSceneView, sceneUI); - #endregion + // //绉婚櫎 + // var btnDelete = new RowDeleteButton(); + // btnDelete.TextID = R.MyInternationalizationString.RemoveBotton; + // sceneRow.AddRightView(btnDelete); + // btnDelete.MouseUpEventHandler += (sender, e) => + // { + // //纭畾绉婚櫎閫変腑鐨勫満鏅紵 + // string msg = Language.StringByID(R.MyInternationalizationString.uConfirmRemoveSelectSceneMsg); + // this.ShowConfirmMsg(msg, "DeleteShardScene", sceneRow, sceneUI); + // }; + //} + + ///// <summary> + ///// 鍒犻櫎鍏变韩鍦烘櫙 + ///// </summary> + ///// <param name="row"></param> + ///// <param name="sceneUI"></param> + //public async void DeleteShardScene(SceneViewRow row, Common.SceneUI sceneUI) + //{ + // var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, this.room, new List<CommonDevice>(), new List<Common.SceneUI>() { sceneUI }); + // if (result == true) + // { + // Application.RunOnMainThread(() => + // { + // row?.RemoveFromParent(); + // if (this.listDeviceView != null && this.listDeviceView.ChildrenCount == 0 && this.listSceneView.ChildrenCount == 0) + // { + // //浠�涔堥兘娌℃湁浜�,鍒欏叧闂晫闈� + // this.CloseForm(); + // } + // }); + // } + //} + + //#endregion + + //#region 鈻� 鑾峰彇鍙互鍒嗕韩鐨勮澶嘷________________ + + ///// <summary> + ///// 鑾峰彇鍒嗕韩鐨勮澶� + ///// </summary> + ///// <returns></returns> + //private List<CommonDevice> GetShardListDevice() + //{ + // //鑾峰彇杩欎釜鎴块棿閲岄潰鐨勫垎浜澶囩殑璺緞 + // var listDeviceFile = new List<string>(); + // foreach (var ui in this.room.DeviceUIList) + // { + // if (ui.CommonDevice != null && memberShardInfo.dicAllMemberShard[this.room.FileName].Contains(ui.CommonDevice.FilePath) == true) + // { + // listDeviceFile.Add(ui.CommonDevice.FilePath); + // } + // } + + // var listFile = HdlShardLogic.Current.GetLocalAllShardFile(); + // var listDevice = new List<CommonDevice>(); + // foreach (string file in listFile) + // { + // //濡傛灉涓嶆槸璁惧鏂囦欢锛屾垨鑰呰繖涓埧闂撮噷闈㈡病鏈夎繖涓澶� + // if (file.StartsWith(Common.LocalDevice.deviceFirstName) == false || listDeviceFile.Contains(file) == false) + // { + // continue; + // } + // var strArry = file.Split('_'); + // if (strArry.Length < 3) + // { + // continue; + // } + // //浠庡垎浜枃浠朵腑搴忓垪鍖栧洖鏉� + // var deviceData = HdlShardLogic.Current.GetShardFileContent(file); + // var device = ZigBee.Device.CommonDevice.CommonDeviceByByteString(strArry[1], System.Text.Encoding.UTF8.GetString(deviceData)); + // if (device != null) + // { + // listDevice.Add(device); + // } + // } + // return listDevice; + //} + + //#endregion + + //#region 鈻� 涓�鑸柟娉昣__________________________ + + //#endregion } } -- Gitblit v1.8.0