mirror of https://github.com/quasar/Quasar.git
Form disposal on client disconnection
Added disposal method to dispose of all userstate forms for client upon disconnection of the client from the server
This commit is contained in:
parent
5d20aad9d6
commit
9058ec53cc
|
@ -264,6 +264,8 @@ private void HandleState(Client s, bool open)
|
|||
{
|
||||
_clients.Remove(s);
|
||||
OnClientState(s, false);
|
||||
|
||||
s.Value.DisposeForms();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,5 +37,23 @@ public UserState()
|
|||
LastDesktopSeen = true;
|
||||
LastDirectorySeen = true;
|
||||
}
|
||||
|
||||
public void DisposeForms()
|
||||
{
|
||||
if (FrmRdp != null)
|
||||
FrmRdp.Close();
|
||||
if (FrmTm != null)
|
||||
FrmTm.Close();
|
||||
if (FrmFm != null)
|
||||
FrmFm.Close();
|
||||
if (FrmSi != null)
|
||||
FrmSi.Close();
|
||||
if (FrmSm != null)
|
||||
FrmSm.Close();
|
||||
if (FrmRs != null)
|
||||
FrmRs.Close();
|
||||
if (FrmStm != null)
|
||||
FrmStm.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue