1、优化LOG显示与引用

2、添加PMA工具,工具内容待完善
3、修复流程树显示
4、添加开源项目,优化UI空间
5、其他BUG更改
This commit is contained in:
liu.wenjie
2021-11-23 15:51:37 +08:00
parent 47f77f5e64
commit a24dda2525
474 changed files with 91916 additions and 6429 deletions

View File

@@ -0,0 +1,102 @@
// ***********************************************************************
// Assembly : HZH_Controls
// Created : 2019-10-15
//
// ***********************************************************************
// <copyright file="UCPanelQuote.cs">
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
// </copyright>
//
// Blog: https://www.cnblogs.com/bfyx
// GitHubhttps://github.com/kwwwvagaa/NetWinformControl
// giteehttps://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.Linq;
using System.Text;
using System.Windows.Forms;
namespace HZH_Controls.Controls
{
/// <summary>
/// Class UCPanelQuote.
/// Implements the <see cref="System.Windows.Forms.Panel" />
/// </summary>
/// <seealso cref="System.Windows.Forms.Panel" />
public class UCPanelQuote : Panel
{
/// <summary>
/// The border color
/// </summary>
private Color borderColor = LineColors.Light;
/// <summary>
/// Gets or sets the color of the border.
/// </summary>
/// <value>The color of the border.</value>
[Description("边框颜色"), Category("自定义")]
public Color BorderColor
{
get { return borderColor; }
set
{
borderColor = value;
this.Invalidate();
}
}
/// <summary>
/// The left color
/// </summary>
private Color leftColor = StatusColors.Danger;
/// <summary>
/// Gets or sets the color of the left.
/// </summary>
/// <value>The color of the left.</value>
[Description("左侧颜色"), Category("自定义")]
public Color LeftColor
{
get { return leftColor; }
set
{
leftColor = value;
this.Invalidate();
}
}
/// <summary>
/// Initializes a new instance of the <see cref="UCPanelQuote"/> class.
/// </summary>
public UCPanelQuote()
: base()
{
Padding = new Padding(5, 1, 1, 1);
}
/// <summary>
/// 引发 <see cref="E:System.Windows.Forms.Control.Paint" /> 事件。
/// </summary>
/// <param name="e">包含事件数据的 <see cref="T:System.Windows.Forms.PaintEventArgs" />。</param>
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.SetGDIHigh();
e.Graphics.DrawLines(new Pen(borderColor), new Point[]
{
new Point(e.ClipRectangle.Left,e.ClipRectangle.Top),
new Point(e.ClipRectangle.Right-1,e.ClipRectangle.Top),
new Point(e.ClipRectangle.Right-1,e.ClipRectangle.Bottom-1),
new Point(e.ClipRectangle.Left,e.ClipRectangle.Bottom-1),
new Point(e.ClipRectangle.Left,e.ClipRectangle.Top)
});
e.Graphics.FillRectangle(new SolidBrush(leftColor), new Rectangle(0, 0, 5, this.Height));
}
}
}

View File

@@ -0,0 +1,93 @@
// ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-17-2019
//
// ***********************************************************************
// <copyright file="UCPanelTitle.Designer.cs">
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
// </copyright>
//
// Blog: https://www.cnblogs.com/bfyx
// GitHubhttps://github.com/kwwwvagaa/NetWinformControl
// giteehttps://gitee.com/kwwwvagaa/net_winform_custom_control.git
//
// If you use this code, please keep this note.
// ***********************************************************************
namespace HZH_Controls.Controls
{
/// <summary>
/// Class UCPanelTitle.
/// Implements the <see cref="HZH_Controls.Controls.UCControlBase" />
/// </summary>
/// <seealso cref="HZH_Controls.Controls.UCControlBase" />
partial class UCPanelTitle
{
/// <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.lblTitle = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblTitle
//
this.lblTitle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
this.lblTitle.Dock = System.Windows.Forms.DockStyle.Top;
this.lblTitle.ForeColor = System.Drawing.Color.White;
this.lblTitle.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblTitle.Location = new System.Drawing.Point(1, 1);
this.lblTitle.Name = "lblTitle";
this.lblTitle.Size = new System.Drawing.Size(392, 34);
this.lblTitle.TabIndex = 0;
this.lblTitle.Text = "面板";
this.lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblTitle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lblTitle_MouseDown);
//
// UCPanelTitle
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.Transparent;
this.ConerRadius = 10;
this.Controls.Add(this.lblTitle);
this.FillColor = System.Drawing.Color.White;
this.IsRadius = true;
this.IsShowRect = true;
this.Name = "UCPanelTitle";
this.Padding = new System.Windows.Forms.Padding(1);
this.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
this.Size = new System.Drawing.Size(394, 199);
this.SizeChanged += new System.EventHandler(this.UCPanelTitle_SizeChanged);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The label title
/// </summary>
private System.Windows.Forms.Label lblTitle;
}
}

View File

@@ -0,0 +1,249 @@
// ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-17-2019
//
// ***********************************************************************
// <copyright file="UCPanelTitle.cs">
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
// </copyright>
//
// Blog: https://www.cnblogs.com/bfyx
// GitHubhttps://github.com/kwwwvagaa/NetWinformControl
// giteehttps://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;
using System.Drawing.Drawing2D;
namespace HZH_Controls.Controls
{
/// <summary>
/// Class UCPanelTitle.
/// Implements the <see cref="HZH_Controls.Controls.UCControlBase" />
/// </summary>
/// <seealso cref="HZH_Controls.Controls.UCControlBase" />
public partial class UCPanelTitle : UCControlBase, IContainerControl
{
/// <summary>
/// The m int maximum height
/// </summary>
private int m_intMaxHeight = 0;
/// <summary>
/// The is can expand
/// </summary>
private bool isCanExpand = true;
/// <summary>
/// Gets or sets a value indicating whether this instance is can expand.
/// </summary>
/// <value><c>true</c> if this instance is can expand; otherwise, <c>false</c>.</value>
[Description("是否可折叠"), Category("自定义")]
public bool IsCanExpand
{
get { return isCanExpand; }
set
{
isCanExpand = value;
if (value)
{
lblTitle.Image = GetImg();
}
else
{
lblTitle.Image = null;
}
}
}
/// <summary>
/// The is expand
/// </summary>
private bool isExpand = false;
/// <summary>
/// Gets or sets a value indicating whether this instance is expand.
/// </summary>
/// <value><c>true</c> if this instance is expand; otherwise, <c>false</c>.</value>
[Description("是否已折叠"), Category("自定义")]
public bool IsExpand
{
get { return isExpand; }
set
{
isExpand = value;
if (value)
{
m_intMaxHeight = this.Height;
this.Height = lblTitle.Height;
}
else
{
this.Height = m_intMaxHeight;
}
if (isCanExpand)
{
lblTitle.Image = GetImg();
}
else
{
lblTitle.Image = null;
}
}
}
/// <summary>
/// Gets or sets the color of the border.
/// </summary>
/// <value>The color of the border.</value>
[Description("边框颜色"), Category("自定义")]
public Color BorderColor
{
get { return this.RectColor; }
set
{
this.RectColor = value;
this.lblTitle.BackColor = value;
}
}
/// <summary>
/// Gets or sets the title.
/// </summary>
/// <value>The title.</value>
[Description("面板标题"), Category("自定义")]
public string Title
{
get { return lblTitle.Text; }
set { lblTitle.Text = value; }
}
/// <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>
public override Color ForeColor
{
get
{
return this.lblTitle.ForeColor;
}
set
{
this.lblTitle.ForeColor = value;
GetImg(true);
if (isCanExpand)
{
lblTitle.Image = GetImg();
}
else
{
lblTitle.Image = null;
}
}
}
/// <summary>
/// Initializes a new instance of the <see cref="UCPanelTitle" /> class.
/// </summary>
public UCPanelTitle()
{
InitializeComponent();
this.SizeChanged += UCPanelTitle_SizeChanged;
if (isCanExpand)
{
lblTitle.Image = GetImg();
}
else
{
lblTitle.Image = null;
}
}
/// <summary>
/// The bit down
/// </summary>
Bitmap bitDown = null;
/// <summary>
/// The bit up
/// </summary>
Bitmap bitUp = null;
/// <summary>
/// Gets the img.
/// </summary>
/// <param name="blnRefresh">if set to <c>true</c> [BLN refresh].</param>
/// <returns>Bitmap.</returns>
private Bitmap GetImg(bool blnRefresh = false)
{
if (isExpand)
{
if (bitDown == null || blnRefresh)
{
bitDown = new Bitmap(24, 24);
Graphics g = Graphics.FromImage(bitDown);
g.SetGDIHigh();
GraphicsPath path = new GraphicsPath();
path.AddLine(3, 5, 21, 5);
path.AddLine(21, 5, 12, 19);
path.AddLine(12, 19, 3, 5);
g.FillPath(new SolidBrush(ForeColor), path);
g.Dispose();
}
return bitDown;
}
else
{
if (bitUp == null || blnRefresh)
{
bitUp = new Bitmap(24, 24);
Graphics g = Graphics.FromImage(bitUp);
g.SetGDIHigh();
GraphicsPath path = new GraphicsPath();
path.AddLine(3, 19, 21, 19);
path.AddLine(21, 19, 12, 5);
path.AddLine(12, 5, 3, 19);
g.FillPath(new SolidBrush(ForeColor), path);
g.Dispose();
}
return bitUp;
}
}
/// <summary>
/// Handles the MouseDown event of the lblTitle 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 lblTitle_MouseDown(object sender, MouseEventArgs e)
{
if (isCanExpand)
{
IsExpand = !IsExpand;
}
}
/// <summary>
/// Handles the SizeChanged event of the UCPanelTitle 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 UCPanelTitle_SizeChanged(object sender, EventArgs e)
{
if (this.Height != lblTitle.Height)
{
m_intMaxHeight = this.Height;
}
lblTitle.Width = this.Width;
}
}
}

View 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>