mirror of
https://github.com/eggplantlwj/VisionEdit.git
synced 2026-03-24 08:46:35 +08:00
1、优化LOG显示与引用
2、添加PMA工具,工具内容待完善 3、修复流程树显示 4、添加开源项目,优化UI空间 5、其他BUG更改
This commit is contained in:
38
UsingControl/HZHControls/UIEditor/ImagePropertyEditor.cs
Normal file
38
UsingControl/HZHControls/UIEditor/ImagePropertyEditor.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Design;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace HZH_Controls
|
||||
{
|
||||
public class ImagePropertyEditor : UITypeEditor
|
||||
{
|
||||
public override UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context)
|
||||
{
|
||||
//指定为模式窗体属性编辑器类型
|
||||
return UITypeEditorEditStyle.Modal;
|
||||
}
|
||||
|
||||
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
|
||||
{
|
||||
//打开属性编辑器修改数据
|
||||
FrmSelectImage frm = new FrmSelectImage();
|
||||
if (value == null || value is Image)
|
||||
{
|
||||
if (value != null)
|
||||
frm.SelectImage = (Image)value;
|
||||
if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
return frm.SelectImage;
|
||||
else
|
||||
return value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("这不是一个FontIcons类型的属性");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user