/// <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 options for this subsystem display
        /// from the database.  If the options have not
        /// been set to the database yet, default values
        /// will be used.
        /// </summary>
        private void GetOptionsFromDatabase()
        {
            var ssConfig = new SubsystemConfiguration(_Config.SubSystem, _Config.CepoIndex, _Config.SubsystemConfigIndex);

            _Options = _pm.AppConfiguration.GetScreenOptions(ssConfig);

            // Notify all the properties
            this.NotifyOfPropertyChange();
        }
        /// <summary>
        /// Get the Screen 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 Screen 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 ScreenSubsystemConfigOptions GetScreenOptions(SubsystemConfiguration ssConfig)
        {
            ScreenSubsystemConfigOptions options = null;

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

            return(options);
        }
        /// <summary>
        /// Save the Screen 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">Screen SubsystemConfiguration options.</param>
        public void SaveScreenOptions(SubsystemConfiguration ssConfig, ScreenSubsystemConfigOptions options)
        {
            // Check if the subsystem exist in the dictionary
            if (SubsystemConfigList.Contains(ssConfig))
            {
                // Store the graphical options to the SubsystemConfig entry
                SubsysOptions[ssConfig.IndexCodeString()].ScreenOptions = 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()].ScreenOptions = options;
                }
            }

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