(四十)c#Winform自定义控件-开关-HZHControls
官网
前提
入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章。
GitHub:https://github.com/kwwwvagaa/NetWinformControl
码云:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
如果觉得写的还行,请点个 star 支持一下吧
欢迎前来交流探讨: 企鹅群568015492 idkey=6e08741ef16fe53bf0314c1c9e336c4f626047943a8b76bac062361bab6b4f8d">
目录
https://www.cnblogs.com/bfyx/p/11364884.html
准备工作
GDI+需要有一点了解,不知道的可以百度瞅瞅
开始
添加一个用户控件,命名UCSwitch
添加一个枚举用以控制样式
public enum SwitchType
{
/// <summary>
/// 椭圆
/// </summary>
Ellipse,
/// <summary>
/// 四边形
/// </summary>
Quadrilateral,
/// <summary>
/// 横线
/// </summary>
Line
}
添加属性
[Description("选中改变事件"), Category("自定义")]
public event EventHandler CheckedChanged;
private Color m_trueColor = Color.FromArgb(, , );
[Description("选中时颜色"), Category("自定义")]
public Color TrueColor
{
get { return m_trueColor; }
set
{
m_trueColor = value;
Refresh();
}
}
private Color m_falseColor = Color.FromArgb(, , );
[Description("没有选中时颜色"), Category("自定义")]
public Color FalseColor
{
get { return m_falseColor; }
set
{
m_falseColor = value;
Refresh();
}
}
private bool m_checked;
[Description("是否选中"), Category("自定义")]
public bool Checked
{
get { return m_checked; }
set
{
m_checked = value;
Refresh();
if (CheckedChanged != null)
{
CheckedChanged(this, null);
}
}
}
private string[] m_texts;
[Description("文本值,当选中或没有选中时显示,必须是长度为2的数组"), Category("自定义")]
public string[] Texts
{
get { return m_texts; }
set
{
m_texts = value;
Refresh();
}
}
private SwitchType m_switchType = SwitchType.Ellipse;
[Description("显示类型"), Category("自定义")]
public SwitchType SwitchType
{
get { return m_switchType; }
set
{
m_switchType = value;
Refresh();
}
}
public override Font Font
{
get
{
return base.Font;
}
set
{
base.Font = value;
Refresh();
}
}
重绘
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
var g = e.Graphics;
g.SetGDIHigh();
if (m_switchType == HZH_Controls.Controls.SwitchType.Ellipse)
{
var fillColor = m_checked ? m_trueColor : m_falseColor;
GraphicsPath path = new GraphicsPath();
path.AddLine(new Point(this.Height / , ), new Point(this.Width - this.Height / , ));
path.AddArc(new Rectangle(this.Width - this.Height - , , this.Height - , this.Height - ), -, );
path.AddLine(new Point(this.Width - this.Height / , this.Height - ), new Point(this.Height / , this.Height - ));
path.AddArc(new Rectangle(, , this.Height - , this.Height - ), , );
g.FillPath(new SolidBrush(fillColor), path); string strText = string.Empty;
if (m_texts != null && m_texts.Length == )
{
if (m_checked)
{
strText = m_texts[];
}
else
{
strText = m_texts[];
}
} if (m_checked)
{
g.FillEllipse(Brushes.White, new Rectangle(this.Width - this.Height - + , + , this.Height - - , this.Height - - ));
if (string.IsNullOrEmpty(strText))
{
g.DrawEllipse(new Pen(Color.White, ), new Rectangle((this.Height - - ) / - ((this.Height - - ) / ) / , (this.Height - - (this.Height - - ) / ) / + , (this.Height - - ) / , (this.Height - - ) / ));
}
else
{
System.Drawing.SizeF sizeF = g.MeasureString(strText.Replace(" ", "A"), Font);
int intTextY = (this.Height - (int)sizeF.Height) / + ;
g.DrawString(strText, Font, Brushes.White, new Point((this.Height - - ) / , intTextY));
}
}
else
{
g.FillEllipse(Brushes.White, new Rectangle( + , + , this.Height - - , this.Height - - ));
if (string.IsNullOrEmpty(strText))
{
g.DrawEllipse(new Pen(Color.White, ), new Rectangle(this.Width - - (this.Height - - ) / - ((this.Height - - ) / ) / , (this.Height - - (this.Height - - ) / ) / + , (this.Height - - ) / , (this.Height - - ) / ));
}
else
{
System.Drawing.SizeF sizeF = g.MeasureString(strText.Replace(" ", "A"), Font);
int intTextY = (this.Height - (int)sizeF.Height) / + ;
g.DrawString(strText, Font, Brushes.White, new Point(this.Width - - (this.Height - - ) / - ((this.Height - - ) / ) / - (int)sizeF.Width / , intTextY));
}
}
}
else if (m_switchType == HZH_Controls.Controls.SwitchType.Quadrilateral)
{
var fillColor = m_checked ? m_trueColor : m_falseColor;
GraphicsPath path = new GraphicsPath();
int intRadius = ;
path.AddArc(, , intRadius, intRadius, 180f, 90f);
path.AddArc(this.Width - intRadius - , , intRadius, intRadius, 270f, 90f);
path.AddArc(this.Width - intRadius - , this.Height - intRadius - , intRadius, intRadius, 0f, 90f);
path.AddArc(, this.Height - intRadius - , intRadius, intRadius, 90f, 90f); g.FillPath(new SolidBrush(fillColor), path); string strText = string.Empty;
if (m_texts != null && m_texts.Length == )
{
if (m_checked)
{
strText = m_texts[];
}
else
{
strText = m_texts[];
}
} if (m_checked)
{
GraphicsPath path2 = new GraphicsPath();
path2.AddArc(this.Width - this.Height - + , + , intRadius, intRadius, 180f, 90f);
path2.AddArc(this.Width - - - intRadius, + , intRadius, intRadius, 270f, 90f);
path2.AddArc(this.Width - - - intRadius, this.Height - - intRadius - , intRadius, intRadius, 0f, 90f);
path2.AddArc(this.Width - this.Height - + , this.Height - - intRadius - , intRadius, intRadius, 90f, 90f);
g.FillPath(Brushes.White, path2); if (string.IsNullOrEmpty(strText))
{
g.DrawEllipse(new Pen(Color.White, ), new Rectangle((this.Height - - ) / - ((this.Height - - ) / ) / , (this.Height - - (this.Height - - ) / ) / + , (this.Height - - ) / , (this.Height - - ) / ));
}
else
{
System.Drawing.SizeF sizeF = g.MeasureString(strText.Replace(" ", "A"), Font);
int intTextY = (this.Height - (int)sizeF.Height) / + ;
g.DrawString(strText, Font, Brushes.White, new Point((this.Height - - ) / , intTextY));
}
}
else
{
GraphicsPath path2 = new GraphicsPath();
path2.AddArc( + , + , intRadius, intRadius, 180f, 90f);
path2.AddArc(this.Height - - intRadius, + , intRadius, intRadius, 270f, 90f);
path2.AddArc(this.Height - - intRadius, this.Height - - intRadius - , intRadius, intRadius, 0f, 90f);
path2.AddArc( + , this.Height - - intRadius - , intRadius, intRadius, 90f, 90f);
g.FillPath(Brushes.White, path2); //g.FillEllipse(Brushes.White, new Rectangle(1 + 2, 1 + 2, this.Height - 2 - 4, this.Height - 2 - 4));
if (string.IsNullOrEmpty(strText))
{
g.DrawEllipse(new Pen(Color.White, ), new Rectangle(this.Width - - (this.Height - - ) / - ((this.Height - - ) / ) / , (this.Height - - (this.Height - - ) / ) / + , (this.Height - - ) / , (this.Height - - ) / ));
}
else
{
System.Drawing.SizeF sizeF = g.MeasureString(strText.Replace(" ", "A"), Font);
int intTextY = (this.Height - (int)sizeF.Height) / + ;
g.DrawString(strText, Font, Brushes.White, new Point(this.Width - - (this.Height - - ) / - ((this.Height - - ) / ) / - (int)sizeF.Width / , intTextY));
}
}
}
else
{
var fillColor = m_checked ? m_trueColor : m_falseColor;
int intLineHeight = (this.Height - - ) / ; GraphicsPath path = new GraphicsPath();
path.AddLine(new Point(this.Height / , (this.Height - intLineHeight) / ), new Point(this.Width - this.Height / , (this.Height - intLineHeight) / ));
path.AddArc(new Rectangle(this.Width - this.Height / - intLineHeight - , (this.Height - intLineHeight) / , intLineHeight, intLineHeight), -, );
path.AddLine(new Point(this.Width - this.Height / , (this.Height - intLineHeight) / + intLineHeight), new Point(this.Width - this.Height / , (this.Height - intLineHeight) / + intLineHeight));
path.AddArc(new Rectangle(this.Height / , (this.Height - intLineHeight) / , intLineHeight, intLineHeight), , );
g.FillPath(new SolidBrush(fillColor), path); if (m_checked)
{
g.FillEllipse(new SolidBrush(fillColor), new Rectangle(this.Width - this.Height - + , + , this.Height - - , this.Height - - ));
g.FillEllipse(Brushes.White, new Rectangle(this.Width - - (this.Height - - ) / - ((this.Height - - ) / ) / - , (this.Height - - (this.Height - - ) / ) / + , (this.Height - - ) / , (this.Height - - ) / ));
}
else
{
g.FillEllipse(new SolidBrush(fillColor), new Rectangle( + , + , this.Height - - , this.Height - - ));
g.FillEllipse(Brushes.White, new Rectangle((this.Height - - ) / - ((this.Height - - ) / ) / + , (this.Height - - (this.Height - - ) / ) / + , (this.Height - - ) / , (this.Height - - ) / ));
}
}
}
处理一下点击事件
void UCSwitch_MouseDown(object sender, MouseEventArgs e)
{
Checked = !Checked;
}
完整代码
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
{
[DefaultEvent("CheckedChanged")]
public partial class UCSwitch : UserControl
{
[Description("选中改变事件"), Category("自定义")]
public event EventHandler CheckedChanged;
private Color m_trueColor = Color.FromArgb(, , ); [Description("选中时颜色"), Category("自定义")]
public Color TrueColor
{
get { return m_trueColor; }
set
{
m_trueColor = value;
Refresh();
}
} private Color m_falseColor = Color.FromArgb(, , ); [Description("没有选中时颜色"), Category("自定义")]
public Color FalseColor
{
get { return m_falseColor; }
set
{
m_falseColor = value;
Refresh();
}
} private bool m_checked; [Description("是否选中"), Category("自定义")]
public bool Checked
{
get { return m_checked; }
set
{
m_checked = value;
Refresh();
if (CheckedChanged != null)
{
CheckedChanged(this, null);
}
}
} private string[] m_texts; [Description("文本值,当选中或没有选中时显示,必须是长度为2的数组"), Category("自定义")]
public string[] Texts
{
get { return m_texts; }
set
{
m_texts = value;
Refresh();
}
}
private SwitchType m_switchType = SwitchType.Ellipse; [Description("显示类型"), Category("自定义")]
public SwitchType SwitchType
{
get { return m_switchType; }
set
{
m_switchType = value;
Refresh();
}
} public override Font Font
{
get
{
return base.Font;
}
set
{
base.Font = value;
Refresh();
}
} public UCSwitch()
{
InitializeComponent();
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.MouseDown += UCSwitch_MouseDown;
} void UCSwitch_MouseDown(object sender, MouseEventArgs e)
{
Checked = !Checked;
} protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
var g = e.Graphics;
g.SetGDIHigh();
if (m_switchType == HZH_Controls.Controls.SwitchType.Ellipse)
{
var fillColor = m_checked ? m_trueColor : m_falseColor;
GraphicsPath path = new GraphicsPath();
path.AddLine(new Point(this.Height / , ), new Point(this.Width - this.Height / , ));
path.AddArc(new Rectangle(this.Width - this.Height - , , this.Height - , this.Height - ), -, );
path.AddLine(new Point(this.Width - this.Height / , this.Height - ), new Point(this.Height / , this.Height - ));
path.AddArc(new Rectangle(, , this.Height - , this.Height - ), , );
g.FillPath(new SolidBrush(fillColor), path); string strText = string.Empty;
if (m_texts != null && m_texts.Length == )
{
if (m_checked)
{
strText = m_texts[];
}
else
{
strText = m_texts[];
}
} if (m_checked)
{
g.FillEllipse(Brushes.White, new Rectangle(this.Width - this.Height - + , + , this.Height - - , this.Height - - ));
if (string.IsNullOrEmpty(strText))
{
g.DrawEllipse(new Pen(Color.White, ), new Rectangle((this.Height - - ) / - ((this.Height - - ) / ) / , (this.Height - - (this.Height - - ) / ) / + , (this.Height - - ) / , (this.Height - - ) / ));
}
else
{
System.Drawing.SizeF sizeF = g.MeasureString(strText.Replace(" ", "A"), Font);
int intTextY = (this.Height - (int)sizeF.Height) / + ;
g.DrawString(strText, Font, Brushes.White, new Point((this.Height - - ) / , intTextY));
}
}
else
{
g.FillEllipse(Brushes.White, new Rectangle( + , + , this.Height - - , this.Height - - ));
if (string.IsNullOrEmpty(strText))
{
g.DrawEllipse(new Pen(Color.White, ), new Rectangle(this.Width - - (this.Height - - ) / - ((this.Height - - ) / ) / , (this.Height - - (this.Height - - ) / ) / + , (this.Height - - ) / , (this.Height - - ) / ));
}
else
{
System.Drawing.SizeF sizeF = g.MeasureString(strText.Replace(" ", "A"), Font);
int intTextY = (this.Height - (int)sizeF.Height) / + ;
g.DrawString(strText, Font, Brushes.White, new Point(this.Width - - (this.Height - - ) / - ((this.Height - - ) / ) / - (int)sizeF.Width / , intTextY));
}
}
}
else if (m_switchType == HZH_Controls.Controls.SwitchType.Quadrilateral)
{
var fillColor = m_checked ? m_trueColor : m_falseColor;
GraphicsPath path = new GraphicsPath();
int intRadius = ;
path.AddArc(, , intRadius, intRadius, 180f, 90f);
path.AddArc(this.Width - intRadius - , , intRadius, intRadius, 270f, 90f);
path.AddArc(this.Width - intRadius - , this.Height - intRadius - , intRadius, intRadius, 0f, 90f);
path.AddArc(, this.Height - intRadius - , intRadius, intRadius, 90f, 90f); g.FillPath(new SolidBrush(fillColor), path); string strText = string.Empty;
if (m_texts != null && m_texts.Length == )
{
if (m_checked)
{
strText = m_texts[];
}
else
{
strText = m_texts[];
}
} if (m_checked)
{
GraphicsPath path2 = new GraphicsPath();
path2.AddArc(this.Width - this.Height - + , + , intRadius, intRadius, 180f, 90f);
path2.AddArc(this.Width - - - intRadius, + , intRadius, intRadius, 270f, 90f);
path2.AddArc(this.Width - - - intRadius, this.Height - - intRadius - , intRadius, intRadius, 0f, 90f);
path2.AddArc(this.Width - this.Height - + , this.Height - - intRadius - , intRadius, intRadius, 90f, 90f);
g.FillPath(Brushes.White, path2); if (string.IsNullOrEmpty(strText))
{
g.DrawEllipse(new Pen(Color.White, ), new Rectangle((this.Height - - ) / - ((this.Height - - ) / ) / , (this.Height - - (this.Height - - ) / ) / + , (this.Height - - ) / , (this.Height - - ) / ));
}
else
{
System.Drawing.SizeF sizeF = g.MeasureString(strText.Replace(" ", "A"), Font);
int intTextY = (this.Height - (int)sizeF.Height) / + ;
g.DrawString(strText, Font, Brushes.White, new Point((this.Height - - ) / , intTextY));
}
}
else
{
GraphicsPath path2 = new GraphicsPath();
path2.AddArc( + , + , intRadius, intRadius, 180f, 90f);
path2.AddArc(this.Height - - intRadius, + , intRadius, intRadius, 270f, 90f);
path2.AddArc(this.Height - - intRadius, this.Height - - intRadius - , intRadius, intRadius, 0f, 90f);
path2.AddArc( + , this.Height - - intRadius - , intRadius, intRadius, 90f, 90f);
g.FillPath(Brushes.White, path2); //g.FillEllipse(Brushes.White, new Rectangle(1 + 2, 1 + 2, this.Height - 2 - 4, this.Height - 2 - 4));
if (string.IsNullOrEmpty(strText))
{
g.DrawEllipse(new Pen(Color.White, ), new Rectangle(this.Width - - (this.Height - - ) / - ((this.Height - - ) / ) / , (this.Height - - (this.Height - - ) / ) / + , (this.Height - - ) / , (this.Height - - ) / ));
}
else
{
System.Drawing.SizeF sizeF = g.MeasureString(strText.Replace(" ", "A"), Font);
int intTextY = (this.Height - (int)sizeF.Height) / + ;
g.DrawString(strText, Font, Brushes.White, new Point(this.Width - - (this.Height - - ) / - ((this.Height - - ) / ) / - (int)sizeF.Width / , intTextY));
}
}
}
else
{
var fillColor = m_checked ? m_trueColor : m_falseColor;
int intLineHeight = (this.Height - - ) / ; GraphicsPath path = new GraphicsPath();
path.AddLine(new Point(this.Height / , (this.Height - intLineHeight) / ), new Point(this.Width - this.Height / , (this.Height - intLineHeight) / ));
path.AddArc(new Rectangle(this.Width - this.Height / - intLineHeight - , (this.Height - intLineHeight) / , intLineHeight, intLineHeight), -, );
path.AddLine(new Point(this.Width - this.Height / , (this.Height - intLineHeight) / + intLineHeight), new Point(this.Width - this.Height / , (this.Height - intLineHeight) / + intLineHeight));
path.AddArc(new Rectangle(this.Height / , (this.Height - intLineHeight) / , intLineHeight, intLineHeight), , );
g.FillPath(new SolidBrush(fillColor), path); if (m_checked)
{
g.FillEllipse(new SolidBrush(fillColor), new Rectangle(this.Width - this.Height - + , + , this.Height - - , this.Height - - ));
g.FillEllipse(Brushes.White, new Rectangle(this.Width - - (this.Height - - ) / - ((this.Height - - ) / ) / - , (this.Height - - (this.Height - - ) / ) / + , (this.Height - - ) / , (this.Height - - ) / ));
}
else
{
g.FillEllipse(new SolidBrush(fillColor), new Rectangle( + , + , this.Height - - , this.Height - - ));
g.FillEllipse(Brushes.White, new Rectangle((this.Height - - ) / - ((this.Height - - ) / ) / + , (this.Height - - (this.Height - - ) / ) / + , (this.Height - - ) / , (this.Height - - ) / ));
}
}
} } public enum SwitchType
{
/// <summary>
/// 椭圆
/// </summary>
Ellipse,
/// <summary>
/// 四边形
/// </summary>
Quadrilateral,
/// <summary>
/// 横线
/// </summary>
Line
}
}
namespace HZH_Controls.Controls
{
partial class UCSwitch
{
/// <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.SuspendLayout();
//
// UCSwitch
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.Transparent;
this.Name = "UCSwitch";
this.Size = new System.Drawing.Size(, );
this.ResumeLayout(false); } #endregion
}
}
用处及效果

最后的话
如果你喜欢的话,请到 https://gitee.com/kwwwvagaa/net_winform_custom_control 点个星 星吧
(四十)c#Winform自定义控件-开关-HZHControls的更多相关文章
- (四十四)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 ...
- (四)c#Winform自定义控件-选择按钮组
前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...
- (十四)c#Winform自定义控件-键盘(一)
前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...
- (五十四)c#Winform自定义控件-仪表盘
前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kwwwvagaa/NetWinformControl 码云:ht ...
- (六十四)c#Winform自定义控件-温度计(工业)
前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kwwwvagaa/NetWinformControl 码云:ht ...
- (七十四)c#Winform自定义控件-金字塔图表
前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kwwwvagaa/NetWinformControl 码云:ht ...
- (八十四)c#Winform自定义控件-导航菜单(类Office菜单)
前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kwwwvagaa/NetWinformControl 码云:ht ...
- (四十六)c#Winform自定义控件-水波进度条-HZHControls
官网 http://www.hzhcontrols.com 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kww ...
随机推荐
- 五分钟了解ES6对数值的扩展
文章目录 数值的扩展(ES6) 1. 二进制八进制表示法 2. Number对象 3. Math对象 4. 指数运算符 5. Integer 数据类型 5.1 简介 5.2 运算 数值的扩展(ES6) ...
- 超级详细Mysql安装步骤图解
数据库忘记装了,然后今天才装上.刚开始有点蒙蔽,进入mysql官网一堆英文,小声逼逼没有学号英语的我.废话不都说,直接上图 1.输入网址 https://www.mysql.com/downloads ...
- mysql多字段内容并到单字段中的操作
; SELECT 序号, ryxm `人员姓名`, cylb `成员类别`, gzdw `工作单位`, zc `职称`, GROUP_CONCAT(zzqmc) AS `著作权名称`--多字段合并到一 ...
- linux mysql 数据库复制
一.主服务器配置 1.配置文件my.cnf的修改 [root@localhost mysql]# vim /etc/my.cnf #在[mysqld]中添加:server-id=1log_bin=ma ...
- IO测试工具 - 用于IO测试 ; linux benchmarks
IO测试工具,用于磁盘IO测试,下面进行使用列表进行记录: iozone fio dd ioping iotop iostat bonnie++ crystalDisk Atto as-ssd-ben ...
- cpv framework 0.1 正式发布 (C++ 网页框架)
项目地址 https://github.com/cpv-project/cpv-framework 项目介绍 cpv framework 是一个 C++ 编写的网页框架,基于 seastar fram ...
- Python中删除空白字符
主要参考 Stackoverflow答案总结. 空白字符一般指以下几种字符: space,tab, linefeed, return, formfeed, and vertical tab中英文对照表 ...
- 【zabbix告警监控】配置zabbix监控nginx服务
zabbix监控nginx,nginx需要添加--with-http_stub_status模块 使用zabbix监控nginx,首先nginx需要配置开启ngx_status.但是我这边nginx安 ...
- vivo web service:亿万级规模web服务引擎架构
本文首发于 vivo互联网技术 微信公众号 链接:https://mp.weixin.qq.com/s/ovOS0l9U5svlUMfZoYFU9Q vivo web service是开发团队围绕奇点 ...
- Spring Boot Starters到底怎么回事?
前言 上周看了一篇.你一直在用的Spring Boot Starters究竟是怎么回事(https://www.cnblogs.com/fengzheng/p/10947585.html) 感觉终 ...