private void Load() { // Change some of the defaults EncEnvironmentSettings.Default.DisplaySettings.MarinerSettings.TwoDepthShades = false; EncEnvironmentSettings.Default.DisplaySettings.MarinerSettings.ShallowContour = 2; EncEnvironmentSettings.Default.DisplaySettings.MarinerSettings.SafetyContour = 5; EncEnvironmentSettings.Default.DisplaySettings.MarinerSettings.DeepContour = 8; SettingsSaver.LoadSettings(EncEnvironmentSettings.Default.DisplaySettings.MarinerSettings, "EncMarinerSettings.config"); SettingsSaver.LoadSettings(EncEnvironmentSettings.Default.DisplaySettings.TextGroupVisibilitySettings, "EncTextGroupVisibilitySettings.config"); SettingsSaver.LoadSettings(EncEnvironmentSettings.Default.DisplaySettings.ViewingGroupSettings, "ViewingGroupSettings.config"); // Bind the view properties to the property grid controls. DisplayPropertiesPanel.Instance = EncEnvironmentSettings.Default.DisplaySettings.MarinerSettings; S52TextGroupPropertiesPanel.Instance = EncEnvironmentSettings.Default.DisplaySettings.TextGroupVisibilitySettings; S52ViewGroupPropertiesPanel.Instance = EncEnvironmentSettings.Default.DisplaySettings.ViewingGroupSettings; // Create an overlay for display identify results mapView.GraphicsOverlays.Add(new GraphicsOverlay() { Id = "IdentifyResults" }); }
protected override void OnClosed(EventArgs e) { SettingsSaver.SaveSettings(EncEnvironmentSettings.Default.DisplaySettings.MarinerSettings, "EncMarinerSettings.config"); SettingsSaver.SaveSettings(EncEnvironmentSettings.Default.DisplaySettings.TextGroupVisibilitySettings, "EncTextGroupVisibilitySettings.config"); SettingsSaver.SaveSettings(EncEnvironmentSettings.Default.DisplaySettings.ViewingGroupSettings, "ViewingGroupSettings.config"); base.OnClosed(e); }