private void OnSessionSwitch(object sender, SessionSwitchEventArgs e)
{
if (!outConnect)
{
if (e.Reason == SessionSwitchReason.SessionLock || e.Reason == SessionSwitchReason.ConsoleDisconnect)
{
CheckFiles();
Standart();
Data.WriteParam();
}
outConnect = true;
}
else
{
if (e.Reason == SessionSwitchReason.ConsoleConnect || e.Reason == SessionSwitchReason.SessionUnlock)
{
Data.ReadParam();
}
outConnect = false;
}
}