private void LoadMinorCategories() { if (radProjected.Checked) { CoordinateSystemCategory c = KnownCoordinateSystems.Projected.GetCategory((string)cmbMajorCategory.SelectedItem); if (c == null) { return; } cmbMinorCategory.SuspendLayout(); cmbMinorCategory.Items.Clear(); string[] names = c.Names; foreach (string name in names) { cmbMinorCategory.Items.Add(name); } cmbMinorCategory.SelectedIndex = 0; _selectedCoordinateSystem = c.GetProjection(names[0]); cmbMinorCategory.ResumeLayout(); } else { CoordinateSystemCategory c = KnownCoordinateSystems.Geographic.GetCategory((string)cmbMajorCategory.SelectedItem); cmbMinorCategory.SuspendLayout(); cmbMinorCategory.Items.Clear(); string[] names = c.Names; foreach (string name in names) { cmbMinorCategory.Items.Add(name); } cmbMinorCategory.SelectedIndex = 0; _selectedCoordinateSystem = c.GetProjection(names[0]); cmbMinorCategory.ResumeLayout(); } }
private void cmbMinorCategory_SelectedIndexChanged(object sender, EventArgs e) { if (radProjected.Checked) { CoordinateSystemCategory c = KnownCoordinateSystems.Projected.GetCategory((string)cmbMajorCategory.SelectedItem); _selectedCoordinateSystem = c.GetProjection((string)cmbMinorCategory.SelectedItem); cmbMinorCategory.ResumeLayout(); } else { CoordinateSystemCategory c = KnownCoordinateSystems.Geographic.GetCategory((string)cmbMajorCategory.SelectedItem); _selectedCoordinateSystem = c.GetProjection((string)cmbMinorCategory.SelectedItem); cmbMinorCategory.ResumeLayout(); } }
public static IEnumerable <ProjectionInfoDesc> GetForCoordinateSystemCategory(CoordinateSystemCategory category) { return(category.Names.Select(d => new ProjectionInfoDesc(d, category.GetProjection(d)))); }
public static IEnumerable<ProjectionInfoDesc> GetForCoordinateSystemCategory(CoordinateSystemCategory category) { return category.Names.Select(d => new ProjectionInfoDesc(d, category.GetProjection(d))); }