From 72e1b4e4626315ebd4b879a68c94e7738fd0473e Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期一, 28 十月 2019 11:00:28 +0800
Subject: [PATCH] 2019-10-28-1
---
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs | 398 ++++++++++++++++++++++++--------------------------------
1 files changed, 172 insertions(+), 226 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
index e98328b..8a6a8e7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayListForm.cs
@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Text;
+using System.Threading.Tasks;
using ZigBee.Device;
namespace Shared.Phone.UserCenter.GatewayManage
@@ -10,30 +11,30 @@
/// 缃戝叧绠$悊鐨勭晫闈�
/// </summary>
public class GatewayListForm : EditorCommonForm
- {
- #region 鈻� 鍙橀噺澹版槑___________________________
-
- /// <summary>
- /// 鍒楄〃鎺т欢
- /// </summary>
- private VerticalListControl listview = null;
- /// <summary>
- /// 鐢熸垚鐨勭綉鍏崇姸鎬佹帶浠舵殏鏃跺瓨鍏ュ唴瀛樹腑
- /// </summary>
- private Dictionary<string, GatewayRowControl> dicRowContr = new Dictionary<string, GatewayRowControl>();
+ {
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+ /// <summary>
+ /// 鍒楄〃鎺т欢
+ /// </summary>
+ private VerticalListControl listview = null;
+ /// <summary>
+ /// 鐢熸垚鐨勭綉鍏崇姸鎬佹帶浠舵殏鏃跺瓨鍏ュ唴瀛樹腑
+ /// </summary>
+ private Dictionary<string, GatewayRowControl> dicRowContr = new Dictionary<string, GatewayRowControl>();
/// <summary>
/// 鍏抽棴璁惧绠$悊鐣岄潰(濡傛灉瑙i櫎缁戝畾鐨勭綉鍏虫槸褰撳墠鎵�閫夋嫨鐨勭綉鍏崇殑璇濓紝鍒欏叧闂澶囩鐞嗙晫闈�)
- /// </summary>
+ /// </summary>
private bool closeDeviceManagForm = false;
- #endregion
+ #endregion
#region 鈻� 鍒濆鍖朹____________________________
- /// <summary>
- /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
- /// </summary>
- public void ShowForm()
+ /// <summary>
+ /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+ /// </summary>
+ public void ShowForm()
{
//璁剧疆鏍囬淇℃伅
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uGatewayManagement));
@@ -41,23 +42,23 @@
//娣诲姞鍥炬爣
var btnAdd = new MostRightIconControl(69, 69);
btnAdd.UnSelectedImagePath = "Item/Add.png";
- topFrameLayout.AddChidren(btnAdd);
- btnAdd.InitControl();
- btnAdd.ButtonClickEvent += (sender, e) =>
- {
- var form = new GatewayAdd.NewGateWaySelectForm();
- form.AddForm();
- };
-
- //鍒濆鍖栦腑閮ㄦ帶浠�
- this.InitMiddleFrame();
- }
-
- /// <summary>
- /// 鍒濆鍖栦腑閮ㄦ帶浠�
- /// </summary>
- private void InitMiddleFrame()
- {
+ topFrameLayout.AddChidren(btnAdd);
+ btnAdd.InitControl();
+ btnAdd.ButtonClickEvent += (sender, e) =>
+ {
+ var form = new GatewayAdd.NewGateWayMenuSelectForm();
+ form.AddForm();
+ };
+
+ //鍒濆鍖栦腑閮ㄦ帶浠�
+ this.InitMiddleFrame();
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栦腑閮ㄦ帶浠�
+ /// </summary>
+ private void InitMiddleFrame()
+ {
//娓呯┖bodyFrame
this.ClearBodyFrame();
@@ -67,117 +68,143 @@
listview.BackgroundColor = UserCenterColor.Current.White;
bodyFrameLayout.AddChidren(listview);
- //璁惧畾涓儴淇℃伅
- this.SetMiddleFrameInfo();
- }
-
- /// <summary>
- /// 璁惧畾涓儴淇℃伅
- /// </summary>
- private void SetMiddleFrameInfo()
+ HdlThreadLogic.Current.RunMainInThread(() =>
+ {
+ //璁惧畾涓儴淇℃伅
+ this.SetMiddleFrameInfo();
+ });
+ }
+
+ /// <summary>
+ /// 璁惧畾涓儴淇℃伅
+ /// </summary>
+ private void SetMiddleFrameInfo()
{
this.dicRowContr.Clear();
this.listview.RemoveAll();
-
- //鑾峰彇鏈湴鍏ㄩ儴缃戝叧瀵硅薄
+
+ //鑾峰彇鏈湴鍏ㄩ儴缃戝叧瀵硅薄
List<ZbGateway> listway = HdlGatewayLogic.Current.GetAllLocalGateway();
if (listway.Count == 0)
{
+ //杩樻病鏈夌粦瀹氱綉鍏冲摝
+ var btnPic = new PicViewControl(683, 392);
+ btnPic.UnSelectedImagePath = "Item/NoFunction.png";
+ btnPic.Y = (int)(bodyFrameLayout.Height * 0.382) - Application.GetRealHeight(392 / 2);
+ btnPic.Gravity = Gravity.CenterHorizontal;
+ bodyFrameLayout.AddChidren(btnPic);
+
+ var btnView = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false);
+ btnView.Y = btnPic.Bottom + Application.GetRealHeight(32);
+ btnView.TextID = R.MyInternationalizationString.uHadNotBindGatewayMsg;
+ btnView.TextAlignment = TextAlignment.Center;
+ btnView.TextSize = 12;
+ btnView.TextColor = UserCenterColor.Current.TextGrayColor1;
+ bodyFrameLayout.AddChidren(btnView);
return;
}
- int count = listway.Count - 1;
for (int i = 0; i < listway.Count; i++)
{
//娣诲姞琛�
var gwId = HdlGatewayLogic.Current.GetGatewayId(listway[i]);
- this.AddRowLayout(gwId, i != count);
+ this.AddRowLayout(gwId, i != listway.Count - 1);
}
+
//璋冩暣鍒楄〃鎺т欢鐨勯珮搴�
- var realHeight = listview.ChildrenCount * listview.GetChildren(listview.ChildrenCount - 1).Height;
- realHeight += Application.GetRealHeight(23);
- if (realHeight < listview.Height)
- {
- //缂╁皬鎺т欢楂樺害
- listview.Height = realHeight;
- }
+ this.listview.AdjustRealHeight(Application.GetRealHeight(23));
//璁剧疆鎺ュ彈鍦ㄧ嚎鐘舵�佹帹閫�
this.AddGatewayOnlinePush();
//寮�鍚綉鍏冲湪绾跨洃娴嬬殑绾跨▼
- this.StartGatewayOnlieCheckThread(listway);
+ this.StartGatewayOnlieCheckThread(listway);
}
- #endregion
+ #endregion
#region 鈻� 娣诲姞缃戝叧琛宊________________________
- /// <summary>
- /// 娣诲姞琛�
- /// </summary>
- /// <param name="strWayId">String way.</param>
- /// <param name="addLine">鏄惁娣诲姞搴曠嚎</param>
- private void AddRowLayout(string strWayId, bool addLine)
+ /// <summary>
+ /// 娣诲姞琛�
+ /// </summary>
+ /// <param name="strWayId">String way.</param>
+ /// <param name="addLine">鏄惁娣诲姞搴曠嚎</param>
+ private void AddRowLayout(string strWayId, bool addLine)
{
//缃戝叧鎺т欢
- var Gateway = HdlGatewayLogic.Current.GetLocalGateway(strWayId);
- var gatewayRow = new GatewayRowControl(Gateway, listview.rowSpace / 2);
+ var gateway = HdlGatewayLogic.Current.GetLocalGateway(strWayId);
+ var gatewayRow = new GatewayRowControl(gateway, listview.rowSpace / 2);
listview.AddChidren(gatewayRow);
gatewayRow.InitControl(81);
//鍚戝彸鍥炬爣
- gatewayRow.frameTable.AddRightIconControl();
- //娣诲姞鍦ㄧ嚎鐘舵��
- gatewayRow.AddOnLineControl();
+ gatewayRow.frameTable.AddRightArrow();
if (addLine == true)
{
gatewayRow.frameTable.AddBottomLine();
}
-
- //鎻愮ず鏈夋柊鐗堟湰
+ //鎻愮ず鏂扮増鏈�
var btnNew = new InformationTipView(gatewayRow.btnIcon);
btnNew.Visible = false;
gatewayRow.frameTable.AddChidren(btnNew, ChidrenBindMode.BindEventOnly);
gatewayRow.AddTag("btnNew", btnNew);
-
- this.dicRowContr[strWayId] = gatewayRow;
-
- //璁剧疆涓�涓�夋嫨缃戝叧鐨勯粯璁ゅ��
- if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == true && gatewayRow.IsOnline == true)
+ //鍗曞嚮浜嬩欢
+ gatewayRow.frameTable.ButtonClickEvent += (sender, e) =>
{
- this.SaveGatewayIdToLocation(strWayId);
- }
-
- //缂栬緫鎸夐挳
- var btnEditor = new NormalViewControl(Application.GetRealWidth(177), gatewayRow.Height, false);
- btnEditor.BackgroundColor = UserCenterColor.Current.RowEditorButtonColor;
- btnEditor.TextAlignment = TextAlignment.Center;
- btnEditor.TextColor = UserCenterColor.Current.White;
- btnEditor.TextID = R.MyInternationalizationString.uEditor;
- gatewayRow.AddRightView(btnEditor);
- btnEditor.ButtonClickEvent += (sender, e) =>
- {
- //濡傛灉鐐瑰嚮鐨勬槸涓嶅湪绾跨殑缃戝叧锛屽垯褰撲粈涔堜簨閮芥病鏈夊彂鐢�
- if (gatewayRow.IsOnline == false)
- {
- //鎸囧畾鐨勭綉鍏充笉鍦ㄧ嚎
- this.ShowMassage(ShowMsgType.Normal, Language.StringByID(R.MyInternationalizationString.uTheGatewayIsNotOnline));
- return;
- }
- //鐐瑰嚮缂栬緫鐨勮瘽锛岀洿鎺ラ殣钘�
- btnNew.Visible = false;
-
var form = new GatewayInfoEditorForm();
- form.AddForm(Gateway);
- };
-
- //瑙i櫎缁戝畾
- var btnUnBind = new NormalViewControl(Application.GetRealWidth(177), gatewayRow.Height, false);
- btnUnBind.BackgroundColor = UserCenterColor.Current.RowDeleteButtonColor;
- btnUnBind.TextAlignment = TextAlignment.Center;
- btnUnBind.TextColor = UserCenterColor.Current.White;
- btnUnBind.TextID = R.MyInternationalizationString.uUnBinded;
- gatewayRow.AddRightView(btnUnBind);
- btnUnBind.ButtonClickEvent += (sender, e) =>
+ form.AddForm(gateway);
+ };
+
+ //鍒囨崲
+ var btnSwitch = new NormalViewControl(Application.GetRealWidth(184), gatewayRow.Height, false);
+ btnSwitch.BackgroundColor = 0xfffb744a;
+ btnSwitch.TextAlignment = TextAlignment.Center;
+ btnSwitch.TextColor = UserCenterColor.Current.White;
+ btnSwitch.TextSize = 12;
+ btnSwitch.TextID = R.MyInternationalizationString.uSwitch1;
+ if (strWayId == GatewayResourse.AppOldSelectGatewayId)
+ {
+ btnSwitch.TextID = R.MyInternationalizationString.uRefresh;
+ }
+ gatewayRow.AddRightView(btnSwitch);
+ btnSwitch.ButtonClickEvent += (sender, e) =>
+ {
+ //鏄惁鍒囨崲鍒皗0}缃戝叧?
+ string msg = string.Format(Language.StringByID(R.MyInternationalizationString.uConfirmWantToSwitchTheGateway), "[" + gatewayRow.btnName.Text + "]");
+ if (strWayId == GatewayResourse.AppOldSelectGatewayId)
+ {
+ //鏄惁閲嶆柊鍒锋柊{0}缃戝叧?
+ msg = string.Format(Language.StringByID(R.MyInternationalizationString.uConfirmWantToRefreshTheGateway), "[" + gatewayRow.btnName.Text + "]");
+ }
+ this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+ {
+ //鎵ц鍒囨崲缃戝叧鎿嶄綔
+ this.DoSwitchGateway(strWayId);
+ });
+ };
+
+ //瀹氫綅
+ var btnPosition = new NormalViewControl(Application.GetRealWidth(184), gatewayRow.Height, false);
+ btnPosition.BackgroundColor = 0xff4a4a4a;
+ btnPosition.TextAlignment = TextAlignment.Center;
+ btnPosition.TextColor = UserCenterColor.Current.White;
+ btnPosition.TextSize = 12;
+ btnPosition.TextID = R.MyInternationalizationString.uFixedPosition;
+ gatewayRow.AddRightView(btnPosition);
+ btnPosition.ButtonClickEvent += (sender, e) =>
+ {
+ //鍙戦�佸畾浣嶅懡浠�
+ HdlGatewayLogic.Current.SetFixedPositionCommand(gateway);
+ };
+
+ //鍒犻櫎
+ var btnDelete = new NormalViewControl(Application.GetRealWidth(184), gatewayRow.Height, false);
+ btnDelete.BackgroundColor = 0xfff75858;
+ btnDelete.TextAlignment = TextAlignment.Center;
+ btnDelete.TextColor = UserCenterColor.Current.White;
+ btnDelete.TextSize = 12;
+ btnDelete.TextID = R.MyInternationalizationString.uDelete;
+ gatewayRow.AddLeftView(btnDelete);
+ btnDelete.ButtonClickEvent += (sender, e) =>
{
//濡傜Щ闄ょ綉鍏筹紝璇ョ綉鍏崇粦瀹氱殑璁惧鍒楄〃{0}灏嗘竻绌猴紝纭缁х画鎵ц璇ユ搷浣滐紵
string msg = Language.StringByID(R.MyInternationalizationString.uUnBindedMsg);
@@ -189,47 +216,17 @@
{
this.DeleteGateway(strWayId, gatewayRow);
});
- };
-
- //鍗曞嚮浜嬩欢
- gatewayRow.frameTable.ButtonClickEvent += (sender, e) =>
- {
- //濡傛灉鐐瑰嚮鐨勬槸涓嶅湪绾跨殑缃戝叧锛屽垯褰撲粈涔堜簨閮芥病鏈夊彂鐢�
- if (gatewayRow.IsOnline == false)
- {
- //鎸囧畾鐨勭綉鍏充笉鍦ㄧ嚎
- this.ShowMassage(ShowMsgType.Normal, Language.StringByID(R.MyInternationalizationString.uTheGatewayIsNotOnline));
- return;
- }
- //濡傛灉瀛樺湪鏂扮増鏈�,骞朵笖鍗曞嚮浠栫殑璇�
- if (btnNew.Visible == true)
- {
- if (sender is InformationTipView || sender is IconViewControl)
- {
- //鎵撳紑缂栬緫鐣岄潰
- btnNew.Visible = false;
- var form = new GatewayInfoEditorForm();
- form.AddForm(Gateway);
- return;
- }
- }
+ };
- //鏄惁鍒囨崲鍒皗0}缃戝叧?
- string msg = string.Format(Language.StringByID(R.MyInternationalizationString.uConfirmWantToSwitchTheGateway), "[" + gatewayRow.btnName.Text + "]");
- if (strWayId == GatewayResourse.AppOldSelectGatewayId)
- {
- //鏄惁閲嶆柊鍒锋柊{0}缃戝叧?
- msg = string.Format(Language.StringByID(R.MyInternationalizationString.uConfirmWantToRefreshTheGateway), "[" + gatewayRow.btnName.Text + "]");
- }
- this.ShowMassage(ShowMsgType.Confirm, msg, () =>
- {
- //鎵ц鍒囨崲缃戝叧鎿嶄綔
- this.DoSwitchGateway(strWayId);
- });
- };
+ this.dicRowContr[strWayId] = gatewayRow;
+ //璁剧疆涓�涓�夋嫨缃戝叧鐨勯粯璁ゅ��
+ if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == true)
+ {
+ HdlGatewayLogic.Current.SaveGatewayIdToLocation(strWayId);
+ }
}
- #endregion
+ #endregion
#region 鈻� 瑙g粦缃戝叧___________________________
@@ -237,7 +234,7 @@
/// 瑙g粦缃戝叧
/// </summary>
/// <param name="strWayId"></param>
- /// <param name="row"></param>
+ /// <param name="row"></param>
private async void DeleteGateway(string strWayId, GatewayRowControl row)
{
//鍒犻櫎浜戠缃戝叧
@@ -251,7 +248,7 @@
{
//濡傛灉瑙i櫎缁戝畾鐨勭綉鍏虫槸褰撳墠鎵�閫夋嫨鐨勭綉鍏崇殑璇濓紝鍒欏叧闂澶囩鐞嗙晫闈�
this.closeDeviceManagForm = true;
- this.SaveGatewayIdToLocation(string.Empty);
+ HdlGatewayLogic.Current.SaveGatewayIdToLocation(string.Empty);
}
//绉婚櫎
@@ -270,63 +267,14 @@
/// 鎵ц鍒囨崲缃戝叧鎿嶄綔
/// </summary>
/// <param name="gatewayId"></param>
+ /// <param name="online"></param>
private async void DoSwitchGateway(string gatewayId)
{
- //鏄剧ず杩涘害鏉�
- this.ShowProgressBar();
- //鑾峰彇缃戝叧
- var gateway = HdlGatewayLogic.Current.GetLocalGateway(gatewayId);
-
- //妫�娴嬪箍鎾埌鐨勮繖涓綉鍏虫槸鍚︽嫢鏈変綇瀹匢D
- ZbGateway realWay = null;
- bool getGatewayInfo = true;
- if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, gatewayId) == true)
- {
- //閲嶆柊璁剧疆浣忓畢ID(杩欎釜搴旇鏄笉缁忚繃APP,鐩存帴鎶婄綉鍏虫仮澶嶄簡鍑哄巶璁剧疆)
- if (HdlGatewayLogic.Current.HomeIdIsEmpty(realWay.getGatewayBaseInfo.HomeId) == true)
- {
- int result2 = await HdlGatewayLogic.Current.ReBindNewGateway(realWay);
- if (result2 == 0)
- {
- //鍑虹幇鏈煡閿欒,璇风◢鍚庡啀璇�
- this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndResetAgain));
- //鍏抽棴杩涘害鏉�
- this.CloseProgressBar();
- }
- else if (result2 == -1)
- {
- //鍏抽棴杩涘害鏉�
- this.CloseProgressBar();
- return;
- }
- //閲嶆柊缁戝畾缃戝叧閲岄潰宸茬粡閲嶆柊鑾峰彇浜嗙綉鍏充俊鎭�
- getGatewayInfo = false;
- }
- }
-
- if (getGatewayInfo == true)
- {
- //鑾峰彇缃戝叧淇℃伅
- var info = await HdlGatewayLogic.Current.GetGatewayNewInfoAsync(gateway);
- if (info == null)
- {
- //鍏抽棴杩涘害鏉�
- this.CloseProgressBar();
- return;
- }
- }
-
- //鑾峰彇鍏ㄩ儴璁惧
- bool result = await Common.LocalDevice.Current.SetDeviceToMemmoryByGateway(gateway);
- //鍏抽棴杩涘害鏉�
- this.CloseProgressBar();
+ var result = await HdlGatewayLogic.Current.DoSwitchGateway(gatewayId);
if (result == false)
{
return;
}
-
- //鍒囨崲缃戝叧,淇濆瓨缂撳瓨
- this.SaveGatewayIdToLocation(gatewayId);
//濡傛灉閫夋嫨浜嗗埛鏂扮殑缃戝叧锛屽垯涓嶅叧闂鐞嗙晫闈�
this.closeDeviceManagForm = false;
@@ -345,17 +293,6 @@
}
}
- /// <summary>
- /// 淇濆瓨閫夋嫨鐨勭綉鍏矷D鍒版湰鍦�
- /// </summary>
- /// <param name="gatewayId"></param>
- private void SaveGatewayIdToLocation(string gatewayId)
- {
- GatewayResourse.AppOldSelectGatewayId = gatewayId;
- byte[] data = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(GatewayResourse.AppOldSelectGatewayId));
- Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.AppOldSelectGatewayFile, data);
- }
-
#endregion
#region 鈻� 缃戝叧鍦ㄧ嚎妫�娴媉______________________
@@ -371,15 +308,18 @@
/// <param name="listway"></param>
private void StartGatewayOnlieCheckThread(List<ZbGateway> listway)
{
- var timeValue = (DateTime.Now - oldGetOnlineTime).Milliseconds;
- if (timeValue <= 10000)
+ if (oldGetOnlineTime.Year != 1900)
{
- //鏈�灏戣闂撮殧鍗佺,鎵嶅幓閲嶆柊鑾峰彇
- return;
+ var timeValue = (DateTime.Now - oldGetOnlineTime).TotalSeconds;
+ if (timeValue < 10)
+ {
+ //鏈�灏戣闂撮殧鍗佺,鎵嶅幓閲嶆柊鑾峰彇
+ return;
+ }
}
oldGetOnlineTime = DateTime.Now;
- new System.Threading.Thread(() =>
+ HdlThreadLogic.Current.RunThread(() =>
{
System.Threading.Thread.Sleep(300);
//鍒锋柊缃戝叧鍦ㄧ嚎鐘舵��
@@ -395,14 +335,13 @@
}
//缃戝叧鏂扮増鏈娴�
this.CheckGatewayNewVersion(listway);
- })
- { IsBackground = true }.Start();
+ });
}
/// <summary>
/// 缃戝叧鍦ㄧ嚎鐘舵�佸彉鏇�
/// </summary>
- /// <param name="gateWay">缃戝叧瀵硅薄</param>
+ /// <param name="gateWay">缃戝叧瀵硅薄</param>
/// <param name="online">鍦ㄧ嚎鐘舵�佸彉鏇村悗鐨勭姸鎬�</param>
public override void GatewayOnlinePush(ZbGateway gateWay, bool online)
{
@@ -420,7 +359,7 @@
});
}
- #endregion
+ #endregion
#region 鈻� 缃戝叧鏂扮増鏈娴媉____________________
@@ -472,17 +411,17 @@
/// <summary>
/// 鐢婚潰鍏抽棴
- /// </summary>
- public override void CloseForm()
- {
- base.CloseForm();
-
- if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == true && this.closeDeviceManagForm == true)
+ /// </summary>
+ public override void CloseForm()
+ {
+ base.CloseForm();
+
+ if (this.closeDeviceManagForm == true)
{
//鍏抽棴鐣岄潰
HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
this.LoadFormMethodByName("DeviceListMainForm", "CloseForm");
- }
+ }
}
#endregion
@@ -492,10 +431,17 @@
/// <summary>
/// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
/// </summary>
- public override void FormActionAgainEvent()
+ public override int FormActionAgainEvent()
{
- //鍒濆鍖栦腑閮ㄦ帶浠�
+ //杩涘埌杩欎釜鐣岄潰,鐞嗚涓婂墠鍥炵殑缃戝叧id鏄湁鐨�,濡傛灉涓虹┖浜�,搴旇鏄綋鍓嶇殑缃戝叧琚В缁戜簡
+ if (GatewayResourse.AppOldSelectGatewayId == string.Empty)
+ {
+ //鍏抽棴璁惧鍒楄〃
+ this.closeDeviceManagForm = true;
+ }
+ //鍒濆鍖栦腑閮ㄦ帶浠�
this.InitMiddleFrame();
+ return 1;
}
#endregion
--
Gitblit v1.8.0