diff --git a/ScadaAdmin/OpenExtensions/ExtImport/Forms/FrmImportFile.cs b/ScadaAdmin/OpenExtensions/ExtImport/Forms/FrmImportFile.cs index dfca00d9f..139f00404 100644 --- a/ScadaAdmin/OpenExtensions/ExtImport/Forms/FrmImportFile.cs +++ b/ScadaAdmin/OpenExtensions/ExtImport/Forms/FrmImportFile.cs @@ -617,18 +617,24 @@ private void button3_Click(object sender, EventArgs e) /// private void button1_Click(object sender, EventArgs e) { - - //Then, we generate a device configuration according to imported rows - bool doNext = ImportDeviceConfiguration(); - - if (doNext) + if (string.IsNullOrEmpty(textBox4.Text)) { - //save the default byte order in project config - string extImportConfigPath = string.Format("{0}\\Instances\\Default\\ExtImport\\extImportConfig.xml", project.ProjectDir); - SaveExtImportConfig(extImportConfigPath); + MessageBox.Show("Please fill the adress gap input", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + else + { + //Then, we generate a device configuration according to imported rows + bool doNext = ImportDeviceConfiguration(); + + if (doNext) + { + //save the default byte order in project config + string extImportConfigPath = string.Format("{0}\\Instances\\Default\\ExtImport\\extImportConfig.xml", project.ProjectDir); + SaveExtImportConfig(extImportConfigPath); - //Finally, we close the form - DialogResult = DialogResult.OK; + //Finally, we close the form + DialogResult = DialogResult.OK; + } } }