Beispiel #1
0
 /// <summary>
 /// Show the properties of a feature layer in the legend.
 /// </summary>
 /// <param name="e"></param>
 public void ShowProperties(IFeatureLayer e)
 {
     using (var dlg = new LayerDialog(e, new FeatureCategoryControl()))
     {
         ShowDialog(dlg);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Shows the properties of the current raster legend item.
 /// </summary>
 /// <param name="e"></param>
 public void ShowProperties(IRasterLayer e)
 {
     using (var dlg = new LayerDialog(e, new RasterCategoryControl()))
     {
         ShowDialog(dlg);
     }
 }
        /// <summary>
        /// This should launch a frmRasterSymbolizer
        /// </summary>
        /// <param name="context">ITypeDescriptorContext context</param>
        /// <param name="provider">IServiceProvider provider</param>
        /// <param name="value">object value</param>
        /// <returns>A new RasterSymbolizer</returns>
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            IRasterSymbolizer rs = value as IRasterSymbolizer ?? new RasterSymbolizer();

            IWindowsFormsEditorService dialogProvider = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            IRasterLayer parent = rs.ParentLayer;
            LayerDialog  frm    = new LayerDialog(parent, new RasterCategoryControl());

            dialogProvider.ShowDialog(frm);
            return(parent.Symbolizer);
        }