* 重构一些控件的Dispose事件
This commit is contained in:
parent
face0e2227
commit
9a2acbdf70
@ -80,6 +80,13 @@ namespace Sunny.UI
|
||||
listbox.DrawItem += Listbox_DrawItem;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
bar?.Dispose();
|
||||
listbox?.Dispose();
|
||||
}
|
||||
|
||||
private int scrollBarWidth = 0;
|
||||
|
||||
[DefaultValue(0), Category("SunnyUI"), Description("垂直滚动条宽度,最小为原生滚动条宽度")]
|
||||
|
@ -180,6 +180,9 @@ namespace Sunny.UI
|
||||
base.Dispose(disposing);
|
||||
timer?.Stop();
|
||||
timer?.Dispose();
|
||||
|
||||
bar?.Dispose();
|
||||
listbox?.Dispose();
|
||||
}
|
||||
|
||||
public new event EventHandler MouseLeave;
|
||||
|
@ -94,8 +94,9 @@ namespace Sunny.UI
|
||||
view.MouseClick += View_MouseClick;
|
||||
}
|
||||
|
||||
~UITreeView()
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
view?.Dispose();
|
||||
Bar?.Dispose();
|
||||
HBar?.Dispose();
|
||||
|
Loading…
x
Reference in New Issue
Block a user