/// <summary>
 /// Fires the ChangesApplied event
 /// </summary>
 protected void OnApplyChanges()
 {
     _original.CopyProperties(_symbolizer);
     if (ChangesApplied != null)
     {
         ChangesApplied(this, EventArgs.Empty);
     }
 }
 /// <summary>
 /// Fires the ChangesApplied event
 /// </summary>
 protected void OnApplyChanges()
 {
     UpdatePreview();
     _original.CopyProperties(_symbolizer);
     if (ChangesApplied != null)
     {
         ChangesApplied(this, new EventArgs());
     }
 }
 /// <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(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     _original = value as ILineSymbolizer;
     if (_original == null) return value;
     _copy = _original.Copy();
     IWindowsFormsEditorService dialogProvider = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
     DetailedLineSymbolDialog dialog = new DetailedLineSymbolDialog(_copy);
     dialog.ChangesApplied += new EventHandler(dialog_ChangesApplied);
     if(dialogProvider.ShowDialog(dialog) != DialogResult.OK)return _original;
     _original.CopyProperties(_copy);
     return value;
 }
        /// <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 ILineSymbolizer;
            if (_original == null)
            {
                return(value);
            }
            _copy = _original.Copy();
            IWindowsFormsEditorService dialogProvider = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
            DetailedLineSymbolDialog   dialog         = new DetailedLineSymbolDialog(_copy);

            dialog.ChangesApplied += DialogChangesApplied;
            if (dialogProvider.ShowDialog(dialog) != DialogResult.OK)
            {
                return(_original);
            }
            _original.CopyProperties(_copy);
            return(value);
        }
Example #5
0
 private void DialogChangesApplied(object sender, EventArgs e)
 {
     _original.CopyProperties(_editCopy);
 }
Example #6
0
 /// <summary>
 /// Fires the ChangesApplied event.
 /// </summary>
 protected void OnApplyChanges()
 {
     UpdatePreview();
     _original.CopyProperties(_symbolizer);
     ChangesApplied?.Invoke(this, EventArgs.Empty);
 }