(六十)c#Winform自定义控件-鼓风机(工业)
官网
前提
入行已经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自定义控件-鼓风机(工业)的更多相关文章
- (二十六)c#Winform自定义控件-有确定取消的窗体(二)
前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...
- (八十六)c#Winform自定义控件-表格优化
出处:http://www.hzhcontrols.com/原文:http://www.hzhcontrols.com/blog-149.html本文版权归www.hzhcontrols.com所有欢 ...
- (四十六)c#Winform自定义控件-水波进度条-HZHControls
官网 http://www.hzhcontrols.com 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kww ...
- (十六)c#Winform自定义控件-文本框哪里去了?-HZHControls
官网 http://www.hzhcontrols.com 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kww ...
- (五十六)c#Winform自定义控件-瓶子(工业)-HZHControls
官网 http://www.hzhcontrols.com 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kww ...
- (七十六)c#Winform自定义控件-表单验证组件
前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kwwwvagaa/NetWinformControl 码云:ht ...
- (三十六)c#Winform自定义控件-步骤控件-HZHControls
官网 http://www.hzhcontrols.com 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kww ...
- (六)c#Winform自定义控件-单选框
前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...
- winform 自定义控件(高手)
高手推荐:https://www.cnblogs.com/bfyx/p/11364884.html c#Winform自定义控件-目录 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件 ...
随机推荐
- 阿里云Linxu下的Mysql安装与配置
说明:本文主要详细介绍了关于如何在阿里云ECS服务器上安装并配置Mysql 环境:Centos 7版本,阿里云部署好系统后会默认安装mariadb数据库 1.删除阿里云自带的MariaDB # rpm ...
- Java连载11-转义字符&整数型
一.转义符 1.\'代表单引号:\\代表\; 二.native2ascii.exe JDK中自带的native2ascii.exe命令,可以将文字转换成unicode编码形式 我们使用这个程序尝试一下 ...
- Selenium+java - Ajax浮动框处理
Ajax浮动框 我们常遇到的某些网站首页输入框,点击后显示的浮动下拉热点,如下图: 实际案例 模拟场景如下: hao123首页搜索输入框,单击搜索框,点击浮动框中的哪吒票房破30亿,单击后选项的文字内 ...
- 分享一个非常好用又好看的终端工具--Hyper (支持windows、MacOS、Linux)
分享一个非常好用又好看的终端工具--Hyper 官网地址: https://hyper.is/ 打开官网,选择对应版本安装即可:(可能网络原因,无法下载, 可以从我分享的链接下载 链接: https: ...
- (二)对象以及变量的并发访问--synchronized的使用细节,用法
具体的记录synchronized关键的各种使用方式,注意事项.感觉一步一步跟我来都可以看懂滴 大致是按照以下思路进行书写的.黑体字可以理解为结论, 1.synchronized锁的是什么? 2.sy ...
- 100天搞定机器学习|Day17-18 神奇的逻辑回归
前情回顾 机器学习100天|Day1数据预处理 100天搞定机器学习|Day2简单线性回归分析 100天搞定机器学习|Day3多元线性回归 100天搞定机器学习|Day4-6 逻辑回归 100天搞定机 ...
- Javascript十大排序算法的实现方法
上一篇中,实现了Javascript中的冒泡排序方法,下面把剩余的九种排序算法实现 选择排序: var array = []; for(var i=0;i<100000;i++){ var x ...
- 彻底搞懂Java中equals和==的区别
java当中的数据类型和“==”的含义: 1.基本数据类型(也称原始数据类型) :byte,short,char,int,long,float,double,boolean.他们之间的比较,应用双等号 ...
- Spring源码剖析开篇:什么是Spring?
在讲源码之前,先让我们回顾一下一下Spring的基本概念,当然,在看源码之前你需要使用过spring或者spirngmvc. Spring是什么 Spring是一个开源的轻量级Java SE(Java ...
- Git revert -m
这其实是个非常简单的指令,甚至用AS,直接右键操作不需要两秒钟 但今天使用命令行的方式操作的时候居然发现了点不一样的地方: 如下我希望revert某个commit,找到了它的id,跑一下命令之后居然发 ...