DotNet 4.8.1 build of DotNetBar
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing.Design;
|
||||
using System.Windows.Forms.Design;
|
||||
using DevComponents.DotNetBar.Charts;
|
||||
|
||||
namespace DevComponents.Charts.Design
|
||||
{
|
||||
public class SeriesPointValueEditor : UITypeEditor
|
||||
{
|
||||
#region GetEditStyle
|
||||
|
||||
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
|
||||
{
|
||||
return (UITypeEditorEditStyle.DropDown);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetPaintValueSupported
|
||||
|
||||
public override bool GetPaintValueSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return (false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EditValue
|
||||
|
||||
public override object EditValue(
|
||||
ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
IWindowsFormsEditorService editorService =
|
||||
provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
|
||||
|
||||
if (editorService != null)
|
||||
{
|
||||
SeriesPointValueDropDown fs = new
|
||||
SeriesPointValueDropDown(value, editorService, context);
|
||||
|
||||
fs.EscapePressed = false;
|
||||
|
||||
editorService.DropDownControl(fs);
|
||||
|
||||
if (fs.EscapePressed == true)
|
||||
return (value);
|
||||
|
||||
context.PropertyDescriptor.SetValue(context.Instance, fs.Value);
|
||||
|
||||
return (fs.Value);
|
||||
}
|
||||
|
||||
return (base.EditValue(context, provider, value));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user