官网

http://www.hzhcontrols.com

前提

入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章。

GitHub:https://github.com/kwwwvagaa/NetWinformControl

码云:https://gitee.com/kwwwvagaa/net_winform_custom_control.git

如果觉得写的还行,请点个 star 支持一下吧

欢迎前来交流探讨: 企鹅群568015492 

麻烦博客下方点个【推荐】,谢谢

NuGet

Install-Package HZH_Controls

目录

https://www.cnblogs.com/bfyx/p/11364884.html

用处及效果

可用作水泵,风机,涡轮等

准备工作

GDI+画的,不懂的可以自行百度一下

开始

添加2个枚举,分别控制进出风口的位置

   /// <summary>
/// Enum BlowerEntranceDirection
/// </summary>
public enum BlowerEntranceDirection
{
/// <summary>
/// The none
/// </summary>
None,
/// <summary>
/// The left
/// </summary>
Left,
/// <summary>
/// The right
/// </summary>
Right,
/// <summary>
/// Up
/// </summary>
Up
} /// <summary>
/// Enum BlowerExitDirection
/// </summary>
public enum BlowerExitDirection
{
/// <summary>
/// The left
/// </summary>
Left,
/// <summary>
/// The right
/// </summary>
Right,
/// <summary>
/// Up
/// </summary>
Up
}

属性

  /// <summary>
/// The entrance direction
/// </summary>
private BlowerEntranceDirection entranceDirection = BlowerEntranceDirection.None; /// <summary>
/// Gets or sets the entrance direction.
/// </summary>
/// <value>The entrance direction.</value>
[Description("入口方向"), Category("自定义")]
public BlowerEntranceDirection EntranceDirection
{
get { return entranceDirection; }
set
{
entranceDirection = value;
Refresh();
}
} /// <summary>
/// The exit direction
/// </summary>
private BlowerExitDirection exitDirection = BlowerExitDirection.Right; /// <summary>
/// Gets or sets the exit direction.
/// </summary>
/// <value>The exit direction.</value>
[Description("出口方向"), Category("自定义")]
public BlowerExitDirection ExitDirection
{
get { return exitDirection; }
set
{
exitDirection = value;
Refresh();
}
} /// <summary>
/// The blower color
/// </summary>
private Color blowerColor = Color.FromArgb(, , ); /// <summary>
/// Gets or sets the color of the blower.
/// </summary>
/// <value>The color of the blower.</value>
[Description("风机颜色"), Category("自定义")]
public Color BlowerColor
{
get { return blowerColor; }
set
{
blowerColor = value;
Refresh();
}
} /// <summary>
/// The fan color
/// </summary>
private Color fanColor = Color.FromArgb(, , ); /// <summary>
/// Gets or sets the color of the fan.
/// </summary>
/// <value>The color of the fan.</value>
[Description("风叶颜色"), Category("自定义")]
public Color FanColor
{
get { return fanColor; }
set
{
fanColor = value;
Refresh();
}
} /// <summary>
/// The m rect working
/// </summary>
Rectangle m_rectWorking;

重绘

 protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
var g = e.Graphics;
g.SetGDIHigh();
GraphicsPath pathLineIn = new GraphicsPath();
GraphicsPath pathLineOut = new GraphicsPath();
int intLinePenWidth = ; switch (exitDirection)
{
case BlowerExitDirection.Left:
g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(, m_rectWorking.Top, this.Width / , m_rectWorking.Height / - ));
intLinePenWidth = m_rectWorking.Height / - ;
pathLineOut.AddLine(new Point(-, m_rectWorking.Top + (m_rectWorking.Height / - ) / ), new Point(m_rectWorking.Left + m_rectWorking.Width / , m_rectWorking.Top + (m_rectWorking.Height / - ) / ));
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(, m_rectWorking.Top - ), new Point(, m_rectWorking.Top + (m_rectWorking.Height / - ) + ));
break;
case BlowerExitDirection.Right:
g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(this.Width / , m_rectWorking.Top, this.Width / , m_rectWorking.Height / - ));
intLinePenWidth = m_rectWorking.Height / - ;
pathLineOut.AddLine(new Point(this.Width + , m_rectWorking.Top + (m_rectWorking.Height / - ) / ), new Point(m_rectWorking.Left + m_rectWorking.Width / , m_rectWorking.Top + (m_rectWorking.Height / - ) / ));
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(this.Width - , m_rectWorking.Top - ), new Point(this.Width - , m_rectWorking.Top + (m_rectWorking.Height / - ) + ));
break;
case BlowerExitDirection.Up:
g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(m_rectWorking.Right - (m_rectWorking.Width / - ), , m_rectWorking.Width / - , this.Height / ));
intLinePenWidth = m_rectWorking.Width / - ;
pathLineOut.AddLine(new Point(m_rectWorking.Right - (m_rectWorking.Width / - ) / , -), new Point(m_rectWorking.Right - (m_rectWorking.Width / - ) / , m_rectWorking.Top + m_rectWorking.Height / ));
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(m_rectWorking.Right + , ), new Point(m_rectWorking.Right - (m_rectWorking.Width / - ) - , ));
break;
} switch (entranceDirection)
{
case BlowerEntranceDirection.Left:
g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(, m_rectWorking.Bottom - m_rectWorking.Height / + , this.Width / , m_rectWorking.Height / - ));
pathLineIn.AddLine(new Point(-, m_rectWorking.Bottom - m_rectWorking.Height / + + (m_rectWorking.Height / - ) / ), new Point(m_rectWorking.Left + m_rectWorking.Width / , m_rectWorking.Bottom - m_rectWorking.Height / + + (m_rectWorking.Height / - ) / ));
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(, m_rectWorking.Bottom - m_rectWorking.Height / + - ), new Point(, m_rectWorking.Bottom - m_rectWorking.Height / + + (m_rectWorking.Height / - ) + ));
break;
case BlowerEntranceDirection.Right:
g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(this.Width / , m_rectWorking.Bottom - m_rectWorking.Height / + , this.Width / , m_rectWorking.Height / - ));
pathLineIn.AddLine(new Point(this.Width + , m_rectWorking.Bottom - m_rectWorking.Height / + + (m_rectWorking.Height / - ) / ), new Point(m_rectWorking.Left + m_rectWorking.Width / , m_rectWorking.Bottom - m_rectWorking.Height / + + (m_rectWorking.Height / - ) / ));
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(this.Width - , m_rectWorking.Bottom - m_rectWorking.Height / + - ), new Point(this.Width - , m_rectWorking.Bottom - m_rectWorking.Height / + + (m_rectWorking.Height / - ) + ));
break;
case BlowerEntranceDirection.Up:
g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(m_rectWorking.Left, , m_rectWorking.Width / - , this.Height / ));
pathLineIn.AddLine(new Point(m_rectWorking.Left + (m_rectWorking.Width / - ) / , -), new Point(m_rectWorking.Left + (m_rectWorking.Width / - ) / , m_rectWorking.Top + m_rectWorking.Height / ));
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(m_rectWorking.Left - , ), new Point(m_rectWorking.Left + (m_rectWorking.Width / - ) + , ));
break;
} //渐变色
int _intPenWidth = intLinePenWidth;
int intCount = _intPenWidth / / ;
for (int i = ; i < intCount; i++)
{
int _penWidth = _intPenWidth / - * i;
if (_penWidth <= )
_penWidth = ;
if (entranceDirection != BlowerEntranceDirection.None)
g.DrawPath(new Pen(new SolidBrush(Color.FromArgb(, Color.White.R, Color.White.G, Color.White.B)), _penWidth), pathLineIn);
g.DrawPath(new Pen(new SolidBrush(Color.FromArgb(, Color.White.R, Color.White.G, Color.White.B)), _penWidth), pathLineOut);
if (_penWidth == )
break;
} //底座
GraphicsPath gpDZ = new GraphicsPath();
gpDZ.AddLines(new Point[]
{
new Point( m_rectWorking.Left+m_rectWorking.Width/,m_rectWorking.Top+m_rectWorking.Height/),
new Point(m_rectWorking.Left+,this.Height),
new Point(m_rectWorking.Right-,this.Height)
});
gpDZ.CloseAllFigures();
g.FillPath(new SolidBrush(blowerColor), gpDZ);
g.FillPath(new SolidBrush(Color.FromArgb(, Color.White)), gpDZ);
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(m_rectWorking.Left, this.Height - ), new Point(m_rectWorking.Right, this.Height - )); //中心
g.FillEllipse(new SolidBrush(blowerColor), m_rectWorking);
g.FillEllipse(new SolidBrush(Color.FromArgb(, Color.White)), m_rectWorking); //扇叶
Rectangle _rect = new Rectangle(m_rectWorking.Left + (m_rectWorking.Width - (m_rectWorking.Width / * )) / , m_rectWorking.Top + (m_rectWorking.Height - (m_rectWorking.Width / * )) / , (m_rectWorking.Width / * ), (m_rectWorking.Width / * )); int _splitCount = ;
float fltSplitValue = 360F / (float)_splitCount;
for (int i = ; i <= _splitCount; i++)
{
float fltAngle = (fltSplitValue * i - ) % ;
float fltY1 = (float)(_rect.Top + _rect.Width / - ((_rect.Width / ) * Math.Sin(Math.PI * (fltAngle / 180.00F))));
float fltX1 = (float)(_rect.Left + (_rect.Width / - ((_rect.Width / ) * Math.Cos(Math.PI * (fltAngle / 180.00F)))));
float fltY2 = ;
float fltX2 = ; fltY2 = (float)(_rect.Top + _rect.Width / - ((_rect.Width / ) * Math.Sin(Math.PI * (fltAngle / 180.00F))));
fltX2 = (float)(_rect.Left + (_rect.Width / - ((_rect.Width / ) * Math.Cos(Math.PI * (fltAngle / 180.00F))))); g.DrawLine(new Pen(new SolidBrush(fanColor), ), new PointF(fltX1, fltY1), new PointF(fltX2, fltY2));
} g.FillEllipse(new SolidBrush(fanColor), new Rectangle(_rect.Left + _rect.Width / - _rect.Width / + , _rect.Top + _rect.Width / - _rect.Width / + , _rect.Width / - , _rect.Width / - ));
g.FillEllipse(new SolidBrush(Color.FromArgb(, Color.White)), new Rectangle(_rect.Left - , _rect.Top - , _rect.Width + , _rect.Height + ));
}

全部代码

 // ***********************************************************************
// Assembly : HZH_Controls
// Created : 2019-09-09
//
// ***********************************************************************
// <copyright file="UCBlower.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.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.ComponentModel; namespace HZH_Controls.Controls
{
/// <summary>
/// Class UCBlower.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public class UCBlower : UserControl
{
/// <summary>
/// The entrance direction
/// </summary>
private BlowerEntranceDirection entranceDirection = BlowerEntranceDirection.None; /// <summary>
/// Gets or sets the entrance direction.
/// </summary>
/// <value>The entrance direction.</value>
[Description("入口方向"), Category("自定义")]
public BlowerEntranceDirection EntranceDirection
{
get { return entranceDirection; }
set
{
entranceDirection = value;
Refresh();
}
} /// <summary>
/// The exit direction
/// </summary>
private BlowerExitDirection exitDirection = BlowerExitDirection.Right; /// <summary>
/// Gets or sets the exit direction.
/// </summary>
/// <value>The exit direction.</value>
[Description("出口方向"), Category("自定义")]
public BlowerExitDirection ExitDirection
{
get { return exitDirection; }
set
{
exitDirection = value;
Refresh();
}
} /// <summary>
/// The blower color
/// </summary>
private Color blowerColor = Color.FromArgb(, , ); /// <summary>
/// Gets or sets the color of the blower.
/// </summary>
/// <value>The color of the blower.</value>
[Description("风机颜色"), Category("自定义")]
public Color BlowerColor
{
get { return blowerColor; }
set
{
blowerColor = value;
Refresh();
}
} /// <summary>
/// The fan color
/// </summary>
private Color fanColor = Color.FromArgb(, , ); /// <summary>
/// Gets or sets the color of the fan.
/// </summary>
/// <value>The color of the fan.</value>
[Description("风叶颜色"), Category("自定义")]
public Color FanColor
{
get { return fanColor; }
set
{
fanColor = value;
Refresh();
}
} /// <summary>
/// The m rect working
/// </summary>
Rectangle m_rectWorking; /// <summary>
/// Initializes a new instance of the <see cref="UCBlower"/> class.
/// </summary>
public UCBlower()
{
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.DoubleBuffer, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(ControlStyles.Selectable, true);
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.SetStyle(ControlStyles.UserPaint, true);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.SizeChanged += UCBlower_SizeChanged;
this.Size = new Size(, ); } /// <summary>
/// Handles the SizeChanged event of the UCBlower control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
void UCBlower_SizeChanged(object sender, EventArgs e)
{
int intMin = Math.Min(this.Width, this.Height);
m_rectWorking = new Rectangle((this.Width - (intMin / * )) / , (this.Height - (intMin / * )) / , (intMin / * ), (intMin / * ));
} /// <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);
var g = e.Graphics;
g.SetGDIHigh();
GraphicsPath pathLineIn = new GraphicsPath();
GraphicsPath pathLineOut = new GraphicsPath();
int intLinePenWidth = ; switch (exitDirection)
{
case BlowerExitDirection.Left:
g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(, m_rectWorking.Top, this.Width / , m_rectWorking.Height / - ));
intLinePenWidth = m_rectWorking.Height / - ;
pathLineOut.AddLine(new Point(-, m_rectWorking.Top + (m_rectWorking.Height / - ) / ), new Point(m_rectWorking.Left + m_rectWorking.Width / , m_rectWorking.Top + (m_rectWorking.Height / - ) / ));
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(, m_rectWorking.Top - ), new Point(, m_rectWorking.Top + (m_rectWorking.Height / - ) + ));
break;
case BlowerExitDirection.Right:
g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(this.Width / , m_rectWorking.Top, this.Width / , m_rectWorking.Height / - ));
intLinePenWidth = m_rectWorking.Height / - ;
pathLineOut.AddLine(new Point(this.Width + , m_rectWorking.Top + (m_rectWorking.Height / - ) / ), new Point(m_rectWorking.Left + m_rectWorking.Width / , m_rectWorking.Top + (m_rectWorking.Height / - ) / ));
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(this.Width - , m_rectWorking.Top - ), new Point(this.Width - , m_rectWorking.Top + (m_rectWorking.Height / - ) + ));
break;
case BlowerExitDirection.Up:
g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(m_rectWorking.Right - (m_rectWorking.Width / - ), , m_rectWorking.Width / - , this.Height / ));
intLinePenWidth = m_rectWorking.Width / - ;
pathLineOut.AddLine(new Point(m_rectWorking.Right - (m_rectWorking.Width / - ) / , -), new Point(m_rectWorking.Right - (m_rectWorking.Width / - ) / , m_rectWorking.Top + m_rectWorking.Height / ));
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(m_rectWorking.Right + , ), new Point(m_rectWorking.Right - (m_rectWorking.Width / - ) - , ));
break;
} switch (entranceDirection)
{
case BlowerEntranceDirection.Left:
g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(, m_rectWorking.Bottom - m_rectWorking.Height / + , this.Width / , m_rectWorking.Height / - ));
pathLineIn.AddLine(new Point(-, m_rectWorking.Bottom - m_rectWorking.Height / + + (m_rectWorking.Height / - ) / ), new Point(m_rectWorking.Left + m_rectWorking.Width / , m_rectWorking.Bottom - m_rectWorking.Height / + + (m_rectWorking.Height / - ) / ));
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(, m_rectWorking.Bottom - m_rectWorking.Height / + - ), new Point(, m_rectWorking.Bottom - m_rectWorking.Height / + + (m_rectWorking.Height / - ) + ));
break;
case BlowerEntranceDirection.Right:
g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(this.Width / , m_rectWorking.Bottom - m_rectWorking.Height / + , this.Width / , m_rectWorking.Height / - ));
pathLineIn.AddLine(new Point(this.Width + , m_rectWorking.Bottom - m_rectWorking.Height / + + (m_rectWorking.Height / - ) / ), new Point(m_rectWorking.Left + m_rectWorking.Width / , m_rectWorking.Bottom - m_rectWorking.Height / + + (m_rectWorking.Height / - ) / ));
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(this.Width - , m_rectWorking.Bottom - m_rectWorking.Height / + - ), new Point(this.Width - , m_rectWorking.Bottom - m_rectWorking.Height / + + (m_rectWorking.Height / - ) + ));
break;
case BlowerEntranceDirection.Up:
g.FillRectangle(new SolidBrush(blowerColor), new Rectangle(m_rectWorking.Left, , m_rectWorking.Width / - , this.Height / ));
pathLineIn.AddLine(new Point(m_rectWorking.Left + (m_rectWorking.Width / - ) / , -), new Point(m_rectWorking.Left + (m_rectWorking.Width / - ) / , m_rectWorking.Top + m_rectWorking.Height / ));
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(m_rectWorking.Left - , ), new Point(m_rectWorking.Left + (m_rectWorking.Width / - ) + , ));
break;
} //渐变色
int _intPenWidth = intLinePenWidth;
int intCount = _intPenWidth / / ;
for (int i = ; i < intCount; i++)
{
int _penWidth = _intPenWidth / - * i;
if (_penWidth <= )
_penWidth = ;
if (entranceDirection != BlowerEntranceDirection.None)
g.DrawPath(new Pen(new SolidBrush(Color.FromArgb(, Color.White.R, Color.White.G, Color.White.B)), _penWidth), pathLineIn);
g.DrawPath(new Pen(new SolidBrush(Color.FromArgb(, Color.White.R, Color.White.G, Color.White.B)), _penWidth), pathLineOut);
if (_penWidth == )
break;
} //底座
GraphicsPath gpDZ = new GraphicsPath();
gpDZ.AddLines(new Point[]
{
new Point( m_rectWorking.Left+m_rectWorking.Width/,m_rectWorking.Top+m_rectWorking.Height/),
new Point(m_rectWorking.Left+,this.Height),
new Point(m_rectWorking.Right-,this.Height)
});
gpDZ.CloseAllFigures();
g.FillPath(new SolidBrush(blowerColor), gpDZ);
g.FillPath(new SolidBrush(Color.FromArgb(, Color.White)), gpDZ);
g.DrawLine(new Pen(new SolidBrush(blowerColor), ), new Point(m_rectWorking.Left, this.Height - ), new Point(m_rectWorking.Right, this.Height - )); //中心
g.FillEllipse(new SolidBrush(blowerColor), m_rectWorking);
g.FillEllipse(new SolidBrush(Color.FromArgb(, Color.White)), m_rectWorking); //扇叶
Rectangle _rect = new Rectangle(m_rectWorking.Left + (m_rectWorking.Width - (m_rectWorking.Width / * )) / , m_rectWorking.Top + (m_rectWorking.Height - (m_rectWorking.Width / * )) / , (m_rectWorking.Width / * ), (m_rectWorking.Width / * )); int _splitCount = ;
float fltSplitValue = 360F / (float)_splitCount;
for (int i = ; i <= _splitCount; i++)
{
float fltAngle = (fltSplitValue * i - ) % ;
float fltY1 = (float)(_rect.Top + _rect.Width / - ((_rect.Width / ) * Math.Sin(Math.PI * (fltAngle / 180.00F))));
float fltX1 = (float)(_rect.Left + (_rect.Width / - ((_rect.Width / ) * Math.Cos(Math.PI * (fltAngle / 180.00F)))));
float fltY2 = ;
float fltX2 = ; fltY2 = (float)(_rect.Top + _rect.Width / - ((_rect.Width / ) * Math.Sin(Math.PI * (fltAngle / 180.00F))));
fltX2 = (float)(_rect.Left + (_rect.Width / - ((_rect.Width / ) * Math.Cos(Math.PI * (fltAngle / 180.00F))))); g.DrawLine(new Pen(new SolidBrush(fanColor), ), new PointF(fltX1, fltY1), new PointF(fltX2, fltY2));
} g.FillEllipse(new SolidBrush(fanColor), new Rectangle(_rect.Left + _rect.Width / - _rect.Width / + , _rect.Top + _rect.Width / - _rect.Width / + , _rect.Width / - , _rect.Width / - ));
g.FillEllipse(new SolidBrush(Color.FromArgb(, Color.White)), new Rectangle(_rect.Left - , _rect.Top - , _rect.Width + , _rect.Height + ));
}
}
/// <summary>
/// Enum BlowerEntranceDirection
/// </summary>
public enum BlowerEntranceDirection
{
/// <summary>
/// The none
/// </summary>
None,
/// <summary>
/// The left
/// </summary>
Left,
/// <summary>
/// The right
/// </summary>
Right,
/// <summary>
/// Up
/// </summary>
Up
} /// <summary>
/// Enum BlowerExitDirection
/// </summary>
public enum BlowerExitDirection
{
/// <summary>
/// The left
/// </summary>
Left,
/// <summary>
/// The right
/// </summary>
Right,
/// <summary>
/// Up
/// </summary>
Up
}
}

添加一个类UCBlower ,继承UserControl

最后的话

如果你喜欢的话,请到 https://gitee.com/kwwwvagaa/net_winform_custom_control 点个星星吧

(六十)c#Winform自定义控件-鼓风机(工业)的更多相关文章

  1. (二十六)c#Winform自定义控件-有确定取消的窗体(二)

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

  2. (八十六)c#Winform自定义控件-表格优化

    出处:http://www.hzhcontrols.com/原文:http://www.hzhcontrols.com/blog-149.html本文版权归www.hzhcontrols.com所有欢 ...

  3. (四十六)c#Winform自定义控件-水波进度条-HZHControls

    官网 http://www.hzhcontrols.com 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kww ...

  4. (十六)c#Winform自定义控件-文本框哪里去了?-HZHControls

    官网 http://www.hzhcontrols.com 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kww ...

  5. (五十六)c#Winform自定义控件-瓶子(工业)-HZHControls

    官网 http://www.hzhcontrols.com 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kww ...

  6. (七十六)c#Winform自定义控件-表单验证组件

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kwwwvagaa/NetWinformControl 码云:ht ...

  7. (三十六)c#Winform自定义控件-步骤控件-HZHControls

    官网 http://www.hzhcontrols.com 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kww ...

  8. (六)c#Winform自定义控件-单选框

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

  9. winform 自定义控件(高手)

    高手推荐:https://www.cnblogs.com/bfyx/p/11364884.html   c#Winform自定义控件-目录   前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件 ...

随机推荐

  1. java8中用流收集数据

    用流收集数据 汇总 long howManyDishes = menu.stream().collect(Collectors.counting()); int totalCalories = men ...

  2. 夯实Java基础(二)——面向对象之封装

    1.封装介绍 封装封装,见名知意,就是把东西包装隐藏起来,不被外界所看见, 而Java特性封装:是指利用抽象数据类型将数据和基于数据的操作封装在一起,使其构成一个不可分割的独立实体,数据被保护在抽象数 ...

  3. 对API进行版本控制的重要性和实现方式

    我在API设计中收到的最常见问题之一就是如何对API进行版本控制.虽然并非所有API都完全相同,但我发现在API版本控制方面,某些模式和实践适用于大多数团队.我已经将这些内容收集起来,下面将提供一些关 ...

  4. IdentityServer4笔记整理(更新中)

    1 OAuth 2.0 1.1 OAuth 2.0协议流程图 1.2 授权码模式 1.3 简化模式 1.4 资源所有者密码模式 1.5 客户端凭证模式 2 OpenID Connect(OIDC) 2 ...

  5. Go中的并发编程和goroutine

    并发编程对于任何语言来说都不是一件简单的事情.Go在设计之初主打高并发,为使用者提供了goroutine,使用的方式虽然简单,但是用好却不是那么容易,我们一起来学习Go中的并发编程. 1. 并行和并发 ...

  6. Java学习|强引用,软引用,弱引用,幻想引用有什么区别?

    在Java语言中,除了基本数据类型外,其他的都是指向各类对象的对象引用:Java中根据其生命周期的长短,将引用分为4类. 1 强引用 特点:我们平常典型编码Object obj = new Objec ...

  7. Docker入门-搭建docker私有仓库

    Docker Hub 目前Docker官方维护了一个公共仓库Docker Hub,其中已经包括了数量超过15000个镜像.大部分需求都可以通过在Docker Hub中直接下载镜像来使用. 注册登录 可 ...

  8. J.U.C并发包(1)

    J.U.C并发包(1) AbstractQueuedSynchronizer AbstractQueuedSynchronizer是JUC并发包中锁的底层支持,AbstractQueuedSynchr ...

  9. NOIP前的模板复习和注意事项

    联赛除去今天刚好只有一个星期了,最后一个星期也很关键,要吃好睡好保持心情愉悦.当然也免不了最后的复习计划. 首先是模板,之前还有很多模板没有复习到,这些东西是一定要落实到位的. 每天往后面写一点... ...

  10. VR、AR、MR、CR 与 AI与SaaS、CRM、MRP与B2B、B2C、C2C、O2O、P2P

    一.VR.AR.MR.CR  VR ( Virtual Reality ),虚拟现实 AR(Augmented Reality),增强现实 MR(Mix Reality),混合现实 CR(Cinema ...