📄 colorhlseditor.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing.Design;
using System.ComponentModel;
using System.Windows.Forms.Design;
using System.Windows.Forms;
namespace Fireball.Drawing.Design
{
public class ColorHLSEditor:UITypeEditor
{
private ColorHlsUI _colorUI;
public ColorHLSEditor()
{
}
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
{
if (provider != null)
{
IWindowsFormsEditorService winFormsService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
if (winFormsService == null)
{
return value;
}
if (this._colorUI == null)
{
this._colorUI = new ColorHlsUI(this);
}
this._colorUI.Start(winFormsService, value);
winFormsService.DropDownControl(this._colorUI);
value = this._colorUI.Value;
this._colorUI.End();
}
return value;
}
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
{
return UITypeEditorEditStyle.DropDown;
}
public override bool IsDropDownResizable
{
get
{
return false;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -