/// <summary> /// Get the options from the project if a project is selected. /// If a project is not selected, use the default options. /// </summary> private void GetOptions() { // Check if a project is selected if (_pm.IsProjectSelected) { if (_pm.SelectedProject.Configuration != null) { // Check if the project has the options if (_pm.SelectedProject.Configuration.VesselMountOptions != null) { _vmOptions = _pm.SelectedProject.Configuration.VesselMountOptions; } else { _vmOptions = new VesselMountOptions(); } } } else { // Get the pulse configuration _vmOptions = _pm.AppConfiguration.GetVesselMountOptions(); // If no configuration has been create, then create a new one if (_vmOptions == null) { _vmOptions = new VesselMountOptions(); } } }
/// <summary> /// Save the Vessel Mount 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">ExportData options.</param> public void SaveVesselMountOptions(VesselMountOptions options) { // Set the options VesselMountOptions = 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> /// Initialize values. /// </summary> public AdcpConfiguration() { // Initialize values SubsystemConfigDict = new Dictionary <string, AdcpSubsystemConfig>(); Commands = new AdcpCommands(); _serialNumber = new SerialNumber(); DeploymentOptions = new DeploymentOptions(); AdcpSerialOptions = new AdcpSerialPort.AdcpSerialOptions(); IsGps1SerialEnabled = false; IsGps2SerialEnabled = false; IsNmea1SerialEnabled = false; IsNmea2SerialEnabled = false; Gps1SerialOptions = new SerialOptions(); Gps2SerialOptions = new SerialOptions(); Nmea1SerialOptions = new SerialOptions(); Nmea2SerialOptions = new SerialOptions(); HardwareOptions = new EngConf(); EthernetOptions = new AdcpEthernetOptions(); VesselMountOptions = new VesselMountOptions(); EngPort = ""; AdditionalCommands = ""; }
/// <summary> /// Initialize values. /// </summary> public AdcpConfiguration(SerialNumber serial) { // Initialize values SubsystemConfigDict = new Dictionary <string, AdcpSubsystemConfig>(); Commands = new AdcpCommands(); _serialNumber = serial; SetCepo(_serialNumber.SubsystemsString(), _serialNumber); // Must go after Commands is created DeploymentOptions = new DeploymentOptions(); AdcpSerialOptions = new AdcpSerialPort.AdcpSerialOptions(); IsGps1SerialEnabled = false; IsGps2SerialEnabled = false; IsNmea1SerialEnabled = false; IsNmea2SerialEnabled = false; Gps1SerialOptions = new SerialOptions(); Gps2SerialOptions = new SerialOptions(); Nmea1SerialOptions = new SerialOptions(); Nmea2SerialOptions = new SerialOptions(); HardwareOptions = new EngConf(); EthernetOptions = new AdcpEthernetOptions(); VesselMountOptions = new VesselMountOptions(); EngPort = ""; AdditionalCommands = ""; }
/// <summary> /// Initialize values. /// </summary> public AdcpConfiguration() { // Initialize values SubsystemConfigDict = new Dictionary<string, AdcpSubsystemConfig>(); Commands = new AdcpCommands(); _serialNumber = new SerialNumber(); DeploymentOptions = new DeploymentOptions(); AdcpSerialOptions = new AdcpSerialPort.AdcpSerialOptions(); Gps1SerialOptions = new SerialOptions(); Gps2SerialOptions = new SerialOptions(); Nmea1SerialOptions = new SerialOptions(); Nmea2SerialOptions = new SerialOptions(); HardwareOptions = new EngConf(); EthernetOptions = new AdcpEthernetOptions(); VesselMountOptions = new VesselMountOptions(); }
/// <summary> /// Initialize values. /// </summary> public AdcpConfiguration(SerialNumber serial) { // Initialize values SubsystemConfigDict = new Dictionary<string, AdcpSubsystemConfig>(); Commands = new AdcpCommands(); _serialNumber = serial; SetCepo(_serialNumber.SubsystemsString(), _serialNumber); // Must go after Commands is created DeploymentOptions = new DeploymentOptions(); AdcpSerialOptions = new AdcpSerialPort.AdcpSerialOptions(); Gps1SerialOptions = new SerialOptions(); Gps2SerialOptions = new SerialOptions(); Nmea1SerialOptions = new SerialOptions(); Nmea2SerialOptions = new SerialOptions(); HardwareOptions = new EngConf(); EthernetOptions = new AdcpEthernetOptions(); VesselMountOptions = new VesselMountOptions(); }