官网

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+  不了解请先百度一下

开始

添加一个类UCBottle,继承UserControl

添加几个控制属性

 //瓶身区域
/// <summary>
/// The m working rect
/// </summary>
Rectangle m_workingRect; /// <summary>
/// The title
/// </summary>
string title = "瓶子1"; /// <summary>
/// Gets or sets the title.
/// </summary>
/// <value>The title.</value>
[Description("标题"), Category("自定义")]
public string Title
{
get { return title; }
set
{
title = value;
ResetWorkingRect();
Refresh();
}
} /// <summary>
/// The bottle color
/// </summary>
private Color bottleColor = Color.FromArgb(, , ); /// <summary>
/// Gets or sets the color of the bottle.
/// </summary>
/// <value>The color of the bottle.</value>
[Description("瓶子颜色"), Category("自定义")]
public Color BottleColor
{
get { return bottleColor; }
set
{
bottleColor = value;
Refresh();
}
} /// <summary>
/// The bottle mouth color
/// </summary>
private Color bottleMouthColor = Color.FromArgb(, , ); /// <summary>
/// Gets or sets the color of the bottle mouth.
/// </summary>
/// <value>The color of the bottle mouth.</value>
[Description("瓶口颜色"), Category("自定义")]
public Color BottleMouthColor
{
get { return bottleMouthColor; }
set { bottleMouthColor = value; }
} /// <summary>
/// The liquid color
/// </summary>
private Color liquidColor = Color.FromArgb(, , ); /// <summary>
/// Gets or sets the color of the liquid.
/// </summary>
/// <value>The color of the liquid.</value>
[Description("液体颜色"), Category("自定义")]
public Color LiquidColor
{
get { return liquidColor; }
set
{
liquidColor = value;
Refresh();
}
} /// <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 override Font Font
{
get
{
return base.Font;
}
set
{
base.Font = value;
ResetWorkingRect();
Refresh();
}
} /// <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 override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
Refresh();
}
} /// <summary>
/// The maximum value
/// </summary>
private decimal maxValue = ; /// <summary>
/// Gets or sets the maximum value.
/// </summary>
/// <value>The maximum value.</value>
[Description("最大值"), Category("自定义")]
public decimal MaxValue
{
get { return maxValue; }
set
{
if (value < m_value)
return;
maxValue = value;
Refresh();
}
} /// <summary>
/// The m value
/// </summary>
private decimal m_value = ; /// <summary>
/// Gets or sets the value.
/// </summary>
/// <value>The value.</value>
[Description("值"), Category("自定义")]
public decimal Value
{
get { return m_value; }
set
{
if (value <= || value > maxValue)
return;
m_value = value;
Refresh();
}
} /// <summary>
/// The m no
/// </summary>
private string m_NO;
/// <summary>
/// Gets or sets the NO.
/// </summary>
/// <value>The no.</value>
[Description("编号"), Category("自定义")]
public string NO
{
get { return m_NO; }
set
{
m_NO = value;
Refresh();
}
}

重绘

  protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
var g = e.Graphics;
g.SetGDIHigh();
//写文字
var size = g.MeasureString(title, Font);
g.DrawString(title, Font, new SolidBrush(ForeColor), new PointF((this.Width - size.Width) / , )); //画空瓶子
GraphicsPath pathPS = new GraphicsPath();
Point[] psPS = new Point[]
{
new Point(m_workingRect.Left, m_workingRect.Top),
new Point(m_workingRect.Right - , m_workingRect.Top),
new Point(m_workingRect.Right - , m_workingRect.Bottom - ),
new Point(m_workingRect.Right - - m_workingRect.Width / , m_workingRect.Bottom),
new Point(m_workingRect.Left + m_workingRect.Width / , m_workingRect.Bottom),
new Point(m_workingRect.Left, m_workingRect.Bottom - ),
};
pathPS.AddLines(psPS);
pathPS.CloseAllFigures();
g.FillPath(new SolidBrush(bottleColor), pathPS);
//画液体
decimal decYTHeight = (m_value / maxValue) * m_workingRect.Height;
GraphicsPath pathYT = new GraphicsPath();
Rectangle rectYT = Rectangle.Empty;
if (decYTHeight < )
{
PointF[] psYT = new PointF[]
{
new PointF((float)(m_workingRect.Left+(-decYTHeight))+,(float)(m_workingRect.Bottom-decYTHeight)),
new PointF((float)(m_workingRect.Right-(-decYTHeight))-,(float)(m_workingRect.Bottom-decYTHeight)),
new PointF(m_workingRect.Right--m_workingRect.Width/, m_workingRect.Bottom),
new PointF(m_workingRect.Left+m_workingRect.Width/, m_workingRect.Bottom),
};
pathYT.AddLines(psYT);
pathYT.CloseAllFigures();
rectYT = new Rectangle((m_workingRect.Left + ( - (int)decYTHeight)) + , m_workingRect.Bottom - (int)decYTHeight - , m_workingRect.Width - (int)( - decYTHeight) * - , );
}
else
{
PointF[] psYT = new PointF[]
{
new PointF(m_workingRect.Left,(float)(m_workingRect.Bottom-decYTHeight)),
new PointF(m_workingRect.Right-,(float)(m_workingRect.Bottom-decYTHeight)),
new PointF(m_workingRect.Right-,m_workingRect.Bottom-),
new PointF(m_workingRect.Right--m_workingRect.Width/, m_workingRect.Bottom),
new PointF(m_workingRect.Left+m_workingRect.Width/, m_workingRect.Bottom),
new PointF(m_workingRect.Left,m_workingRect.Bottom-),
};
pathYT.AddLines(psYT);
pathYT.CloseAllFigures();
rectYT = new Rectangle(m_workingRect.Left, m_workingRect.Bottom - (int)decYTHeight - , m_workingRect.Width, );
} g.FillPath(new SolidBrush(liquidColor), pathYT);
g.FillPath(new SolidBrush(Color.FromArgb(, bottleMouthColor)), pathYT);
//画液体面
g.FillEllipse(new SolidBrush(liquidColor), rectYT);
g.FillEllipse(new SolidBrush(Color.FromArgb(, Color.White)), rectYT); //画高亮
int intCount = m_workingRect.Width / / ;
int intSplit = ( - ) / intCount;
for (int i = ; i < intCount; i++)
{
int _penWidth = m_workingRect.Width / - * i;
if (_penWidth <= )
_penWidth = ;
g.DrawLine(new Pen(new SolidBrush(Color.FromArgb(, Color.White)), _penWidth), new Point(m_workingRect.Width / , m_workingRect.Top), new Point(m_workingRect.Width / , m_workingRect.Bottom - ));
if (_penWidth == )
break;
} //画瓶底
g.FillEllipse(new SolidBrush(bottleColor), new RectangleF(m_workingRect.Left, m_workingRect.Top - , m_workingRect.Width - , ));
g.FillEllipse(new SolidBrush(Color.FromArgb(, Color.White)), new RectangleF(m_workingRect.Left, m_workingRect.Top - , m_workingRect.Width - , ));
//画瓶口
g.FillRectangle(new SolidBrush(bottleMouthColor), new Rectangle(m_workingRect.Left + m_workingRect.Width / , m_workingRect.Bottom, m_workingRect.Width / , ));
//画瓶颈阴影
GraphicsPath pathPJ = new GraphicsPath();
Point[] psPJ = new Point[]
{
new Point(m_workingRect.Left, m_workingRect.Bottom-),
new Point(m_workingRect.Right-, m_workingRect.Bottom-),
new Point(m_workingRect.Right--m_workingRect.Width/, m_workingRect.Bottom),
new Point(m_workingRect.Left+m_workingRect.Width/, m_workingRect.Bottom)
};
pathPJ.AddLines(psPJ);
pathPJ.CloseAllFigures();
g.FillPath(new SolidBrush(Color.FromArgb(, bottleMouthColor)), pathPJ); //写编号
if (!string.IsNullOrEmpty(m_NO))
{
var nosize = g.MeasureString(m_NO, Font);
g.DrawString(m_NO, Font, new SolidBrush(ForeColor), new PointF((this.Width - nosize.Width) / , m_workingRect.Top + ));
}
}

代码就这么多

完整代码

 // ***********************************************************************
// Assembly : HZH_Controls
// Created : 2019-09-05
//
// ***********************************************************************
// <copyright file="UCBottle.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 UCBottle.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public class UCBottle : UserControl
{
//瓶身区域
/// <summary>
/// The m working rect
/// </summary>
Rectangle m_workingRect; /// <summary>
/// The title
/// </summary>
string title = "瓶子1"; /// <summary>
/// Gets or sets the title.
/// </summary>
/// <value>The title.</value>
[Description("标题"), Category("自定义")]
public string Title
{
get { return title; }
set
{
title = value;
ResetWorkingRect();
Refresh();
}
} /// <summary>
/// The bottle color
/// </summary>
private Color bottleColor = Color.FromArgb(, , ); /// <summary>
/// Gets or sets the color of the bottle.
/// </summary>
/// <value>The color of the bottle.</value>
[Description("瓶子颜色"), Category("自定义")]
public Color BottleColor
{
get { return bottleColor; }
set
{
bottleColor = value;
Refresh();
}
} /// <summary>
/// The bottle mouth color
/// </summary>
private Color bottleMouthColor = Color.FromArgb(, , ); /// <summary>
/// Gets or sets the color of the bottle mouth.
/// </summary>
/// <value>The color of the bottle mouth.</value>
[Description("瓶口颜色"), Category("自定义")]
public Color BottleMouthColor
{
get { return bottleMouthColor; }
set { bottleMouthColor = value; }
} /// <summary>
/// The liquid color
/// </summary>
private Color liquidColor = Color.FromArgb(, , ); /// <summary>
/// Gets or sets the color of the liquid.
/// </summary>
/// <value>The color of the liquid.</value>
[Description("液体颜色"), Category("自定义")]
public Color LiquidColor
{
get { return liquidColor; }
set
{
liquidColor = value;
Refresh();
}
} /// <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 override Font Font
{
get
{
return base.Font;
}
set
{
base.Font = value;
ResetWorkingRect();
Refresh();
}
} /// <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 override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
Refresh();
}
} /// <summary>
/// The maximum value
/// </summary>
private decimal maxValue = ; /// <summary>
/// Gets or sets the maximum value.
/// </summary>
/// <value>The maximum value.</value>
[Description("最大值"), Category("自定义")]
public decimal MaxValue
{
get { return maxValue; }
set
{
if (value < m_value)
return;
maxValue = value;
Refresh();
}
} /// <summary>
/// The m value
/// </summary>
private decimal m_value = ; /// <summary>
/// Gets or sets the value.
/// </summary>
/// <value>The value.</value>
[Description("值"), Category("自定义")]
public decimal Value
{
get { return m_value; }
set
{
if (value <= || value > maxValue)
return;
m_value = value;
Refresh();
}
} /// <summary>
/// The m no
/// </summary>
private string m_NO;
/// <summary>
/// Gets or sets the NO.
/// </summary>
/// <value>The no.</value>
[Description("编号"), Category("自定义")]
public string NO
{
get { return m_NO; }
set
{
m_NO = value;
Refresh();
}
} /// <summary>
/// Initializes a new instance of the <see cref="UCBottle" /> class.
/// </summary>
public UCBottle()
{
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 += UCBottle_SizeChanged;
this.Size = new Size(, );
} /// <summary>
/// Handles the SizeChanged event of the UCBottle 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 UCBottle_SizeChanged(object sender, EventArgs e)
{
ResetWorkingRect();
} /// <summary>
/// Resets the working rect.
/// </summary>
private void ResetWorkingRect()
{
var g = this.CreateGraphics();
var size = g.MeasureString(title, Font);
m_workingRect = new Rectangle(, (int)size.Height + , this.Width, this.Height - ((int)size.Height + ) - );
} /// <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();
//写文字
var size = g.MeasureString(title, Font);
g.DrawString(title, Font, new SolidBrush(ForeColor), new PointF((this.Width - size.Width) / , )); //画空瓶子
GraphicsPath pathPS = new GraphicsPath();
Point[] psPS = new Point[]
{
new Point(m_workingRect.Left, m_workingRect.Top),
new Point(m_workingRect.Right - , m_workingRect.Top),
new Point(m_workingRect.Right - , m_workingRect.Bottom - ),
new Point(m_workingRect.Right - - m_workingRect.Width / , m_workingRect.Bottom),
new Point(m_workingRect.Left + m_workingRect.Width / , m_workingRect.Bottom),
new Point(m_workingRect.Left, m_workingRect.Bottom - ),
};
pathPS.AddLines(psPS);
pathPS.CloseAllFigures();
g.FillPath(new SolidBrush(bottleColor), pathPS);
//画液体
decimal decYTHeight = (m_value / maxValue) * m_workingRect.Height;
GraphicsPath pathYT = new GraphicsPath();
Rectangle rectYT = Rectangle.Empty;
if (decYTHeight < )
{
PointF[] psYT = new PointF[]
{
new PointF((float)(m_workingRect.Left+(-decYTHeight))+,(float)(m_workingRect.Bottom-decYTHeight)),
new PointF((float)(m_workingRect.Right-(-decYTHeight))-,(float)(m_workingRect.Bottom-decYTHeight)),
new PointF(m_workingRect.Right--m_workingRect.Width/, m_workingRect.Bottom),
new PointF(m_workingRect.Left+m_workingRect.Width/, m_workingRect.Bottom),
};
pathYT.AddLines(psYT);
pathYT.CloseAllFigures();
rectYT = new Rectangle((m_workingRect.Left + ( - (int)decYTHeight)) + , m_workingRect.Bottom - (int)decYTHeight - , m_workingRect.Width - (int)( - decYTHeight) * - , );
}
else
{
PointF[] psYT = new PointF[]
{
new PointF(m_workingRect.Left,(float)(m_workingRect.Bottom-decYTHeight)),
new PointF(m_workingRect.Right-,(float)(m_workingRect.Bottom-decYTHeight)),
new PointF(m_workingRect.Right-,m_workingRect.Bottom-),
new PointF(m_workingRect.Right--m_workingRect.Width/, m_workingRect.Bottom),
new PointF(m_workingRect.Left+m_workingRect.Width/, m_workingRect.Bottom),
new PointF(m_workingRect.Left,m_workingRect.Bottom-),
};
pathYT.AddLines(psYT);
pathYT.CloseAllFigures();
rectYT = new Rectangle(m_workingRect.Left, m_workingRect.Bottom - (int)decYTHeight - , m_workingRect.Width, );
} g.FillPath(new SolidBrush(liquidColor), pathYT);
g.FillPath(new SolidBrush(Color.FromArgb(, bottleMouthColor)), pathYT);
//画液体面
g.FillEllipse(new SolidBrush(liquidColor), rectYT);
g.FillEllipse(new SolidBrush(Color.FromArgb(, Color.White)), rectYT); //画高亮
int intCount = m_workingRect.Width / / ;
int intSplit = ( - ) / intCount;
for (int i = ; i < intCount; i++)
{
int _penWidth = m_workingRect.Width / - * i;
if (_penWidth <= )
_penWidth = ;
g.DrawLine(new Pen(new SolidBrush(Color.FromArgb(, Color.White)), _penWidth), new Point(m_workingRect.Width / , m_workingRect.Top), new Point(m_workingRect.Width / , m_workingRect.Bottom - ));
if (_penWidth == )
break;
} //画瓶底
g.FillEllipse(new SolidBrush(bottleColor), new RectangleF(m_workingRect.Left, m_workingRect.Top - , m_workingRect.Width - , ));
g.FillEllipse(new SolidBrush(Color.FromArgb(, Color.White)), new RectangleF(m_workingRect.Left, m_workingRect.Top - , m_workingRect.Width - , ));
//画瓶口
g.FillRectangle(new SolidBrush(bottleMouthColor), new Rectangle(m_workingRect.Left + m_workingRect.Width / , m_workingRect.Bottom, m_workingRect.Width / , ));
//画瓶颈阴影
GraphicsPath pathPJ = new GraphicsPath();
Point[] psPJ = new Point[]
{
new Point(m_workingRect.Left, m_workingRect.Bottom-),
new Point(m_workingRect.Right-, m_workingRect.Bottom-),
new Point(m_workingRect.Right--m_workingRect.Width/, m_workingRect.Bottom),
new Point(m_workingRect.Left+m_workingRect.Width/, m_workingRect.Bottom)
};
pathPJ.AddLines(psPJ);
pathPJ.CloseAllFigures();
g.FillPath(new SolidBrush(Color.FromArgb(, bottleMouthColor)), pathPJ); //写编号
if (!string.IsNullOrEmpty(m_NO))
{
var nosize = g.MeasureString(m_NO, Font);
g.DrawString(m_NO, Font, new SolidBrush(ForeColor), new PointF((this.Width - nosize.Width) / , m_workingRect.Top + ));
}
}
}
}

最后的话

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

(五十六)c#Winform自定义控件-瓶子(工业)-HZHControls的更多相关文章

  1. (五十)c#Winform自定义控件-滑块

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

  2. (八十)c#Winform自定义控件-分割线标签-HZHControls

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

  3. (五十一)c#Winform自定义控件-文字提示-HZHControls

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

  4. 【Visual C++】游戏开发五十六 浅墨DirectX教程二十三 打造游戏GUI界面(一)

    本系列文章由zhmxy555(毛星云)编写,转载请注明出处. 文章链接:http://blog.csdn.net/poem_qianmo/article/details/16384009 作者:毛星云 ...

  5. 第三百五十六节,Python分布式爬虫打造搜索引擎Scrapy精讲—scrapy分布式爬虫要点

    第三百五十六节,Python分布式爬虫打造搜索引擎Scrapy精讲—scrapy分布式爬虫要点 1.分布式爬虫原理 2.分布式爬虫优点 3.分布式爬虫需要解决的问题

  6. “全栈2019”Java第五十六章:多态与字段详解

    难度 初级 学习时间 10分钟 适合人群 零基础 开发语言 Java 开发环境 JDK v11 IntelliJ IDEA v2018.3 文章原文链接 "全栈2019"Java第 ...

  7. 《手把手教你》系列技巧篇(五十六)-java+ selenium自动化测试-下载文件-上篇(详细教程)

    1.简介 前边几篇文章讲解完如何上传文件,既然有上传,那么就可能会有下载文件.因此宏哥就接着讲解和分享一下:自动化测试下载文件.可能有的小伙伴或者童鞋们会觉得这不是很简单吗,还用你介绍和讲解啊,不说就 ...

  8. (三十)c#Winform自定义控件-文本框(三)

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

  9. Abp(net core)+easyui+efcore实现仓储管理系统——出库管理之七(五十六)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  10. (二十)c#Winform自定义控件-有后退的窗体

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

随机推荐

  1. 你不知道的JavaScript(中)读书笔记(二)

    第三章 原生函数 常用的原生函数(内建函数)有: String() Number() Boolean Array() Object() Function() RegExp() Date() Erroe ...

  2. hdu 6298 Maximum Multiple (简单数论)

    Maximum Multiple Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  3. 线程中put(None)和主函数中put(None)的区别和用法

    ''' 初试生产者消费者模型代码 分析: 对象含有生产者.队列.消费者 Queue队列模块,不适合传大文件,通常传一些消息. ''' '''多生产者进程和多消费者进程''' #导入模块 from mu ...

  4. 大白话简单工厂模式 (Simple Factory Pattern)

    大白话简单工厂模式 (Simple Factory Pattern) 从买车经历说起 毕业两年,码农张小两口无法忍受挤公交,凌晨起床抢火车票的痛苦,遂计划买车.逛了多家4S店,最终定下日产某车型的轿车 ...

  5. 《Java练习题》进阶练习题(四)

    编程合集: https://www.cnblogs.com/jssj/p/12002760.html 前言:不仅仅要实现,更要提升性能,精益求精,用尽量少的时间复杂度和空间复杂度解决问题. [程序78 ...

  6. 函数式响应式编程 - Functional Reactive Programming

    我们略过概念,直接看函数式响应式编程解决了什么问题. 从下面这个例子展开: 两个密码输入框,一个提交按钮. 密码.确认密码都填写并一致,允许提交:不一致提示错误. HTML 如下: <input ...

  7. 面试连环炮系列(三):synchronized怎么用的

    synchronized怎么用的? 用过,synchronized是常用的并发控制关键字,简单的说就是访问加锁.它可以修饰静态方法或者一个类的class对象,这叫类锁:可以修饰普通方法或者代码块,这叫 ...

  8. Spring中常见的设计模式——委派模式

    一.委派模式的定义及应用场景 委派模式(Delegate Pattern)的基本作用是负责任务的调用和分配,跟代理模式很像,可以看做特殊情况下的静态的全权代理,但是代理模式注重过程,而委派模式注重结果 ...

  9. python的学习大纲

    python基础部分 函数 初识函数 函数进阶 装饰器函数 迭代器和生成器 内置函数和匿名函数 递归函数 常用模块 常用模块 模块和包 面向对象 初识面向对象 面向对象进阶 网络编程 网络编程 并发编 ...

  10. Git实战指南----跟着haibiscuit学Git(第八篇)

    笔名:  haibiscuit 博客园: https://www.cnblogs.com/haibiscuit/ Git地址: https://github.com/haibiscuit?tab=re ...