Esempio n. 1
0
        public ConfigurationResult Configure(string sProgramName, PromptForData PFData)
#endif
        {
            AMIConfigureM2Gateway ConfigureDevice = new AMIConfigureM2Gateway(m_PSEM);
            ConfigurationError    ConfigError     = ConfigurationError.GENERAL_ERROR;

            // Set up the progress bar event handlers
            ConfigureDevice.ShowProgressEvent += this.ShowProgressEvent;
            ConfigureDevice.StepProgressEvent += this.StepProgressEvent;
            ConfigureDevice.HideProgressEvent += this.HideProgressEvent;

            ConfigureDevice.IsCanadian = IsCanadian;

            if (PFData != null)
            {
                ConfigureDevice.UnitID = PFData.UnitID;
                ConfigureDevice.CustomerSerialNumber = PFData.SerialNumber;
                ConfigureDevice.InitialDateTime      = PFData.InitialDateTime;
            }

            ConfigError = ConfigureDevice.Configure(sProgramName);

            // Translate to the ItronDevice ConfigurationResult error code since
            // the factory is using ConfigurationError and we do not want to always
            // rely on having the version in AMIConfiguration.dll

            return(TranslateConfigError(ConfigError));
        }
Esempio n. 2
0
        public ConfigurationResult Configure(string sProgramName)
#endif
        {
            AMIConfigureM2Gateway ConfigureDevice = new AMIConfigureM2Gateway(m_PSEM);
            ConfigurationError    ConfigError     = ConfigurationError.GENERAL_ERROR;

            // Set up the progress bar event handlers
            ConfigureDevice.ShowProgressEvent += this.ShowProgressEvent;
            ConfigureDevice.StepProgressEvent += this.StepProgressEvent;
            ConfigureDevice.HideProgressEvent += this.HideProgressEvent;

            ConfigureDevice.IsCanadian = IsCanadian;

            // We always need to set the Prompt for data so we should just use what is
            // currently in the meter.

            ConfigureDevice.UnitID = UnitID;
            ConfigureDevice.CustomerSerialNumber = SerialNumber;
            ConfigureDevice.InitialDateTime      = null;

            ConfigError = ConfigureDevice.Configure(sProgramName);

            // Translate to the ItronDevice ConfigurationResult error code since
            // the factory is using ConfigurationError and we do not want to always
            // rely on having the version in AMIConfiguration.dll

            return(TranslateConfigError(ConfigError));
        }