(六十)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年了,一直想做一套漂亮点的自定义控件 ...
随机推荐
- EditText 使用详解
极力推荐文章:欢迎收藏 Android 干货分享 本篇文章主要介绍 Android 开发中的部分知识点,通过阅读本篇文章,您将收获以下内容: 一.EditText 继承关系 二.EditText 常用 ...
- 1、JAVA的小白之路
大学的时光过得很快,转眼我已经大二了,在大一时,学习了C\C++,对于语言有一定基础,在未来的道路上,我需要攒足干劲,积累足够的知识和技能,去走上社会. 我的第一任大学班主任告诉我:“作为程序员,你至 ...
- WEB基础(二)--servlet的生命周期
Servlet的生命周期一般可以用三个方法来表示: init():仅执行一次,负责在装载Servlet时初始化Servlet对象 service() :核心方法,一般HttpServlet中会有get ...
- 超实用,Linux中查看文本的小技巧
日常开发中,我们经常需要在服务器上进行各种文本,日志的查看操作,本文主要对常用的文本,日志查看技巧进行了一番总结和归纳,方便大家收藏起来后续查看使用: tail命令查看日志信息 实时监控日志: tai ...
- 解决H5微信浏览器中audio兼容-- 背景音乐无法自动播放
我们知道,ios 在safari浏览器中,audio标签不能在没有用户交互的情况下自动播放或有js直接控制播放,这是系统限制的一些原因. 但是背景音乐在微信浏览器可以设置自动播放,config配置一下 ...
- java算法(4)---静态内部类实现雪花算法
静态内部类单例模式实现雪花算法 在生成表主键ID时,我们可以考虑主键自增 或者 UUID,但它们都有很明显的缺点 主键自增:1.自增ID容易被爬虫遍历数据.2.分表分库会有ID冲突. UUID: 1. ...
- R语言中如何找出在两个数据框中完全相同的行(How to find common rows between two dataframe in R?)
I would like to make a new data frame which only includes common rows of two separate data.frame. ex ...
- 消息中间件——RabbitMQ(五)快速入门生产者与消费者,SpringBoot整合RabbitMQ!
前言 本章我们来一次快速入门RabbitMQ--生产者与消费者.需要构建一个生产端与消费端的模型.什么意思呢?我们的生产者发送一条消息,投递到RabbitMQ集群也就是Broker. 我们的消费端进行 ...
- c语言的图形库
图形库链接http://www.easyx.cn/ 使用图形库头文件easyx.h或graphics.h 同样在里面下载图形库帮助文档进行查询 vs vc都可使用图形库 图形库窗口: initgrap ...
- Oracle 12c Adoption Discussion — Summary
Morning (@9:30) Oracle 12c Overview & Features for Developers Oracle Database In-Memory Deep Div ...