|
@@ -104,8 +104,8 @@ namespace ConfigEditor.SubPage.EvseConfig
|
|
|
|
|
|
this.DataContext = config;
|
|
|
|
|
|
- uxFirstTelcom.Visibility = systemID.ModelName.Network.SupportTelecom ? Visibility.Visible : Visibility.Collapsed;
|
|
|
- uxSecondTelcom.Visibility = systemID.ModelName.Network.SupportSubTelecom ? Visibility.Visible : Visibility.Collapsed;
|
|
|
+ uxFirstTelcom.Visibility = systemID.ModelName.GetTelecomCnt() > 0 ? Visibility.Visible : Visibility.Collapsed;
|
|
|
+ uxSecondTelcom.Visibility = systemID.ModelName.GetTelecomCnt() > 1 ? Visibility.Visible : Visibility.Collapsed;
|
|
|
|
|
|
var groupedFrimware = config.FirmwareUpdateList is null ? new List<IGrouping<int, FirmwareUpdateModel>>() : config.FirmwareUpdateList.GroupBy(x => EvseVersion.GetVersionIndex(x.Module));
|
|
|
groupedFrimware = groupedFrimware.OrderBy(x => x.Key);
|
|
@@ -146,16 +146,36 @@ namespace ConfigEditor.SubPage.EvseConfig
|
|
|
|
|
|
private bool CheckSetting()
|
|
|
{
|
|
|
- var modelName = uxEvseModelNameList.SelectedItem as string;
|
|
|
+ var modelNameString = uxEvseModelNameList.SelectedItem as string;
|
|
|
EvseSettingConfigModel config = this.DataContext as EvseSettingConfigModel;
|
|
|
|
|
|
- if (string.IsNullOrEmpty(modelName) ||
|
|
|
+ if (string.IsNullOrEmpty(modelNameString) ||
|
|
|
config == null)
|
|
|
{
|
|
|
MessageBox.Show("load model failed");
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ var systemidParse = SystemID.TryLooseParse(modelNameString, out var systemID);
|
|
|
+ if (!systemidParse)
|
|
|
+ {
|
|
|
+ MessageBox.Show("model name error");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ var modelName = systemID.ModelName;
|
|
|
+
|
|
|
+ if (modelName.GetTelecomCnt() > 0 && string.IsNullOrEmpty(config.FourGenModuleVersion))
|
|
|
+ {
|
|
|
+ MessageBox.Show("ModuleVersion should not be empty");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (modelName.GetTelecomCnt() > 1 && string.IsNullOrEmpty(config.SubFourGenModuleVersion))
|
|
|
+ {
|
|
|
+ MessageBox.Show("ModuleVersion should not be empty");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
if (config.IsSimInsert)
|
|
|
{
|
|
|
if (string.IsNullOrEmpty(config.SimICCID) ||
|