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