* 增加XML文档文件
This commit is contained in:
parent
15ba594d3f
commit
77a3b86e4b
@ -35,17 +35,27 @@ using System.Windows.Forms;
|
|||||||
|
|
||||||
namespace Sunny.UI
|
namespace Sunny.UI
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 柱状图
|
||||||
|
/// </summary>
|
||||||
[ToolboxItem(true)]
|
[ToolboxItem(true)]
|
||||||
public class UIBarChart : UIChart
|
public class UIBarChart : UIChart
|
||||||
{
|
{
|
||||||
protected bool NeedDraw;
|
private bool NeedDraw;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
CalcData();
|
CalcData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 刷新显示
|
||||||
|
/// </summary>
|
||||||
public override void Refresh()
|
public override void Refresh()
|
||||||
{
|
{
|
||||||
base.Refresh();
|
base.Refresh();
|
||||||
@ -57,6 +67,12 @@ namespace Sunny.UI
|
|||||||
CalcData();
|
CalcData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="seriesName">序列名称</param>
|
||||||
|
/// <param name="index">序号</param>
|
||||||
|
/// <param name="value">值</param>
|
||||||
public void Update(string seriesName, int index, double value)
|
public void Update(string seriesName, int index, double value)
|
||||||
{
|
{
|
||||||
var series = Option[seriesName];
|
var series = Option[seriesName];
|
||||||
@ -68,6 +84,9 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
UILinearScale YScale = new UILinearScale();
|
UILinearScale YScale = new UILinearScale();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 计算数据用于显示
|
||||||
|
/// </summary>
|
||||||
protected override void CalcData()
|
protected override void CalcData()
|
||||||
{
|
{
|
||||||
Bars.Clear();
|
Bars.Clear();
|
||||||
@ -209,20 +228,20 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Point DrawOrigin => new Point(Option.Grid.Left, Height - Option.Grid.Bottom);
|
private Point DrawOrigin => new Point(Option.Grid.Left, Height - Option.Grid.Bottom);
|
||||||
protected Size DrawSize => new Size(Width - Option.Grid.Left - Option.Grid.Right, Height - Option.Grid.Top - Option.Grid.Bottom);
|
private Size DrawSize => new Size(Width - Option.Grid.Left - Option.Grid.Right, Height - Option.Grid.Top - Option.Grid.Bottom);
|
||||||
protected Rectangle DrawRect => new Rectangle(Option.Grid.Left, Option.Grid.Top, DrawSize.Width, DrawSize.Height);
|
private Rectangle DrawRect => new Rectangle(Option.Grid.Left, Option.Grid.Top, DrawSize.Width, DrawSize.Height);
|
||||||
|
|
||||||
protected int selectIndex = -1;
|
private int selectIndex = -1;
|
||||||
protected float DrawBarWidth;
|
private float DrawBarWidth;
|
||||||
protected double YAxisStart;
|
private double YAxisStart;
|
||||||
protected double YAxisEnd;
|
private double YAxisEnd;
|
||||||
protected double YAxisInterval;
|
private double YAxisInterval;
|
||||||
protected int YAxisDecimalCount;
|
private int YAxisDecimalCount;
|
||||||
protected readonly ConcurrentDictionary<int, List<BarInfo>> Bars = new ConcurrentDictionary<int, List<BarInfo>>();
|
private readonly ConcurrentDictionary<int, List<BarInfo>> Bars = new ConcurrentDictionary<int, List<BarInfo>>();
|
||||||
|
|
||||||
[DefaultValue(-1), Browsable(false)]
|
[DefaultValue(-1), Browsable(false)]
|
||||||
protected int SelectIndex
|
private int SelectIndex
|
||||||
{
|
{
|
||||||
get => selectIndex;
|
get => selectIndex;
|
||||||
set
|
set
|
||||||
@ -237,6 +256,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
@ -281,6 +304,9 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 图表参数
|
||||||
|
/// </summary>
|
||||||
[Browsable(false), DefaultValue(null)]
|
[Browsable(false), DefaultValue(null)]
|
||||||
public UIBarOption Option
|
public UIBarOption Option
|
||||||
{
|
{
|
||||||
@ -291,6 +317,9 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 默认创建空的图表参数
|
||||||
|
/// </summary>
|
||||||
protected override void CreateEmptyOption()
|
protected override void CreateEmptyOption()
|
||||||
{
|
{
|
||||||
if (emptyOption != null) return;
|
if (emptyOption != null) return;
|
||||||
@ -338,6 +367,10 @@ namespace Sunny.UI
|
|||||||
emptyOption = option;
|
emptyOption = option;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绘制图表参数
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="g">绘制图面</param>
|
||||||
protected override void DrawOption(Graphics g)
|
protected override void DrawOption(Graphics g)
|
||||||
{
|
{
|
||||||
if (Option == null) return;
|
if (Option == null) return;
|
||||||
@ -354,6 +387,10 @@ namespace Sunny.UI
|
|||||||
DrawAxisScales(g);
|
DrawAxisScales(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绘制工具提示
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="g">绘制图面</param>
|
||||||
protected virtual void DrawToolTip(Graphics g)
|
protected virtual void DrawToolTip(Graphics g)
|
||||||
{
|
{
|
||||||
if (selectIndex < 0) return;
|
if (selectIndex < 0) return;
|
||||||
@ -370,6 +407,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绘制坐标轴
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="g">绘制图面</param>
|
||||||
protected virtual void DrawAxis(Graphics g)
|
protected virtual void DrawAxis(Graphics g)
|
||||||
{
|
{
|
||||||
g.FillRectangle(FillColor, Option.Grid.Left, 1, Width - Option.Grid.Left - Option.Grid.Right, Option.Grid.Top);
|
g.FillRectangle(FillColor, Option.Grid.Left, 1, Width - Option.Grid.Left - Option.Grid.Right, Option.Grid.Top);
|
||||||
@ -468,6 +509,11 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绘制序列
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="g">绘制图面</param>
|
||||||
|
/// <param name="series">序列</param>
|
||||||
protected virtual void DrawSeries(Graphics g, List<UIBarSeries> series)
|
protected virtual void DrawSeries(Graphics g, List<UIBarSeries> series)
|
||||||
{
|
{
|
||||||
if (series == null || series.Count == 0) return;
|
if (series == null || series.Count == 0) return;
|
||||||
@ -508,7 +554,8 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected class BarInfo
|
|
||||||
|
private class BarInfo
|
||||||
{
|
{
|
||||||
public RectangleF Rect { get; set; }
|
public RectangleF Rect { get; set; }
|
||||||
|
|
||||||
|
@ -25,22 +25,49 @@ using System.Drawing;
|
|||||||
|
|
||||||
namespace Sunny.UI
|
namespace Sunny.UI
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 柱状图配置类
|
||||||
|
/// </summary>
|
||||||
public sealed class UIBarOption : UIOption, IDisposable
|
public sealed class UIBarOption : UIOption, IDisposable
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// X轴
|
||||||
|
/// </summary>
|
||||||
public UIAxis XAxis { get; set; } = new UIAxis(UIAxisType.Category);
|
public UIAxis XAxis { get; set; } = new UIAxis(UIAxisType.Category);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工具提示
|
||||||
|
/// </summary>
|
||||||
public UIBarToolTip ToolTip { get; set; } = new UIBarToolTip();
|
public UIBarToolTip ToolTip { get; set; } = new UIBarToolTip();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Y轴
|
||||||
|
/// </summary>
|
||||||
public UIAxis YAxis { get; set; } = new UIAxis(UIAxisType.Value);
|
public UIAxis YAxis { get; set; } = new UIAxis(UIAxisType.Value);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 序列
|
||||||
|
/// </summary>
|
||||||
public List<UIBarSeries> Series = new List<UIBarSeries>();
|
public List<UIBarSeries> Series = new List<UIBarSeries>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绘图表格
|
||||||
|
/// </summary>
|
||||||
public UIChartGrid Grid = new UIChartGrid();
|
public UIChartGrid Grid = new UIChartGrid();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// X轴自定义刻度线
|
||||||
|
/// </summary>
|
||||||
public readonly List<UIScaleLine> XAxisScaleLines = new List<UIScaleLine>();
|
public readonly List<UIScaleLine> XAxisScaleLines = new List<UIScaleLine>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Y轴自定义刻度线
|
||||||
|
/// </summary>
|
||||||
public readonly List<UIScaleLine> YAxisScaleLines = new List<UIScaleLine>();
|
public readonly List<UIScaleLine> YAxisScaleLines = new List<UIScaleLine>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示值
|
||||||
|
/// </summary>
|
||||||
public bool ShowValue { get; set; }
|
public bool ShowValue { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -62,6 +89,9 @@ namespace Sunny.UI
|
|||||||
Series.Add(series);
|
Series.Add(series);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 析构函数
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
foreach (var series in Series)
|
foreach (var series in Series)
|
||||||
@ -428,6 +458,9 @@ namespace Sunny.UI
|
|||||||
AddData(value, color);
|
AddData(value, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 析构函数
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
Data.Clear();
|
Data.Clear();
|
||||||
|
@ -32,6 +32,9 @@ namespace Sunny.UI
|
|||||||
[ToolboxItem(true), Description("甜甜圈图")]
|
[ToolboxItem(true), Description("甜甜圈图")]
|
||||||
public sealed class UIDoughnutChart : UIChart
|
public sealed class UIDoughnutChart : UIChart
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 默认创建空的图表参数
|
||||||
|
/// </summary>
|
||||||
protected override void CreateEmptyOption()
|
protected override void CreateEmptyOption()
|
||||||
{
|
{
|
||||||
if (emptyOption != null) return;
|
if (emptyOption != null) return;
|
||||||
@ -65,6 +68,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
@ -82,6 +89,10 @@ namespace Sunny.UI
|
|||||||
CalcData();
|
CalcData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绘制图表参数
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="g">绘制图面</param>
|
||||||
protected override void DrawOption(Graphics g)
|
protected override void DrawOption(Graphics g)
|
||||||
{
|
{
|
||||||
if (Option == null) return;
|
if (Option == null) return;
|
||||||
@ -90,6 +101,9 @@ namespace Sunny.UI
|
|||||||
DrawLegend(g, Option.Legend);
|
DrawLegend(g, Option.Legend);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 计算数据用于显示
|
||||||
|
/// </summary>
|
||||||
protected override void CalcData()
|
protected override void CalcData()
|
||||||
{
|
{
|
||||||
Angles.Clear();
|
Angles.Clear();
|
||||||
@ -175,6 +189,9 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private readonly ConcurrentDictionary<int, ConcurrentDictionary<int, Angle>> Angles = new ConcurrentDictionary<int, ConcurrentDictionary<int, Angle>>();
|
private readonly ConcurrentDictionary<int, ConcurrentDictionary<int, Angle>> Angles = new ConcurrentDictionary<int, ConcurrentDictionary<int, Angle>>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 图表参数
|
||||||
|
/// </summary>
|
||||||
[Browsable(false), DefaultValue(null)]
|
[Browsable(false), DefaultValue(null)]
|
||||||
public UIDoughnutOption Option
|
public UIDoughnutOption Option
|
||||||
{
|
{
|
||||||
@ -191,6 +208,10 @@ namespace Sunny.UI
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
|
@ -50,6 +50,10 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
protected bool NeedDraw;
|
protected bool NeedDraw;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
@ -65,6 +69,9 @@ namespace Sunny.UI
|
|||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public Rectangle DrawRect => new Rectangle(Option.Grid.Left, Option.Grid.Top, DrawSize.Width, DrawSize.Height);
|
public Rectangle DrawRect => new Rectangle(Option.Grid.Left, Option.Grid.Top, DrawSize.Width, DrawSize.Height);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 计算数据用于显示
|
||||||
|
/// </summary>
|
||||||
protected override void CalcData()
|
protected override void CalcData()
|
||||||
{
|
{
|
||||||
NeedDraw = false;
|
NeedDraw = false;
|
||||||
@ -173,6 +180,9 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 图表参数
|
||||||
|
/// </summary>
|
||||||
[Browsable(false), DefaultValue(null)]
|
[Browsable(false), DefaultValue(null)]
|
||||||
public UILineOption Option
|
public UILineOption Option
|
||||||
{
|
{
|
||||||
@ -183,6 +193,9 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 默认创建空的图表参数
|
||||||
|
/// </summary>
|
||||||
protected override void CreateEmptyOption()
|
protected override void CreateEmptyOption()
|
||||||
{
|
{
|
||||||
if (emptyOption != null) return;
|
if (emptyOption != null) return;
|
||||||
@ -210,6 +223,10 @@ namespace Sunny.UI
|
|||||||
emptyOption = option;
|
emptyOption = option;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绘制图表参数
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="g">绘制图面</param>
|
||||||
protected override void DrawOption(Graphics g)
|
protected override void DrawOption(Graphics g)
|
||||||
{
|
{
|
||||||
if (Option == null) return;
|
if (Option == null) return;
|
||||||
@ -766,6 +783,10 @@ namespace Sunny.UI
|
|||||||
private readonly List<UILineSelectPoint> selectPoints = new List<UILineSelectPoint>();
|
private readonly List<UILineSelectPoint> selectPoints = new List<UILineSelectPoint>();
|
||||||
private readonly List<UILineSelectPoint> selectPointsTemp = new List<UILineSelectPoint>();
|
private readonly List<UILineSelectPoint> selectPointsTemp = new List<UILineSelectPoint>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
@ -892,6 +913,10 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private Point StartPoint, StopPoint;
|
private Point StartPoint, StopPoint;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseDown(e);
|
base.OnMouseDown(e);
|
||||||
@ -909,6 +934,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标抬起事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseUp(MouseEventArgs e)
|
protected override void OnMouseUp(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseUp(e);
|
base.OnMouseUp(e);
|
||||||
@ -1059,6 +1088,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseLeave(e);
|
base.OnMouseLeave(e);
|
||||||
|
@ -41,6 +41,9 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
public UILineToolTip ToolTip { get; set; } = new UILineToolTip();
|
public UILineToolTip ToolTip { get; set; } = new UILineToolTip();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 析构函数
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
Clear();
|
Clear();
|
||||||
|
@ -32,6 +32,9 @@ namespace Sunny.UI
|
|||||||
[ToolboxItem(true)]
|
[ToolboxItem(true)]
|
||||||
public sealed class UIPieChart : UIChart
|
public sealed class UIPieChart : UIChart
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 默认创建空的图表参数
|
||||||
|
/// </summary>
|
||||||
protected override void CreateEmptyOption()
|
protected override void CreateEmptyOption()
|
||||||
{
|
{
|
||||||
if (emptyOption != null) return;
|
if (emptyOption != null) return;
|
||||||
@ -64,6 +67,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
@ -81,6 +88,10 @@ namespace Sunny.UI
|
|||||||
CalcData();
|
CalcData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绘制图表参数
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="g">绘制图面</param>
|
||||||
protected override void DrawOption(Graphics g)
|
protected override void DrawOption(Graphics g)
|
||||||
{
|
{
|
||||||
if (Option == null) return;
|
if (Option == null) return;
|
||||||
@ -91,6 +102,9 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private bool AllIsZero;
|
private bool AllIsZero;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 计算数据用于显示
|
||||||
|
/// </summary>
|
||||||
protected override void CalcData()
|
protected override void CalcData()
|
||||||
{
|
{
|
||||||
Angles.Clear();
|
Angles.Clear();
|
||||||
@ -200,6 +214,9 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private readonly ConcurrentDictionary<int, ConcurrentDictionary<int, Angle>> Angles = new ConcurrentDictionary<int, ConcurrentDictionary<int, Angle>>();
|
private readonly ConcurrentDictionary<int, ConcurrentDictionary<int, Angle>> Angles = new ConcurrentDictionary<int, ConcurrentDictionary<int, Angle>>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 图表参数
|
||||||
|
/// </summary>
|
||||||
[Browsable(false), DefaultValue(null)]
|
[Browsable(false), DefaultValue(null)]
|
||||||
public UIPieOption Option
|
public UIPieOption Option
|
||||||
{
|
{
|
||||||
@ -215,6 +232,10 @@ namespace Sunny.UI
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
|
@ -37,6 +37,9 @@ namespace Sunny.UI
|
|||||||
Series.Add(series);
|
Series.Add(series);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 析构函数
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
foreach (var series in Series)
|
foreach (var series in Series)
|
||||||
@ -75,6 +78,9 @@ namespace Sunny.UI
|
|||||||
Series.Add(series);
|
Series.Add(series);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 析构函数
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
foreach (var series in Series)
|
foreach (var series in Series)
|
||||||
@ -147,6 +153,9 @@ namespace Sunny.UI
|
|||||||
Data.Add(new UIPieSeriesData(name, value, color));
|
Data.Add(new UIPieSeriesData(name, value, color));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 析构函数
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
Data.Clear();
|
Data.Clear();
|
||||||
@ -199,6 +208,9 @@ namespace Sunny.UI
|
|||||||
Data.Add(new UIPieSeriesData(name, value, color));
|
Data.Add(new UIPieSeriesData(name, value, color));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 析构函数
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
Data.Clear();
|
Data.Clear();
|
||||||
|
@ -187,8 +187,7 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Disposes of this fast bitmap object and releases any pending resources.
|
/// 析构函数
|
||||||
/// The underlying bitmap is not disposes, and is unlocked, if currently locked
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
@ -866,7 +865,7 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Disposes of this FastBitmapLocker, essentially unlocking the underlying fast bitmap
|
/// 析构函数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
@ -65,6 +65,9 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 析构函数
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
Active = false;
|
Active = false;
|
||||||
|
@ -167,6 +167,9 @@ namespace Sunny.UI
|
|||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 析构函数
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
Stop();
|
Stop();
|
||||||
|
@ -964,7 +964,9 @@ namespace Sunny.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsValid(Border border) => border != null && border.IsValid();
|
public static bool IsValid(Border border) => border != null && border.IsValid();
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <summary>
|
||||||
|
/// 析构函数
|
||||||
|
/// </summary>
|
||||||
public void Dispose() => Pen?.Dispose();
|
public void Dispose() => Pen?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1381,8 +1383,9 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool _disposed;
|
bool _disposed;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 释放窗体
|
/// 析构函数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
@ -134,6 +134,9 @@ namespace Sunny.UI
|
|||||||
return cnt;
|
return cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 析构函数
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
timer.Stop();
|
timer.Stop();
|
||||||
|
@ -133,6 +133,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
@ -141,6 +145,10 @@ namespace Sunny.UI
|
|||||||
SetPercent(mousepoint);
|
SetPercent(mousepoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseDown(e);
|
base.OnMouseDown(e);
|
||||||
|
@ -236,6 +236,10 @@ namespace Sunny.UI
|
|||||||
Invalidate(GetSelectedItemRect());
|
Invalidate(GetSelectedItemRect());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseDown(e);
|
base.OnMouseDown(e);
|
||||||
|
@ -169,6 +169,10 @@ namespace Sunny.UI
|
|||||||
ReCalcWheelPoints();
|
ReCalcWheelPoints();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
@ -177,6 +181,10 @@ namespace Sunny.UI
|
|||||||
SetColor(mousePoint);
|
SetColor(mousePoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseDown(e);
|
base.OnMouseDown(e);
|
||||||
|
@ -280,6 +280,10 @@ namespace Sunny.UI
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
@ -297,6 +301,10 @@ namespace Sunny.UI
|
|||||||
SizeChange();
|
SizeChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
SizeChange();
|
SizeChange();
|
||||||
@ -372,6 +380,10 @@ namespace Sunny.UI
|
|||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public bool IsEmpty => edit.Text == "";
|
public bool IsEmpty => edit.Text == "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
ActiveControl = edit;
|
ActiveControl = edit;
|
||||||
|
@ -254,9 +254,9 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// OnSizeChanged
|
/// 重载控件尺寸变更
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="e">e</param>
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
if (Item != null)
|
if (Item != null)
|
||||||
|
@ -319,6 +319,10 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
#region Events delegates
|
#region Events delegates
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -100,6 +100,10 @@ namespace Sunny.UI
|
|||||||
return edit;
|
return edit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
|
@ -76,6 +76,10 @@ namespace Sunny.UI
|
|||||||
return edit;
|
return edit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
|
@ -97,6 +97,10 @@ namespace Sunny.UI
|
|||||||
UpdateStyles();
|
UpdateStyles();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -400,6 +400,10 @@ namespace Sunny.UI
|
|||||||
SetScrollInfo();
|
SetScrollInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -99,6 +99,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
@ -340,6 +344,10 @@ namespace Sunny.UI
|
|||||||
btnDec.Radius = btnAdd.Radius = value;
|
btnDec.Radius = btnAdd.Radius = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -64,6 +64,10 @@ namespace Sunny.UI
|
|||||||
timer.Start();
|
timer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
@ -314,6 +318,10 @@ namespace Sunny.UI
|
|||||||
Panel.Focus();
|
Panel.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标进入事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseEnter(EventArgs e)
|
protected override void OnMouseEnter(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseEnter(e);
|
base.OnMouseEnter(e);
|
||||||
@ -451,6 +459,10 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -530,6 +530,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseDown(e);
|
base.OnMouseDown(e);
|
||||||
@ -537,6 +541,10 @@ namespace Sunny.UI
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标抬起事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseUp(MouseEventArgs e)
|
protected override void OnMouseUp(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseUp(e);
|
base.OnMouseUp(e);
|
||||||
@ -544,6 +552,10 @@ namespace Sunny.UI
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseLeave(e);
|
base.OnMouseLeave(e);
|
||||||
@ -552,6 +564,10 @@ namespace Sunny.UI
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标进入事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseEnter(EventArgs e)
|
protected override void OnMouseEnter(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseEnter(e);
|
base.OnMouseEnter(e);
|
||||||
|
@ -104,6 +104,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
@ -285,6 +289,10 @@ namespace Sunny.UI
|
|||||||
timer.Stop();
|
timer.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Button != MouseButtons.Left)
|
if (e.Button != MouseButtons.Left)
|
||||||
@ -350,6 +358,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标抬起事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseUp(MouseEventArgs e)
|
protected override void OnMouseUp(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
IsPress = false;
|
IsPress = false;
|
||||||
@ -360,6 +372,10 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private int MousePos;
|
private int MousePos;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
MousePos = e.X;
|
MousePos = e.X;
|
||||||
@ -393,6 +409,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseLeave(e);
|
base.OnMouseLeave(e);
|
||||||
|
@ -132,7 +132,10 @@ namespace Sunny.UI
|
|||||||
return new Rectangle(Width - 17, 1, 16, Height - 2);
|
return new Rectangle(Width - 17, 1, 16, Height - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseDown(e);
|
base.OnMouseDown(e);
|
||||||
@ -162,6 +165,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标抬起事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseUp(MouseEventArgs e)
|
protected override void OnMouseUp(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseUp(e);
|
base.OnMouseUp(e);
|
||||||
@ -169,6 +176,10 @@ namespace Sunny.UI
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseLeave(e);
|
base.OnMouseLeave(e);
|
||||||
@ -176,6 +187,10 @@ namespace Sunny.UI
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标进入事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseEnter(EventArgs e)
|
protected override void OnMouseEnter(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseEnter(e);
|
base.OnMouseEnter(e);
|
||||||
@ -216,6 +231,10 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private bool inLeftArea, inRightArea, inCenterArea;
|
private bool inLeftArea, inRightArea, inCenterArea;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
|
@ -307,6 +307,10 @@ namespace Sunny.UI
|
|||||||
UIIPTextBox_SizeChanged(null, null);
|
UIIPTextBox_SizeChanged(null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
ActiveControl = txt1;
|
ActiveControl = txt1;
|
||||||
@ -418,6 +422,10 @@ namespace Sunny.UI
|
|||||||
txt1.Top = txt2.Top = txt3.Top = txt4.Top = (Height - txt1.Height) / 2;
|
txt1.Top = txt2.Top = txt3.Top = txt4.Top = (Height - txt1.Height) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
|
@ -294,9 +294,9 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 鼠标按下
|
/// 重载鼠标按下事件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="e">e</param>
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseDown(e);
|
base.OnMouseDown(e);
|
||||||
@ -305,9 +305,9 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 鼠标弹起
|
/// 重载鼠标抬起事件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="e">e</param>
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseUp(MouseEventArgs e)
|
protected override void OnMouseUp(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseUp(e);
|
base.OnMouseUp(e);
|
||||||
@ -316,9 +316,9 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 鼠标进入
|
/// 重载鼠标进入事件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="e">e</param>
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseEnter(EventArgs e)
|
protected override void OnMouseEnter(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseEnter(e);
|
base.OnMouseEnter(e);
|
||||||
@ -333,9 +333,9 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 鼠标离开
|
/// 重载鼠标离开事件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="e">e</param>
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseLeave(e);
|
base.OnMouseLeave(e);
|
||||||
|
@ -114,6 +114,10 @@ namespace Sunny.UI
|
|||||||
public new event MouseEventHandler MouseUp;
|
public new event MouseEventHandler MouseUp;
|
||||||
public new event MouseEventHandler MouseMove;
|
public new event MouseEventHandler MouseMove;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
@ -121,6 +125,10 @@ namespace Sunny.UI
|
|||||||
listbox.Font = Font;
|
listbox.Font = Font;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
@ -409,6 +417,10 @@ namespace Sunny.UI
|
|||||||
SetScrollInfo();
|
SetScrollInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
if (Bar != null && Bar.Visible)
|
if (Bar != null && Bar.Visible)
|
||||||
@ -728,12 +740,20 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
MouseIndex = IndexFromPoint(e.Location);
|
MouseIndex = IndexFromPoint(e.Location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseLeave(e);
|
base.OnMouseLeave(e);
|
||||||
@ -772,6 +792,9 @@ namespace Sunny.UI
|
|||||||
return Description + ", " + ImagePath;
|
return Description + ", " + ImagePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 析构函数
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
Image?.Dispose();
|
Image?.Dispose();
|
||||||
|
@ -117,6 +117,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
@ -317,6 +321,10 @@ namespace Sunny.UI
|
|||||||
btnDec.Radius = btnAdd.Radius = value;
|
btnDec.Radius = btnAdd.Radius = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -367,6 +367,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
@ -374,6 +378,10 @@ namespace Sunny.UI
|
|||||||
listbox.Font = Font;
|
listbox.Font = Font;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -104,6 +104,10 @@ namespace Sunny.UI
|
|||||||
base.WndProc(ref m);
|
base.WndProc(ref m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
if (Bar != null && Bar.Visible)
|
if (Bar != null && Bar.Visible)
|
||||||
@ -391,6 +395,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
@ -398,6 +406,10 @@ namespace Sunny.UI
|
|||||||
MouseIndex = IndexFromPoint(e.Location);
|
MouseIndex = IndexFromPoint(e.Location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseLeave(e);
|
base.OnMouseLeave(e);
|
||||||
|
@ -128,6 +128,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
@ -580,6 +584,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseLeave(e);
|
base.OnMouseLeave(e);
|
||||||
@ -587,6 +595,10 @@ namespace Sunny.UI
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
|
@ -517,6 +517,10 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private TreeNode CurrentNode;
|
private TreeNode CurrentNode;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
@ -550,6 +554,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
Graphics g = CreateGraphics();
|
Graphics g = CreateGraphics();
|
||||||
|
@ -124,6 +124,10 @@ namespace Sunny.UI
|
|||||||
p1.FillColor = p1.RectColor = color;
|
p1.FillColor = p1.RectColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
|
@ -193,6 +193,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -150,6 +150,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -187,6 +187,10 @@ namespace Sunny.UI
|
|||||||
edit.ContextMenuStrip = ContextMenuStrip;
|
edit.ContextMenuStrip = ContextMenuStrip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
@ -260,6 +264,10 @@ namespace Sunny.UI
|
|||||||
edit.Focus();
|
edit.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
ActiveControl = edit;
|
ActiveControl = edit;
|
||||||
|
@ -105,6 +105,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
@ -305,6 +309,10 @@ namespace Sunny.UI
|
|||||||
timer.Stop();
|
timer.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Button != MouseButtons.Left)
|
if (e.Button != MouseButtons.Left)
|
||||||
@ -370,6 +378,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标抬起事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseUp(MouseEventArgs e)
|
protected override void OnMouseUp(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
IsPress = false;
|
IsPress = false;
|
||||||
@ -380,6 +392,10 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private int MousePos;
|
private int MousePos;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
MousePos = e.Y;
|
MousePos = e.Y;
|
||||||
@ -413,6 +429,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseLeave(e);
|
base.OnMouseLeave(e);
|
||||||
|
@ -225,6 +225,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
|
@ -172,6 +172,10 @@ namespace Sunny.UI
|
|||||||
set => SetStyle(value);
|
set => SetStyle(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
|
@ -314,6 +314,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
@ -476,6 +480,10 @@ namespace Sunny.UI
|
|||||||
return new Point[0];
|
return new Point[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
//如果鼠标的左键没有按下,重置鼠标状态
|
//如果鼠标的左键没有按下,重置鼠标状态
|
||||||
@ -532,6 +540,10 @@ namespace Sunny.UI
|
|||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
base.Cursor = Cursors.Default;
|
base.Cursor = Cursors.Default;
|
||||||
@ -539,6 +551,10 @@ namespace Sunny.UI
|
|||||||
base.OnMouseLeave(e);
|
base.OnMouseLeave(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
Rectangle collapseRect = CollapseRect;
|
Rectangle collapseRect = CollapseRect;
|
||||||
@ -566,6 +582,10 @@ namespace Sunny.UI
|
|||||||
Invalidate(SplitterRectangle);
|
Invalidate(SplitterRectangle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标抬起事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseUp(MouseEventArgs e)
|
protected override void OnMouseUp(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseUp(e);
|
base.OnMouseUp(e);
|
||||||
|
@ -711,6 +711,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
@ -750,6 +754,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseDown(e);
|
base.OnMouseDown(e);
|
||||||
@ -1080,6 +1088,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
@ -1174,6 +1186,9 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
#region IDisposable 成员
|
#region IDisposable 成员
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 析构函数
|
||||||
|
/// </summary>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_owner = null;
|
_owner = null;
|
||||||
|
@ -516,6 +516,10 @@ namespace Sunny.UI
|
|||||||
SetScrollInfo();
|
SetScrollInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
@ -525,6 +529,10 @@ namespace Sunny.UI
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
@ -772,6 +780,10 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
public bool IsEmpty => edit.Text == "";
|
public bool IsEmpty => edit.Text == "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
ActiveControl = edit;
|
ActiveControl = edit;
|
||||||
|
@ -194,6 +194,10 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private bool InControlBox;
|
private bool InControlBox;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
bool inControlBox = e.Location.InRect(ControlBoxRect);
|
bool inControlBox = e.Location.InRect(ControlBoxRect);
|
||||||
@ -206,6 +210,10 @@ namespace Sunny.UI
|
|||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseLeave(e);
|
base.OnMouseLeave(e);
|
||||||
@ -314,6 +322,10 @@ namespace Sunny.UI
|
|||||||
base.OnMouseClick(e);
|
base.OnMouseClick(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -239,6 +239,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
@ -260,6 +264,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseDown(e);
|
base.OnMouseDown(e);
|
||||||
@ -267,6 +275,10 @@ namespace Sunny.UI
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标抬起事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseUp(MouseEventArgs e)
|
protected override void OnMouseUp(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseUp(e);
|
base.OnMouseUp(e);
|
||||||
|
@ -196,9 +196,9 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// OnSizeChanged
|
/// 重载控件尺寸变更
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="e">e</param>
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -622,6 +622,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载字体变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnFontChanged(EventArgs e)
|
protected override void OnFontChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnFontChanged(e);
|
base.OnFontChanged(e);
|
||||||
@ -645,6 +649,10 @@ namespace Sunny.UI
|
|||||||
SetScrollInfo();
|
SetScrollInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
@ -826,6 +834,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
@ -847,6 +859,10 @@ namespace Sunny.UI
|
|||||||
g.Dispose();
|
g.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
var g = CreateGraphics();
|
var g = CreateGraphics();
|
||||||
|
@ -99,6 +99,10 @@ namespace Sunny.UI
|
|||||||
UpdateStyles();
|
UpdateStyles();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -133,6 +133,10 @@ namespace Sunny.UI
|
|||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseDown(e);
|
base.OnMouseDown(e);
|
||||||
@ -162,6 +166,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标抬起事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseUp(MouseEventArgs e)
|
protected override void OnMouseUp(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseUp(e);
|
base.OnMouseUp(e);
|
||||||
@ -169,6 +177,10 @@ namespace Sunny.UI
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseLeave(e);
|
base.OnMouseLeave(e);
|
||||||
@ -176,6 +188,10 @@ namespace Sunny.UI
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标进入事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseEnter(EventArgs e)
|
protected override void OnMouseEnter(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseEnter(e);
|
base.OnMouseEnter(e);
|
||||||
@ -216,6 +232,10 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private bool inLeftArea, inRightArea, inCenterArea;
|
private bool inLeftArea, inRightArea, inCenterArea;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
|
@ -460,6 +460,10 @@ namespace Sunny.UI
|
|||||||
public UIEditForm Form { get; set; }
|
public UIEditForm Form { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -778,6 +778,10 @@ namespace Sunny.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private Point mouseOffset;
|
private Point mouseOffset;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标按下事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseDown(e);
|
base.OnMouseDown(e);
|
||||||
@ -829,6 +833,10 @@ namespace Sunny.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private long TopBorderStayTicks;
|
private long TopBorderStayTicks;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标抬起事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseUp(MouseEventArgs e)
|
protected override void OnMouseUp(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseUp(e);
|
base.OnMouseUp(e);
|
||||||
@ -861,6 +869,10 @@ namespace Sunny.UI
|
|||||||
FormMoveMouseDown = false;
|
FormMoveMouseDown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
if (FormMoveMouseDown && !MousePosition.Equals(mouseOffset))
|
if (FormMoveMouseDown && !MousePosition.Equals(mouseOffset))
|
||||||
@ -946,6 +958,10 @@ namespace Sunny.UI
|
|||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseLeave(EventArgs e)
|
protected override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseLeave(e);
|
base.OnMouseLeave(e);
|
||||||
@ -1346,6 +1362,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -54,6 +54,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
|
@ -713,6 +713,10 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载控件尺寸变更
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">参数</param>
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnSizeChanged(e);
|
base.OnSizeChanged(e);
|
||||||
@ -721,6 +725,10 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
private bool InControlBox;
|
private bool InControlBox;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重载鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">鼠标参数</param>
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
protected override void OnMouseMove(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseMove(e);
|
base.OnMouseMove(e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user