示例#1
0
 /// <summary>
 /// resets the breaks using the current settings, and generates a new set of
 /// categories using the given interval method.
 /// </summary>
 public void ResetBreaks(ICancelProgressHandler handler)
 {
     if (_fieldName == null)
     {
         return;
     }
     if (_scheme == null)
     {
         return;
     }
     if (_scheme.EditorSettings == null)
     {
         return;
     }
     if (_source != null)
     {
         _scheme.CreateCategories(_source, handler);
     }
     else
     {
         if (_table == null)
         {
             return;
         }
         _scheme.CreateCategories(_table);
     }
     ResetZoom();
 }
        protected void ApplyScheme(IMapFeatureLayer gridLayer, string fieldName)
        {
            IFeatureScheme newScheme = gridLayer.Symbology;

            newScheme.EditorSettings.NumBreaks          = 5;
            newScheme.EditorSettings.UseGradient        = true;
            newScheme.EditorSettings.ClassificationType = ClassificationType.Quantities;
            newScheme.EditorSettings.FieldName          = fieldName;
            newScheme.CreateCategories(gridLayer.DataSet.DataTable);
            newScheme.ResumeEvents();
            gridLayer.ApplyScheme(newScheme);
        }