mirror of
https://github.com/eggplantlwj/VisionEdit.git
synced 2026-03-25 01:06:36 +08:00
1、优化LOG显示与引用
2、添加PMA工具,工具内容待完善 3、修复流程树显示 4、添加开源项目,优化UI空间 5、其他BUG更改
This commit is contained in:
250
UsingControl/HZHControls/UIEditor/FrmSelectImage.Designer.cs
generated
Normal file
250
UsingControl/HZHControls/UIEditor/FrmSelectImage.Designer.cs
generated
Normal file
@@ -0,0 +1,250 @@
|
||||
namespace HZH_Controls
|
||||
{
|
||||
partial class FrmSelectImage
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.ucTextBoxEx1 = new HZH_Controls.Controls.UCTextBoxEx();
|
||||
this.tabControlExt1 = new HZH_Controls.Controls.TabControlExt();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.txtForeColor = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.txtBackcolor = new System.Windows.Forms.TextBox();
|
||||
this.panel1.SuspendLayout();
|
||||
this.tabControlExt1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.panel1.BackColor = System.Drawing.Color.White;
|
||||
this.panel1.Controls.Add(this.txtBackcolor);
|
||||
this.panel1.Controls.Add(this.txtForeColor);
|
||||
this.panel1.Controls.Add(this.label3);
|
||||
this.panel1.Controls.Add(this.ucTextBoxEx1);
|
||||
this.panel1.Controls.Add(this.label2);
|
||||
this.panel1.Controls.Add(this.label1);
|
||||
this.panel1.Location = new System.Drawing.Point(122, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(532, 51);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 19);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(53, 12);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "图标大小";
|
||||
//
|
||||
// ucTextBoxEx1
|
||||
//
|
||||
this.ucTextBoxEx1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.ucTextBoxEx1.ConerRadius = 5;
|
||||
this.ucTextBoxEx1.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
this.ucTextBoxEx1.DecLength = 2;
|
||||
this.ucTextBoxEx1.FillColor = System.Drawing.Color.Empty;
|
||||
this.ucTextBoxEx1.FocusBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
|
||||
this.ucTextBoxEx1.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.ucTextBoxEx1.InputText = "32";
|
||||
this.ucTextBoxEx1.InputType = HZH_Controls.TextInputType.Integer;
|
||||
this.ucTextBoxEx1.IsFocusColor = true;
|
||||
this.ucTextBoxEx1.IsRadius = true;
|
||||
this.ucTextBoxEx1.IsShowClearBtn = false;
|
||||
this.ucTextBoxEx1.IsShowKeyboard = false;
|
||||
this.ucTextBoxEx1.IsShowRect = true;
|
||||
this.ucTextBoxEx1.IsShowSearchBtn = false;
|
||||
this.ucTextBoxEx1.KeyBoardType = HZH_Controls.Controls.KeyBoardType.UCKeyBorderAll_EN;
|
||||
this.ucTextBoxEx1.Location = new System.Drawing.Point(72, 4);
|
||||
this.ucTextBoxEx1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.ucTextBoxEx1.MaxValue = new decimal(new int[] {
|
||||
100,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.ucTextBoxEx1.MinValue = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.ucTextBoxEx1.Name = "ucTextBoxEx1";
|
||||
this.ucTextBoxEx1.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.ucTextBoxEx1.PromptColor = System.Drawing.Color.Gray;
|
||||
this.ucTextBoxEx1.PromptFont = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.ucTextBoxEx1.PromptText = "";
|
||||
this.ucTextBoxEx1.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.ucTextBoxEx1.RectWidth = 1;
|
||||
this.ucTextBoxEx1.RegexPattern = "";
|
||||
this.ucTextBoxEx1.Size = new System.Drawing.Size(64, 42);
|
||||
this.ucTextBoxEx1.TabIndex = 1;
|
||||
//
|
||||
// tabControlExt1
|
||||
//
|
||||
this.tabControlExt1.Controls.Add(this.tabPage1);
|
||||
this.tabControlExt1.Controls.Add(this.tabPage2);
|
||||
this.tabControlExt1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControlExt1.IsShowCloseBtn = false;
|
||||
this.tabControlExt1.ItemSize = new System.Drawing.Size(0, 50);
|
||||
this.tabControlExt1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabControlExt1.Name = "tabControlExt1";
|
||||
this.tabControlExt1.SelectedIndex = 0;
|
||||
this.tabControlExt1.Size = new System.Drawing.Size(654, 493);
|
||||
this.tabControlExt1.TabIndex = 0;
|
||||
this.tabControlExt1.SelectedIndexChanged += new System.EventHandler(this.tabControlExt1_SelectedIndexChanged);
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.AutoScroll = true;
|
||||
this.tabPage1.Controls.Add(this.flowLayoutPanel1);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 54);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(646, 435);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Awesome";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.AutoScroll = true;
|
||||
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(640, 429);
|
||||
this.flowLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.AutoScroll = true;
|
||||
this.tabPage2.Controls.Add(this.flowLayoutPanel2);
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 54);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(646, 435);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "Elegant";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// flowLayoutPanel2
|
||||
//
|
||||
this.flowLayoutPanel2.AutoScroll = true;
|
||||
this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 3);
|
||||
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
|
||||
this.flowLayoutPanel2.Size = new System.Drawing.Size(640, 429);
|
||||
this.flowLayoutPanel2.TabIndex = 1;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(157, 19);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(41, 12);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "前景色";
|
||||
//
|
||||
// txtForeColor
|
||||
//
|
||||
this.txtForeColor.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(85)))), ((int)(((byte)(51)))));
|
||||
this.txtForeColor.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.txtForeColor.Font = new System.Drawing.Font("宋体", 12F);
|
||||
this.txtForeColor.ForeColor = System.Drawing.Color.White;
|
||||
this.txtForeColor.Location = new System.Drawing.Point(204, 16);
|
||||
this.txtForeColor.Name = "txtForeColor";
|
||||
this.txtForeColor.ReadOnly = true;
|
||||
this.txtForeColor.Size = new System.Drawing.Size(111, 19);
|
||||
this.txtForeColor.TabIndex = 3;
|
||||
this.txtForeColor.Text = "255, 85, 51";
|
||||
this.txtForeColor.DoubleClick += new System.EventHandler(this.textBox1_DoubleClick);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(336, 18);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(41, 12);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "背景色";
|
||||
//
|
||||
// txtBackcolor
|
||||
//
|
||||
this.txtBackcolor.BackColor = System.Drawing.Color.White;
|
||||
this.txtBackcolor.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.txtBackcolor.Font = new System.Drawing.Font("宋体", 12F);
|
||||
this.txtBackcolor.ForeColor = System.Drawing.Color.Black;
|
||||
this.txtBackcolor.Location = new System.Drawing.Point(383, 15);
|
||||
this.txtBackcolor.Name = "txtBackcolor";
|
||||
this.txtBackcolor.ReadOnly = true;
|
||||
this.txtBackcolor.Size = new System.Drawing.Size(111, 19);
|
||||
this.txtBackcolor.TabIndex = 3;
|
||||
this.txtBackcolor.Text = "255,255,255";
|
||||
this.txtBackcolor.DoubleClick += new System.EventHandler(this.textBox1_DoubleClick);
|
||||
//
|
||||
// FrmSelectImage
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(654, 493);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.tabControlExt1);
|
||||
this.Name = "FrmSelectImage";
|
||||
this.Text = "选择图标";
|
||||
this.Load += new System.EventHandler(this.FrmSelectImage_Load);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.tabControlExt1.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tabPage2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private HZH_Controls.Controls.TabControlExt tabControlExt1;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
|
||||
private Controls.UCTextBoxEx ucTextBoxEx1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox txtBackcolor;
|
||||
private System.Windows.Forms.TextBox txtForeColor;
|
||||
private System.Windows.Forms.Label label3;
|
||||
}
|
||||
}
|
||||
103
UsingControl/HZHControls/UIEditor/FrmSelectImage.cs
Normal file
103
UsingControl/HZHControls/UIEditor/FrmSelectImage.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
namespace HZH_Controls
|
||||
{
|
||||
public partial class FrmSelectImage : Form
|
||||
{
|
||||
public Image SelectImage { get; set; }
|
||||
public FrmSelectImage()
|
||||
{
|
||||
try
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageBox.Show(exc.ToString(), "错误");
|
||||
}
|
||||
}
|
||||
|
||||
private void tabControlExt1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (tabControlExt1.SelectedIndex == 0)
|
||||
this.ActiveControl = this.flowLayoutPanel1;
|
||||
else
|
||||
this.ActiveControl = this.flowLayoutPanel2;
|
||||
|
||||
}
|
||||
|
||||
private void FrmSelectImage_Load(object sender, EventArgs e)
|
||||
{
|
||||
string[] nameList = System.Enum.GetNames(typeof(HZH_Controls.FontIcons));
|
||||
var lst = nameList.ToList();
|
||||
lst.Sort();
|
||||
foreach (var item in lst)
|
||||
{
|
||||
HZH_Controls.FontIcons icon = (HZH_Controls.FontIcons)Enum.Parse(typeof(HZH_Controls.FontIcons), item);
|
||||
Label lbl = new Label();
|
||||
lbl.AutoSize = false;
|
||||
lbl.Size = new System.Drawing.Size(300, 35);
|
||||
lbl.ForeColor = Color.FromArgb(255, 77, 59);
|
||||
lbl.TextAlign = ContentAlignment.MiddleLeft;
|
||||
lbl.Margin = new System.Windows.Forms.Padding(5);
|
||||
lbl.DoubleClick += lbl_DoubleClick;
|
||||
string s = char.ConvertFromUtf32((int)icon);
|
||||
lbl.Text = " " + item;
|
||||
lbl.Image = HZH_Controls.FontImages.GetImage(icon, 32, Color.FromArgb(255, 77, 59));
|
||||
lbl.ImageAlign = ContentAlignment.MiddleLeft;
|
||||
lbl.Font = new Font("微软雅黑", 12);
|
||||
lbl.Tag = icon;
|
||||
if (item.StartsWith("A_"))
|
||||
{
|
||||
flowLayoutPanel1.Controls.Add(lbl);
|
||||
}
|
||||
else
|
||||
{
|
||||
flowLayoutPanel2.Controls.Add(lbl);
|
||||
}
|
||||
}
|
||||
this.ActiveControl = this.flowLayoutPanel1;
|
||||
}
|
||||
|
||||
void lbl_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
Label lbl = sender as Label;
|
||||
HZH_Controls.FontIcons icon = (HZH_Controls.FontIcons)lbl.Tag;
|
||||
int intSize = ucTextBoxEx1.InputText.ToInt();
|
||||
if (intSize <= 0)
|
||||
intSize = 32;
|
||||
SelectImage = HZH_Controls.FontImages.GetImage(icon, intSize, txtForeColor.BackColor, txtBackcolor.BackColor == Color.White ? Color.Empty : txtBackcolor.BackColor);
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
||||
private void textBox1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
TextBox txt = sender as TextBox;
|
||||
ColorDialog ColorForm = new ColorDialog();
|
||||
ColorForm.AnyColor = true;
|
||||
List<int> lstCustomColors = new List<int>();
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
lstCustomColors.Add(ColorTranslator.ToOle(ControlHelper.Colors[i]));
|
||||
}
|
||||
ColorForm.CustomColors = lstCustomColors.ToArray();
|
||||
if (ColorForm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Color GetColor = ColorForm.Color;
|
||||
txt.BackColor = GetColor;
|
||||
txt.Text = GetColor.R + "," + GetColor.G + "," + GetColor.B;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
UsingControl/HZHControls/UIEditor/FrmSelectImage.resx
Normal file
120
UsingControl/HZHControls/UIEditor/FrmSelectImage.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
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