|
@@ -4,6 +4,7 @@ using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.IO;
|
|
|
using System.Linq;
|
|
|
+using System.Net;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Windows;
|
|
@@ -95,10 +96,19 @@ namespace AwInitilizer.Procedure.FirmwareBundleUpload
|
|
|
|
|
|
private async Task<bool> UploadWithFtp()
|
|
|
{
|
|
|
- var updateList = UpdateData.FirmwareUpdateModels;
|
|
|
+ var updateList = UpdateData.FirmwareUpdateModels;
|
|
|
+ var ipAddress = "";
|
|
|
+ if (!string.IsNullOrEmpty(UpdateData.IpAddress))
|
|
|
+ {
|
|
|
+ ipAddress = UpdateData.IpAddress;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ipAddress = ServerIpAddress;
|
|
|
+ }
|
|
|
|
|
|
//FtpClient client = new FtpClient(ServerIpAddress, "root", "y42j/4cj84");
|
|
|
- FtpClient client = new FtpClient(ServerIpAddress, "vern", "vern@delta");
|
|
|
+ FtpClient client = new FtpClient(ipAddress, "vern", "vern@delta");
|
|
|
try
|
|
|
{
|
|
|
var profile = await client.AutoConnectAsync();
|