예제 #1
0
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            BrushEditor dlg = new BrushEditor();
            dlg.SelectedBrush = value as Brush;

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                return dlg.SelectedBrush;

            return value;
        }
예제 #2
0
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            BrushEditor dlg = new BrushEditor();

            dlg.SelectedBrush = value as Brush;

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                return(dlg.SelectedBrush);
            }

            return(value);
        }