| | |
| | | }
|
| | |
|
| | | //保存协调器的nv分区组网信息
|
| | | bool result = this.SaveNVFile(realGateway);
|
| | | if (result == false)
|
| | | {
|
| | | //如果上传失败的话,就把它删除
|
| | | await HdlBackupLogic.Current.DeleteDbBackupData(backupClassId);
|
| | | //关闭进度条
|
| | | ProgressFormBar.Current.Close();
|
| | | return;
|
| | | }
|
| | | //bool result = this.SaveNVFile(realGateway);
|
| | | //if (result == false)
|
| | | //{
|
| | | // //如果上传失败的话,就把它删除
|
| | | // await HdlBackupLogic.Current.DeleteDbBackupData(backupClassId);
|
| | | // //关闭进度条
|
| | | // ProgressFormBar.Current.Close();
|
| | | // return;
|
| | | //}
|
| | |
|
| | | //打开协调器串口发送功能
|
| | | result = this.OpenZbMsComSend(realGateway);
|
| | | if (result == false)
|
| | | {
|
| | | //如果上传失败的话,就把它删除
|
| | | await HdlBackupLogic.Current.DeleteDbBackupData(backupClassId);
|
| | | //关闭进度条
|
| | | ProgressFormBar.Current.Close();
|
| | | return;
|
| | | }
|
| | | //result = this.OpenZbMsComSend(realGateway);
|
| | | //if (result == false)
|
| | | //{
|
| | | // //如果上传失败的话,就把它删除
|
| | | // await HdlBackupLogic.Current.DeleteDbBackupData(backupClassId);
|
| | | // //关闭进度条
|
| | | // ProgressFormBar.Current.Close();
|
| | | // return;
|
| | | //}
|
| | |
|
| | | //开始上传数据
|
| | | result = this.StartUpLoadData(realGateway, backupClassId);
|
| | | bool result = this.StartUpLoadData(realGateway, backupClassId);
|
| | | if (result == false)
|
| | | {
|
| | | //如果上传失败的话,就把它删除
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | //恢复协调器nv分区的组网信息
|
| | | result = this.RestoreGatewayNV(realGateway);
|
| | | if (result == false)
|
| | | {
|
| | | //关闭进度条
|
| | | ProgressFormBar.Current.Close();
|
| | | return false;
|
| | | }
|
| | | ////恢复协调器nv分区的组网信息
|
| | | //result = this.RestoreGatewayNV(realGateway);
|
| | | //if (result == false)
|
| | | //{
|
| | | // //关闭进度条
|
| | | // ProgressFormBar.Current.Close();
|
| | | // return false;
|
| | | //}
|
| | |
|
| | | //打开协调器串口发送功能
|
| | | result = this.OpenZbMsComSend(realGateway);
|
| | | if (result == false)
|
| | | {
|
| | | //关闭进度条
|
| | | ProgressFormBar.Current.Close();
|
| | | return false;
|
| | | }
|
| | | //result = this.OpenZbMsComSend(realGateway);
|
| | | //if (result == false)
|
| | | //{
|
| | | // //关闭进度条
|
| | | // ProgressFormBar.Current.Close();
|
| | | // return false;
|
| | | //}
|
| | |
|
| | | //重启网关系统
|
| | | result = this.GatewayReboot(realGateway);
|