/// <summary>
 /// Initialize the object.
 /// </summary>
 /// <param name="ssConfig">Set the Subsystem Configuration.</param>
 public SubsystemOptions(SubsystemConfiguration ssConfig)
 {
     TextOptions           = new TextSubsystemConfigOptions(ssConfig);
     GraphicalOptions      = new ViewDataGraphicalOptions(ssConfig);
     ScreenOptions         = new ScreenSubsystemConfigOptions(ssConfig);
     AverageOptions        = new AverageSubsystemConfigOptions(ssConfig);
     ValidationViewOptions = new ValidationTestViewOptions(ssConfig);
 }
        /// <summary>
        /// Get the Average options from the dictionary.  This will
        /// check if the subsystem configuration is in the hashset.
        /// If it is in the hashset, it will get the Average options.
        /// If it is not, it will return a default configuration.
        /// </summary>
        /// <param name="ssConfig">Subsystem configuration to check.</param>
        /// <returns>Screen options.</returns>
        public AverageSubsystemConfigOptions GetAverageOptions(SubsystemConfiguration ssConfig)
        {
            AverageSubsystemConfigOptions options = null;

            if (SubsystemConfigList.Contains(ssConfig))
            {
                options = SubsysOptions[ssConfig.IndexCodeString()].AverageOptions;
            }
            else
            {
                options = new AverageSubsystemConfigOptions();
            }

            return(options);
        }
        /// <summary>
        /// Save the Average SubsystemConfiguration 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="ssConfig">Subsystem Configuration.</param>
        /// <param name="options">Average SubsystemConfiguration options.</param>
        public void SaveAverageOptions(SubsystemConfiguration ssConfig, AverageSubsystemConfigOptions options)
        {
            // Check if the subsystem exist in the dictionary
            if (SubsystemConfigList.Contains(ssConfig))
            {
                // Store the graphical options to the SubsystemConfig entry
                SubsysOptions[ssConfig.IndexCodeString()].AverageOptions = options;
            }
            else
            {
                // Add new subsystem configuration
                AddConfiguration(ssConfig);

                // Store the new options if the entry could be made
                if (SubsystemConfigList.Contains(ssConfig))
                {
                    // Store the graphical options to the SubsystemConfig entry
                    SubsysOptions[ssConfig.IndexCodeString()].AverageOptions = options;
                }
            }

            // Store the new options to the project DB
            SaveOptions();
        }