From 2709db918ad2f667843398c0d75b19ee1dbd5b4e Mon Sep 17 00:00:00 2001 From: Elouan RIVAL Date: Wed, 17 Apr 2024 15:42:36 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20v=C3=A9rification=20remplissage=20gap?= =?UTF-8?q?=20pour=20soumission=20formulaire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExtImport/Forms/FrmImportFile.cs | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) 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; + } } }