mirror of
https://github.com/eggplantlwj/VisionEdit.git
synced 2026-03-25 09:16:34 +08:00
1、优化LOG显示与引用
2、添加PMA工具,工具内容待完善 3、修复流程树显示 4、添加开源项目,优化UI空间 5、其他BUG更改
This commit is contained in:
104
UsingControl/HZHControls/Controls/RadioButton/UCRadioButton.Designer.cs
generated
Normal file
104
UsingControl/HZHControls/Controls/RadioButton/UCRadioButton.Designer.cs
generated
Normal file
@@ -0,0 +1,104 @@
|
||||
// ***********************************************************************
|
||||
// Assembly : HZH_Controls
|
||||
// Created : 08-08-2019
|
||||
//
|
||||
// ***********************************************************************
|
||||
// <copyright file="UCRadioButton.Designer.cs">
|
||||
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||
// </copyright>
|
||||
//
|
||||
// Blog: https://www.cnblogs.com/bfyx
|
||||
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||
//
|
||||
// If you use this code, please keep this note.
|
||||
// ***********************************************************************
|
||||
namespace HZH_Controls.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Class UCRadioButton.
|
||||
/// Implements the <see cref="System.Windows.Forms.UserControl" />
|
||||
/// </summary>
|
||||
/// <seealso cref="System.Windows.Forms.UserControl" />
|
||||
partial class UCRadioButton
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(62)))), ((int)(((byte)(62)))), ((int)(((byte)(62)))));
|
||||
this.label1.Location = new System.Drawing.Point(18, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
|
||||
this.label1.Size = new System.Drawing.Size(215, 30);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "单选按钮";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.label1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Radio_MouseDown);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackgroundImage = global::HZH_Controls.Properties.Resources.radioButton0;
|
||||
this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(18, 30);
|
||||
this.panel1.TabIndex = 2;
|
||||
this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Radio_MouseDown);
|
||||
//
|
||||
// UCRadioButton
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Name = "UCRadioButton";
|
||||
this.Size = new System.Drawing.Size(233, 30);
|
||||
this.Load += new System.EventHandler(this.UCRadioButton_Load);
|
||||
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Radio_MouseDown);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// The label1
|
||||
/// </summary>
|
||||
private System.Windows.Forms.Label label1;
|
||||
/// <summary>
|
||||
/// The panel1
|
||||
/// </summary>
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
}
|
||||
}
|
||||
283
UsingControl/HZHControls/Controls/RadioButton/UCRadioButton.cs
Normal file
283
UsingControl/HZHControls/Controls/RadioButton/UCRadioButton.cs
Normal file
@@ -0,0 +1,283 @@
|
||||
// ***********************************************************************
|
||||
// Assembly : HZH_Controls
|
||||
// Created : 08-08-2019
|
||||
//
|
||||
// ***********************************************************************
|
||||
// <copyright file="UCRadioButton.cs">
|
||||
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||
// </copyright>
|
||||
//
|
||||
// Blog: https://www.cnblogs.com/bfyx
|
||||
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||
//
|
||||
// If you use this code, please keep this note.
|
||||
// ***********************************************************************
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace HZH_Controls.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Class UCRadioButton.
|
||||
/// Implements the <see cref="System.Windows.Forms.UserControl" />
|
||||
/// </summary>
|
||||
/// <seealso cref="System.Windows.Forms.UserControl" />
|
||||
[DefaultEvent("CheckedChangeEvent")]
|
||||
public partial class UCRadioButton : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Occurs when [checked change event].
|
||||
/// </summary>
|
||||
[Description("选中改变事件"), Category("自定义")]
|
||||
public event EventHandler CheckedChangeEvent;
|
||||
|
||||
/// <summary>
|
||||
/// The font
|
||||
/// </summary>
|
||||
private Font _Font = new Font("微软雅黑", 12);
|
||||
/// <summary>
|
||||
/// 获取或设置控件显示的文字的字体。
|
||||
/// </summary>
|
||||
/// <value>The font.</value>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||
/// <IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// </PermissionSet>
|
||||
[Description("字体"), Category("自定义")]
|
||||
public new Font Font
|
||||
{
|
||||
get { return _Font; }
|
||||
set
|
||||
{
|
||||
_Font = value;
|
||||
label1.Font = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The fore color
|
||||
/// </summary>
|
||||
private Color _ForeColor = Color.FromArgb(62, 62, 62);
|
||||
/// <summary>
|
||||
/// 获取或设置控件的前景色。
|
||||
/// </summary>
|
||||
/// <value>The color of the fore.</value>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// </PermissionSet>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
public new Color ForeColor
|
||||
{
|
||||
get { return _ForeColor; }
|
||||
set
|
||||
{
|
||||
label1.ForeColor = value;
|
||||
_ForeColor = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// The text
|
||||
/// </summary>
|
||||
private string _Text = "单选按钮";
|
||||
/// <summary>
|
||||
/// Gets or sets the text value.
|
||||
/// </summary>
|
||||
/// <value>The text value.</value>
|
||||
[Description("文本"), Category("自定义")]
|
||||
public string TextValue
|
||||
{
|
||||
get { return _Text; }
|
||||
set
|
||||
{
|
||||
label1.Text = value;
|
||||
_Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// The checked
|
||||
/// </summary>
|
||||
private bool _checked = false;
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this <see cref="UCRadioButton" /> is checked.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if checked; otherwise, <c>false</c>.</value>
|
||||
[Description("是否选中"), Category("自定义")]
|
||||
public bool Checked
|
||||
{
|
||||
get
|
||||
{
|
||||
return _checked;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_checked != value)
|
||||
{
|
||||
_checked = value;
|
||||
if (base.Enabled)
|
||||
{
|
||||
if (_checked)
|
||||
{
|
||||
panel1.BackgroundImage = Properties.Resources.radioButton1;
|
||||
}
|
||||
else
|
||||
{
|
||||
panel1.BackgroundImage = Properties.Resources.radioButton0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_checked)
|
||||
{
|
||||
panel1.BackgroundImage = Properties.Resources.radioButton10;
|
||||
}
|
||||
else
|
||||
{
|
||||
panel1.BackgroundImage = Properties.Resources.radioButton00;
|
||||
}
|
||||
}
|
||||
SetCheck(value);
|
||||
|
||||
if (CheckedChangeEvent != null)
|
||||
{
|
||||
CheckedChangeEvent(this, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The group name
|
||||
/// </summary>
|
||||
private string _groupName;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the group.
|
||||
/// </summary>
|
||||
/// <value>The name of the group.</value>
|
||||
[Description("分组名称"), Category("自定义")]
|
||||
public string GroupName
|
||||
{
|
||||
get { return _groupName; }
|
||||
set { _groupName = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示控件是否可以对用户交互作出响应。
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||
/// <IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// </PermissionSet>
|
||||
public new bool Enabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Enabled;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.Enabled = value;
|
||||
if (value)
|
||||
{
|
||||
if (_checked)
|
||||
{
|
||||
panel1.BackgroundImage = Properties.Resources.radioButton1;
|
||||
}
|
||||
else
|
||||
{
|
||||
panel1.BackgroundImage = Properties.Resources.radioButton0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_checked)
|
||||
{
|
||||
panel1.BackgroundImage = Properties.Resources.radioButton10;
|
||||
}
|
||||
else
|
||||
{
|
||||
panel1.BackgroundImage = Properties.Resources.radioButton00;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UCRadioButton" /> class.
|
||||
/// </summary>
|
||||
public UCRadioButton()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the check.
|
||||
/// </summary>
|
||||
/// <param name="bln">if set to <c>true</c> [BLN].</param>
|
||||
private void SetCheck(bool bln)
|
||||
{
|
||||
if (!bln)
|
||||
return;
|
||||
if (this.Parent != null)
|
||||
{
|
||||
foreach (Control c in this.Parent.Controls)
|
||||
{
|
||||
if (c is UCRadioButton && c != this)
|
||||
{
|
||||
UCRadioButton uc = (UCRadioButton)c;
|
||||
if (_groupName == uc.GroupName && uc.Checked)
|
||||
{
|
||||
uc.Checked = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the MouseDown event of the Radio control.
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
|
||||
private void Radio_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
this.Checked = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the Load event of the UCRadioButton control.
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
|
||||
private void UCRadioButton_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Parent != null && this._checked)
|
||||
{
|
||||
foreach (Control c in this.Parent.Controls)
|
||||
{
|
||||
if (c is UCRadioButton && c != this)
|
||||
{
|
||||
UCRadioButton uc = (UCRadioButton)c;
|
||||
if (_groupName == uc.GroupName && uc.Checked)
|
||||
{
|
||||
Checked = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
UsingControl/HZHControls/Controls/RadioButton/UCRadioButton.resx
Normal file
120
UsingControl/HZHControls/Controls/RadioButton/UCRadioButton.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>
|
||||
Reference in New Issue
Block a user