|
@@ -130,7 +130,7 @@ namespace AwInitilizer
|
|
var serialNumber = systemID.ToString();
|
|
var serialNumber = systemID.ToString();
|
|
if (!SajetConnect.SajetTransSnCheck(ref serialNumber))
|
|
if (!SajetConnect.SajetTransSnCheck(ref serialNumber))
|
|
{
|
|
{
|
|
- HintDialog.ShowMessage((string)Application.Current.FindResource("SnWoMisMatch"));
|
|
|
|
|
|
+ HintDialog.ShowMessage(Resx.AppResources.SnWoMisMatch);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
@@ -179,7 +179,7 @@ namespace AwInitilizer
|
|
var serialNumber = inputSystemID.ToString();
|
|
var serialNumber = inputSystemID.ToString();
|
|
if (!SajetConnect.SajetTransSnCheck(ref serialNumber))
|
|
if (!SajetConnect.SajetTransSnCheck(ref serialNumber))
|
|
{
|
|
{
|
|
- HintDialog.ShowMessage((string)Application.Current.FindResource("SnWoMisMatch"));
|
|
|
|
|
|
+ HintDialog.ShowMessage(Resx.AppResources.SnWoMisMatch);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -230,20 +230,20 @@ namespace AwInitilizer
|
|
if (string.IsNullOrEmpty(updateData.ModelName))
|
|
if (string.IsNullOrEmpty(updateData.ModelName))
|
|
{
|
|
{
|
|
//alertMsg += "Model Name is Required\n";
|
|
//alertMsg += "Model Name is Required\n";
|
|
- alertMsg += (string)Application.Current.FindResource("ModelNameEmptyAlert") + "\n";
|
|
|
|
|
|
+ alertMsg += Resx.AppResources.ModelNameEmptyAlert + "\n";
|
|
isAvaliable = false;
|
|
isAvaliable = false;
|
|
}
|
|
}
|
|
else if (ViewModel.SettingModelName != updateData.ModelName)
|
|
else if (ViewModel.SettingModelName != updateData.ModelName)
|
|
{
|
|
{
|
|
//alertMsg += "Model Name setting is Mismathed\n";
|
|
//alertMsg += "Model Name setting is Mismathed\n";
|
|
- alertMsg += (string)Application.Current.FindResource("ModelNameMismatchAlert") + "\n";
|
|
|
|
|
|
+ alertMsg += Resx.AppResources.ModelNameMismatchAlert + "\n";
|
|
isAvaliable = false;
|
|
isAvaliable = false;
|
|
}
|
|
}
|
|
|
|
|
|
if (string.IsNullOrEmpty(updateData.SerialNumber))
|
|
if (string.IsNullOrEmpty(updateData.SerialNumber))
|
|
{
|
|
{
|
|
//alertMsg += "Serial Number is Required\n";
|
|
//alertMsg += "Serial Number is Required\n";
|
|
- alertMsg += (string)Application.Current.FindResource("SerialNumberEmptyAlert") + "\n";
|
|
|
|
|
|
+ alertMsg += Resx.AppResources.SerialNumberEmptyAlert + "\n";
|
|
isAvaliable = false;
|
|
isAvaliable = false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -257,7 +257,7 @@ namespace AwInitilizer
|
|
else
|
|
else
|
|
{
|
|
{
|
|
//alertMsg += "Model Name format Error\n";
|
|
//alertMsg += "Model Name format Error\n";
|
|
- alertMsg += (string)Application.Current.FindResource("ModelNameErrorAlert") + "\n";
|
|
|
|
|
|
+ alertMsg += Resx.AppResources.ModelNameErrorAlert + "\n";
|
|
isAvaliable = false;
|
|
isAvaliable = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -268,7 +268,7 @@ namespace AwInitilizer
|
|
if (string.IsNullOrEmpty(updateData.FourGenModuleVersion))
|
|
if (string.IsNullOrEmpty(updateData.FourGenModuleVersion))
|
|
{
|
|
{
|
|
//alertMsg += "4G Module Version is Required\n";
|
|
//alertMsg += "4G Module Version is Required\n";
|
|
- alertMsg += (string)Application.Current.FindResource("FourGenVersionEmptyAlert") + "\n";
|
|
|
|
|
|
+ alertMsg += Resx.AppResources.FourGenVersionEmptyAlert + "\n";
|
|
isAvaliable = false;
|
|
isAvaliable = false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -277,14 +277,14 @@ namespace AwInitilizer
|
|
if (string.IsNullOrEmpty(updateData.ICCID))
|
|
if (string.IsNullOrEmpty(updateData.ICCID))
|
|
{
|
|
{
|
|
//alertMsg += "ICCID is Required when sim installed\n";
|
|
//alertMsg += "ICCID is Required when sim installed\n";
|
|
- alertMsg += (string)Application.Current.FindResource("IccidEmptyAlert") + "\n";
|
|
|
|
|
|
+ alertMsg += Resx.AppResources.IccidEmptyAlert + "\n";
|
|
isAvaliable = false;
|
|
isAvaliable = false;
|
|
}
|
|
}
|
|
|
|
|
|
if (string.IsNullOrEmpty(updateData.IMSI))
|
|
if (string.IsNullOrEmpty(updateData.IMSI))
|
|
{
|
|
{
|
|
//alertMsg += "IMSI is Required when sim installed\n";
|
|
//alertMsg += "IMSI is Required when sim installed\n";
|
|
- alertMsg += (string)Application.Current.FindResource("ImsiEmptyAlert") + "\n";
|
|
|
|
|
|
+ alertMsg += Resx.AppResources.ImsiEmptyAlert + "\n";
|
|
isAvaliable = false;
|
|
isAvaliable = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -293,7 +293,7 @@ namespace AwInitilizer
|
|
if (updateData.FirmwareUpdateModels == null)
|
|
if (updateData.FirmwareUpdateModels == null)
|
|
{
|
|
{
|
|
//alertMsg += "FirmwareUpdateModels should be decalred\n";
|
|
//alertMsg += "FirmwareUpdateModels should be decalred\n";
|
|
- alertMsg += (string)Application.Current.FindResource("FirmwareListNullAlert") + "\n";
|
|
|
|
|
|
+ alertMsg += Resx.AppResources.FirmwareListNullAlert + "\n";
|
|
isAvaliable = false;
|
|
isAvaliable = false;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
@@ -303,21 +303,21 @@ namespace AwInitilizer
|
|
if (string.IsNullOrEmpty(model.Module))
|
|
if (string.IsNullOrEmpty(model.Module))
|
|
{
|
|
{
|
|
//alertMsg += "Firmware module name is Required\n";
|
|
//alertMsg += "Firmware module name is Required\n";
|
|
- alertMsg += (string)Application.Current.FindResource("FirmwareNameEmptyAlert") + "\n";
|
|
|
|
|
|
+ alertMsg += Resx.AppResources.FirmwareNameEmptyAlert + "\n";
|
|
isAvaliable = false;
|
|
isAvaliable = false;
|
|
}
|
|
}
|
|
|
|
|
|
if (string.IsNullOrEmpty(model.Version))
|
|
if (string.IsNullOrEmpty(model.Version))
|
|
{
|
|
{
|
|
//alertMsg += "Firmware module name is Required\n";
|
|
//alertMsg += "Firmware module name is Required\n";
|
|
- alertMsg += (string)Application.Current.FindResource("FirmwareVersionEmptyAlert") + "\n";
|
|
|
|
|
|
+ alertMsg += Resx.AppResources.FirmwareVersionEmptyAlert + "\n";
|
|
isAvaliable = false;
|
|
isAvaliable = false;
|
|
}
|
|
}
|
|
|
|
|
|
if (string.IsNullOrEmpty(model.FirmwareFileName))
|
|
if (string.IsNullOrEmpty(model.FirmwareFileName))
|
|
{
|
|
{
|
|
//alertMsg += "Firmware file is Required\n";
|
|
//alertMsg += "Firmware file is Required\n";
|
|
- alertMsg += (string)Application.Current.FindResource("FirmwareFileEmptyAlert") + "\n";
|
|
|
|
|
|
+ alertMsg += Resx.AppResources.FirmwareFileEmptyAlert + "\n";
|
|
isAvaliable = false;
|
|
isAvaliable = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -359,7 +359,7 @@ namespace AwInitilizer
|
|
{
|
|
{
|
|
uxProgress.Value = (procedureIndex * 100 / procedureList.Count);
|
|
uxProgress.Value = (procedureIndex * 100 / procedureList.Count);
|
|
uxProgressRate.Content = ((int)(procedureIndex * 100 / procedureList.Count)) + "%";
|
|
uxProgressRate.Content = ((int)(procedureIndex * 100 / procedureList.Count)) + "%";
|
|
- uxStatusBar.Content = string.Format((string)Application.Current.FindResource("StatusBarUpdating"), procedureList[procedureIndex].Name);// $"Processing {procedureList[procedureIndex].Name}";
|
|
|
|
|
|
+ uxStatusBar.Content = string.Format(Resx.AppResources.StatusBarUpdating, procedureList[procedureIndex].Name);// $"Processing {procedureList[procedureIndex].Name}";
|
|
|
|
|
|
var result = await procedureList[procedureIndex].DoWork();
|
|
var result = await procedureList[procedureIndex].DoWork();
|
|
|
|
|
|
@@ -391,7 +391,7 @@ namespace AwInitilizer
|
|
{
|
|
{
|
|
UpdateStatus = UpdateStatus.Fail;
|
|
UpdateStatus = UpdateStatus.Fail;
|
|
//uxStatusBar.Content = $"Process {procedureList[procedureIndex].Name} Failed";
|
|
//uxStatusBar.Content = $"Process {procedureList[procedureIndex].Name} Failed";
|
|
- uxStatusBar.Content = string.Format((string)Application.Current.FindResource("StatusBarFailed"), procedureList[procedureIndex].Name);
|
|
|
|
|
|
+ uxStatusBar.Content = string.Format(Resx.AppResources.StatusBarFailed, procedureList[procedureIndex].Name);
|
|
//report Fail
|
|
//report Fail
|
|
SajetConnect.SajetTranFinishFail(mesErrorCode);
|
|
SajetConnect.SajetTranFinishFail(mesErrorCode);
|
|
}
|
|
}
|
|
@@ -551,14 +551,14 @@ namespace AwInitilizer
|
|
catch
|
|
catch
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage("Firmware root path ERROR");
|
|
//HintDialog.ShowMessage("Firmware root path ERROR");
|
|
- HintDialog.ShowMessage((string)Application.Current.FindResource("LoadConfigRootFolderNotfoundAlert"));
|
|
|
|
|
|
+ HintDialog.ShowMessage(Resx.AppResources.LoadConfigRootFolderNotfoundAlert);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
if (!Directory.Exists(settingRootFolder))
|
|
if (!Directory.Exists(settingRootFolder))
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage("Firmware root path not exist");
|
|
//HintDialog.ShowMessage("Firmware root path not exist");
|
|
- HintDialog.ShowMessage((string)Application.Current.FindResource("LoadConfigFolderNotfoundAlert"));
|
|
|
|
|
|
+ HintDialog.ShowMessage(Resx.AppResources.LoadConfigFolderNotfoundAlert);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -566,7 +566,7 @@ namespace AwInitilizer
|
|
if (!Directory.Exists(modelDirectoy))
|
|
if (!Directory.Exists(modelDirectoy))
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage("Model firmware root path not exist");
|
|
//HintDialog.ShowMessage("Model firmware root path not exist");
|
|
- HintDialog.ShowMessage((string)Application.Current.FindResource("LoadConfigModelFolderNotfoundAlert"));
|
|
|
|
|
|
+ HintDialog.ShowMessage(Resx.AppResources.LoadConfigModelFolderNotfoundAlert);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -574,7 +574,7 @@ namespace AwInitilizer
|
|
if (!File.Exists(modelSeettingFilePath))
|
|
if (!File.Exists(modelSeettingFilePath))
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage("Model firmware setting not exist");
|
|
//HintDialog.ShowMessage("Model firmware setting not exist");
|
|
- HintDialog.ShowMessage((string)Application.Current.FindResource("LoadConfigModelInitNotfoundAlert"));
|
|
|
|
|
|
+ HintDialog.ShowMessage(Resx.AppResources.LoadConfigModelInitNotfoundAlert);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -588,7 +588,7 @@ namespace AwInitilizer
|
|
catch
|
|
catch
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage("Setting file ERROR");
|
|
//HintDialog.ShowMessage("Setting file ERROR");
|
|
- HintDialog.ShowMessage((string)Application.Current.FindResource("LoadConfigModelInitFormatErrorAlert"));
|
|
|
|
|
|
+ HintDialog.ShowMessage(Resx.AppResources.LoadConfigModelInitFormatErrorAlert);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -619,19 +619,30 @@ namespace AwInitilizer
|
|
List<ProcedureBase> procedures = new List<ProcedureBase>();
|
|
List<ProcedureBase> procedures = new List<ProcedureBase>();
|
|
|
|
|
|
//init intilize procedure list
|
|
//init intilize procedure list
|
|
|
|
+
|
|
procedures.Add(new Procedure.BasicInfoUpdate.BasicInfoUpdateProcedure());
|
|
procedures.Add(new Procedure.BasicInfoUpdate.BasicInfoUpdateProcedure());
|
|
procedures.Add(new Procedure.FourGenModuleCheck.FourGenModuleCheckProcedure());
|
|
procedures.Add(new Procedure.FourGenModuleCheck.FourGenModuleCheckProcedure());
|
|
procedures.Add(new Procedure.WifRssiCheck.WifRssiCheckProcedure());
|
|
procedures.Add(new Procedure.WifRssiCheck.WifRssiCheckProcedure());
|
|
|
|
+ procedures.Add(new Procedure.FirmwareBundleUpload.FirmwareFtpUploadProcedure());
|
|
|
|
+ procedures.Add(new Procedure.FirmwareCheckVersion.FirmwareCheckVersionProcedure());
|
|
|
|
+ procedures.Add(new Procedure.ButtonStatusCheck.ButtonStatusCheckPorcedure());
|
|
|
|
+ procedures.Add(new Procedure.RestarttoIdel.RestarttoIdelProcedure());
|
|
|
|
+ procedures.Add(new Procedure.VersionLog.VersionLogProcedure());
|
|
|
|
+
|
|
|
|
+ //procedures.Add(new Procedure.BasicInfoUpdate.BasicInfoUpdateProcedure());
|
|
|
|
+ //procedures.Add(new Procedure.FourGenModuleCheck.FourGenModuleCheckProcedure());
|
|
|
|
+ //procedures.Add(new Procedure.WifRssiCheck.WifRssiCheckProcedure());
|
|
|
|
+ //procedures.Add(new Procedure.FirmwareBundleUpload.FirmwareBundleUploadProcedure());
|
|
|
|
+ //procedures.Add(new Procedure.FirmwareCheckVersion.FirmwareCheckVersionProcedure());
|
|
|
|
+ //procedures.Add(new Procedure.ButtonStatusCheck.ButtonStatusCheckPorcedure());
|
|
|
|
+ //procedures.Add(new Procedure.RestarttoIdel.RestarttoIdelProcedure());
|
|
|
|
+ //procedures.Add(new Procedure.VersionLog.VersionLogProcedure());
|
|
|
|
+
|
|
//for (int firemwareIndex = 0; firemwareIndex < ViewModel.FirmwareUpdateModels.Count ; firemwareIndex++)
|
|
//for (int firemwareIndex = 0; firemwareIndex < ViewModel.FirmwareUpdateModels.Count ; firemwareIndex++)
|
|
//{
|
|
//{
|
|
// //procedures.Add(new FirmwareUpdateProcedure(ViewModel.FirmwareUpdateModels[firemwareIndex]));
|
|
// //procedures.Add(new FirmwareUpdateProcedure(ViewModel.FirmwareUpdateModels[firemwareIndex]));
|
|
// procedures.Add(new FirmwareUploadProcedure(ViewModel.FirmwareUpdateModels[firemwareIndex]));
|
|
// procedures.Add(new FirmwareUploadProcedure(ViewModel.FirmwareUpdateModels[firemwareIndex]));
|
|
//}
|
|
//}
|
|
- procedures.Add(new Procedure.FirmwareBundleUpload.FirmwareBundleUploadProcedure());
|
|
|
|
- procedures.Add(new Procedure.FirmwareCheckVersion.FirmwareCheckVersionProcedure());
|
|
|
|
- procedures.Add(new Procedure.ButtonStatusCheck.ButtonStatusCheckPorcedure());
|
|
|
|
- procedures.Add(new Procedure.RestarttoIdel.RestarttoIdelProcedure());
|
|
|
|
- procedures.Add(new Procedure.VersionLog.VersionLogProcedure());
|
|
|
|
|
|
|
|
ViewModel.UpdateProcedure.Clear();
|
|
ViewModel.UpdateProcedure.Clear();
|
|
|
|
|
|
@@ -652,13 +663,13 @@ namespace AwInitilizer
|
|
if (string.IsNullOrEmpty(setting.ModelName))
|
|
if (string.IsNullOrEmpty(setting.ModelName))
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage("ModelName is requred");
|
|
//HintDialog.ShowMessage("ModelName is requred");
|
|
- HintDialog.ShowMessage((string)Application.Current.FindResource("InitModelNameEmptyAlert"));
|
|
|
|
|
|
+ HintDialog.ShowMessage(Resx.AppResources.InitModelNameEmptyAlert);
|
|
isCheckPassed = false;
|
|
isCheckPassed = false;
|
|
}
|
|
}
|
|
else if (!ModelName.TryParse(setting.ModelName, out _))
|
|
else if (!ModelName.TryParse(setting.ModelName, out _))
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage("ModelName format Error");
|
|
//HintDialog.ShowMessage("ModelName format Error");
|
|
- HintDialog.ShowMessage((string)Application.Current.FindResource("InitModelNameErrorAlert"));
|
|
|
|
|
|
+ HintDialog.ShowMessage(Resx.AppResources.InitModelNameErrorAlert);
|
|
isCheckPassed = false;
|
|
isCheckPassed = false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -667,14 +678,14 @@ namespace AwInitilizer
|
|
if (string.IsNullOrEmpty(setting.ICCID))
|
|
if (string.IsNullOrEmpty(setting.ICCID))
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage("ICCID should not empty while IsSimInsert is set");
|
|
//HintDialog.ShowMessage("ICCID should not empty while IsSimInsert is set");
|
|
- HintDialog.ShowMessage((string)Application.Current.FindResource("InitIccidEmptyAlert"));
|
|
|
|
|
|
+ HintDialog.ShowMessage(Resx.AppResources.InitIccidEmptyAlert);
|
|
isCheckPassed = false;
|
|
isCheckPassed = false;
|
|
}
|
|
}
|
|
|
|
|
|
if (string.IsNullOrEmpty(setting.IMSI))
|
|
if (string.IsNullOrEmpty(setting.IMSI))
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage("IMSI should not empty while IsSimInsert is set");
|
|
//HintDialog.ShowMessage("IMSI should not empty while IsSimInsert is set");
|
|
- HintDialog.ShowMessage((string)Application.Current.FindResource("InitImsiEmptyAlert"));
|
|
|
|
|
|
+ HintDialog.ShowMessage(Resx.AppResources.InitImsiEmptyAlert);
|
|
isCheckPassed = false;
|
|
isCheckPassed = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -691,7 +702,7 @@ namespace AwInitilizer
|
|
if (!isNoduleNameVaild)
|
|
if (!isNoduleNameVaild)
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage("Firmware module name should not empty");
|
|
//HintDialog.ShowMessage("Firmware module name should not empty");
|
|
- HintDialog.ShowMessage((string)Application.Current.FindResource("InitFirmwareNameEmptyAlert"));
|
|
|
|
|
|
+ HintDialog.ShowMessage(Resx.AppResources.InitFirmwareNameEmptyAlert);
|
|
isCheckPassed = false;
|
|
isCheckPassed = false;
|
|
}
|
|
}
|
|
if (isVersionVaild || isFileNameVaild)
|
|
if (isVersionVaild || isFileNameVaild)
|
|
@@ -699,14 +710,14 @@ namespace AwInitilizer
|
|
if (!isVersionVaild)
|
|
if (!isVersionVaild)
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage($"Version should not empty while {model.Module} firmware is set");
|
|
//HintDialog.ShowMessage($"Version should not empty while {model.Module} firmware is set");
|
|
- HintDialog.ShowMessage(string.Format((string)Application.Current.FindResource("InitFirmwareVersionEmptyAlert"), model.Module));
|
|
|
|
|
|
+ HintDialog.ShowMessage(string.Format(Resx.AppResources.InitFirmwareVersionEmptyAlert, model.Module));
|
|
isCheckPassed = false;
|
|
isCheckPassed = false;
|
|
}
|
|
}
|
|
|
|
|
|
if (!isFileNameVaild)
|
|
if (!isFileNameVaild)
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage($"File name should not empty while {model.Module} version is set");
|
|
//HintDialog.ShowMessage($"File name should not empty while {model.Module} version is set");
|
|
- HintDialog.ShowMessage(string.Format((string)Application.Current.FindResource("InitFirmwareFileEmptyAlert"), model.Module));
|
|
|
|
|
|
+ HintDialog.ShowMessage(string.Format(Resx.AppResources.InitFirmwareFileEmptyAlert, model.Module));
|
|
isCheckPassed = false;
|
|
isCheckPassed = false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -717,7 +728,7 @@ namespace AwInitilizer
|
|
if (!File.Exists(filePath))
|
|
if (!File.Exists(filePath))
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage($"{model.Module} Firemware file is missing");
|
|
//HintDialog.ShowMessage($"{model.Module} Firemware file is missing");
|
|
- HintDialog.ShowMessage(string.Format((string)Application.Current.FindResource("InitFirmwareFileMissingAlert"), model.Module));
|
|
|
|
|
|
+ HintDialog.ShowMessage(string.Format(Resx.AppResources.InitFirmwareFileMissingAlert, model.Module));
|
|
isCheckPassed = false;
|
|
isCheckPassed = false;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
@@ -744,21 +755,21 @@ namespace AwInitilizer
|
|
if (modelName.ToString() != setting.ModelName)
|
|
if (modelName.ToString() != setting.ModelName)
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage($"{model.Module} Firemware and ModelName is Mismatched");
|
|
//HintDialog.ShowMessage($"{model.Module} Firemware and ModelName is Mismatched");
|
|
- HintDialog.ShowMessage(string.Format((string)Application.Current.FindResource("InitFirmwareFileHeaderMismatchAlert"), model.Module));
|
|
|
|
|
|
+ HintDialog.ShowMessage(string.Format(Resx.AppResources.InitFirmwareFileHeaderMismatchAlert, model.Module));
|
|
isCheckPassed = false;
|
|
isCheckPassed = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
// HintDialog.ShowMessage($"{model.Module} Firemware header ERROR");
|
|
// HintDialog.ShowMessage($"{model.Module} Firemware header ERROR");
|
|
- HintDialog.ShowMessage(string.Format((string)Application.Current.FindResource("InitFirmwareFileHeaderFormatAlert"), model.Module));
|
|
|
|
|
|
+ HintDialog.ShowMessage(string.Format(Resx.AppResources.InitFirmwareFileHeaderFormatAlert, model.Module));
|
|
isCheckPassed = false;
|
|
isCheckPassed = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage($"{model.Module} Firemware header ERROR");
|
|
//HintDialog.ShowMessage($"{model.Module} Firemware header ERROR");
|
|
- HintDialog.ShowMessage(string.Format((string)Application.Current.FindResource("InitFirmwareFileHeaderFormatAlert"), model.Module));
|
|
|
|
|
|
+ HintDialog.ShowMessage(string.Format(Resx.AppResources.InitFirmwareFileHeaderFormatAlert, model.Module));
|
|
isCheckPassed = false;
|
|
isCheckPassed = false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -781,7 +792,7 @@ namespace AwInitilizer
|
|
catch
|
|
catch
|
|
{
|
|
{
|
|
//HintDialog.ShowMessage($"{model.Module} Firemware header ERROR");
|
|
//HintDialog.ShowMessage($"{model.Module} Firemware header ERROR");
|
|
- HintDialog.ShowMessage(string.Format((string)Application.Current.FindResource("InitFirmwareFileHeaderFormatAlert"), model.Module));
|
|
|
|
|
|
+ HintDialog.ShowMessage(string.Format(Resx.AppResources.InitFirmwareFileHeaderFormatAlert, model.Module));
|
|
isCheckPassed = false;
|
|
isCheckPassed = false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -823,7 +834,7 @@ namespace AwInitilizer
|
|
signinDialog.ShowDialog();
|
|
signinDialog.ShowDialog();
|
|
this.Focus();
|
|
this.Focus();
|
|
|
|
|
|
- //SystemID.TryParse("DSWU601U0UD2PHD2111A001A0", out var systemID);
|
|
|
|
|
|
+ //SystemID.TryParse("DSYE122E0ED5P7D2212A011A0", out var systemID);
|
|
//SystemIDScanReseived(systemID);
|
|
//SystemIDScanReseived(systemID);
|
|
|
|
|
|
if (signinDialog.DialogResult != true)
|
|
if (signinDialog.DialogResult != true)
|
|
@@ -891,27 +902,27 @@ namespace AwInitilizer
|
|
{
|
|
{
|
|
uxStatusContainer.Background = new SolidColorBrush(Colors.White);
|
|
uxStatusContainer.Background = new SolidColorBrush(Colors.White);
|
|
uxStatus.Foreground = new SolidColorBrush(Colors.Black);
|
|
uxStatus.Foreground = new SolidColorBrush(Colors.Black);
|
|
- uxStatus.Content = (string)Application.Current.FindResource("StatusIdel");//"Idel";
|
|
|
|
|
|
+ uxStatus.Content = Resx.AppResources.StatusIdel;//"Idel";
|
|
uxStatusBar.Content = "";
|
|
uxStatusBar.Content = "";
|
|
}
|
|
}
|
|
else if (status == UpdateStatus.Updating)
|
|
else if (status == UpdateStatus.Updating)
|
|
{
|
|
{
|
|
uxStatusContainer.Background = new SolidColorBrush(Colors.SkyBlue);
|
|
uxStatusContainer.Background = new SolidColorBrush(Colors.SkyBlue);
|
|
uxStatus.Foreground = new SolidColorBrush(Colors.Black);
|
|
uxStatus.Foreground = new SolidColorBrush(Colors.Black);
|
|
- uxStatus.Content = (string)Application.Current.FindResource("StatusUpdating");//"Updating";
|
|
|
|
|
|
+ uxStatus.Content = Resx.AppResources.StatusUpdating;//"Updating";
|
|
}
|
|
}
|
|
else if (status == UpdateStatus.Sucess)
|
|
else if (status == UpdateStatus.Sucess)
|
|
{
|
|
{
|
|
uxStatusContainer.Background = new SolidColorBrush(Colors.Green);
|
|
uxStatusContainer.Background = new SolidColorBrush(Colors.Green);
|
|
uxStatus.Foreground = new SolidColorBrush(Colors.White);
|
|
uxStatus.Foreground = new SolidColorBrush(Colors.White);
|
|
- uxStatus.Content = (string)Application.Current.FindResource("StatusSuccess");//"Success";
|
|
|
|
|
|
+ uxStatus.Content = Resx.AppResources.StatusSuccess;//"Success";
|
|
uxStatusBar.Content = "";
|
|
uxStatusBar.Content = "";
|
|
}
|
|
}
|
|
else if (status == UpdateStatus.Fail)
|
|
else if (status == UpdateStatus.Fail)
|
|
{
|
|
{
|
|
uxStatusContainer.Background = new SolidColorBrush(Colors.Red);
|
|
uxStatusContainer.Background = new SolidColorBrush(Colors.Red);
|
|
uxStatus.Foreground = new SolidColorBrush(Colors.White);
|
|
uxStatus.Foreground = new SolidColorBrush(Colors.White);
|
|
- uxStatus.Content = (string)Application.Current.FindResource("StatusFail");//"Fail";
|
|
|
|
|
|
+ uxStatus.Content = Resx.AppResources.StatusFail;//"Fail";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|