예제 #1
0
 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();
     }
 }
예제 #2
0
 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();
     }
 }
예제 #3
0
 public static IEnumerable <ProjectionInfoDesc> GetForCoordinateSystemCategory(CoordinateSystemCategory category)
 {
     return(category.Names.Select(d => new ProjectionInfoDesc(d, category.GetProjection(d))));
 }
예제 #4
0
 public static IEnumerable<ProjectionInfoDesc> GetForCoordinateSystemCategory(CoordinateSystemCategory category)
 {
     return category.Names.Select(d => new ProjectionInfoDesc(d, category.GetProjection(d)));   
 }