mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Check is control disposed
This commit is contained in:
parent
f685dd177b
commit
8de52c9737
1 changed files with 12 additions and 4 deletions
|
@ -48,15 +48,23 @@ public ControlHider(Control control, int autoHideTime)
|
|||
private void Timer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
timer.Stop();
|
||||
|
||||
if (Control != null && !Control.IsDisposed)
|
||||
{
|
||||
Control.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void Show()
|
||||
{
|
||||
if (Control != null && !Control.IsDisposed)
|
||||
{
|
||||
Control.Visible = true;
|
||||
|
||||
timer.Stop();
|
||||
timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue