Exemple #1
0
 /// <summary>
 /// Creates a new instance of PointSizeRangeControl
 /// </summary>
 public FeatureSizeRangeControl()
 {
     InitializeComponent();
     _pointDialog = new DetailedPointSymbolDialog();
     _pointDialog.ChangesApplied += _pointDialog_ChangesApplied;
     _lineDialog = new DetailedLineSymbolDialog();
     _lineDialog.ChangesApplied += _lineDialog_ChangesApplied;
 }
        private void btnEdit_Click(object sender, EventArgs e)
        {
            ILineDecoration dec = ccDecorations.SelectedDecoration;

            if (dec == null)
            {
                return;
            }
            DetailedPointSymbolDialog dpd = new DetailedPointSymbolDialog(dec.Symbol);

            dpd.ChangesApplied += dpd_ChangesApplied;
            dpd.ShowDialog();
        }
Exemple #3
0
        /// <summary>
        /// Launches a form for editing the line symbolizer
        /// </summary>
        /// <param name="context"></param>
        /// <param name="provider"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            _original = value as IPointSymbolizer;
            if (_original == null)
            {
                return(value);
            }
            _copy = _original.Copy();
            IWindowsFormsEditorService dialogProvider = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
            DetailedPointSymbolDialog  dialog         = new DetailedPointSymbolDialog(_copy);

            dialog.ChangesApplied += DialogChangesApplied;
            if (dialogProvider.ShowDialog(dialog) != DialogResult.OK)
            {
                return(value);
            }
            _original.CopyProperties(_copy);
            return(value);
        }