Example #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            // obtaining changes in configuration
            ControlsToConfig();

            // Save the XML file if any change in Form
            if (config.Modify == true)
            {
                // save the configuration
                string errMsg;
                if (config.Save(configFileName, out errMsg))
                {
                    DialogResult = DialogResult.OK;
                }
                else
                {
                    ScadaUiUtils.ShowError(errMsg);
                }
            }

            DialogResult = DialogResult.OK;
        }
Example #2
0
        private void SaveGpioConfig()
        {
            string errMsg;

            fatalError = !wiznetGpioCfg.Save(gpioConfig.GetFileName(AppDirs.ConfigDir, Number), out errMsg);

            if (fatalError)
            {
                state = "Save Serial Settings not possible.";
                throw new Exception(errMsg);
            }
            else
            {
                state = "GPIO Settings Saved to File.";
            }
        }