/// <summary>
        /// Save the SmartPage options to the project database.
        /// This will store the options so the user can retreive them when the project
        /// is loaded again.
        /// </summary>
        /// <param name="options">SmartPage options.</param>
        public void SaveSmartPageOptions(SmartPageOptions options)
        {
            // Set the options
            SmartPageOptions = options;

            // Store the new options to the project DB
            SaveOptions();
        }
 /// <summary>
 /// Initialize the object.
 /// </summary>
 public PulseConfiguration()
 {
     SubsysOptions       = new Dictionary <string, SubsystemOptions>();
     SubsystemConfigList = new HashSet <SubsystemConfiguration>();
     SmartPageOptions    = new SmartPageOptions();
     ExportDataOptions   = new ExportOptions();
     VesselMountOptions  = new VesselMountOptions();
 }
        public PulseConfiguration(Dictionary <string,
                                              SubsystemOptions> SubsysOptions,
                                  HashSet <SubsystemConfiguration> SubsystemConfigList,
                                  SmartPageOptions SmartPageOptions,
                                  ExportDataOptions ExportOptions,
                                  VesselMountOptions VesselMountOptionss)
        {
            this.SubsysOptions       = SubsysOptions;
            this.SubsystemConfigList = SubsystemConfigList;
            this.SmartPageOptions    = SmartPageOptions;
            this.ExportDataOptions   = ExportDataOptions;
            this.VesselMountOptions  = VesselMountOptions;

            // Check for Nulls
            CheckForNull();
        }
        /// <summary>
        /// If the project is an older version, then an
        /// object may not have existed in the project.
        /// This will ensure all the object are at least
        /// created with default values.
        /// </summary>
        private void CheckForNull()
        {
            if (SubsysOptions == null)
            {
                SubsysOptions = new Dictionary <string, SubsystemOptions>();
            }

            if (SubsystemConfigList == null)
            {
                SubsystemConfigList = new HashSet <SubsystemConfiguration>();
            }

            if (SmartPageOptions == null)
            {
                SmartPageOptions = new SmartPageOptions();
            }

            if (ExportDataOptions == null)
            {
                ExportDataOptions = new ExportOptions();
            }
        }