public void Disconnect()
{
try
{
if (isConnected)
{
monitorClient.SaveWatchs();
monitorClient.SaveStatistics();
monitorClient.Close();
isConnected = false;
Update();
timer.Stop();
}
}
catch (TimeoutException te)
{
#if DEBUG
view.ShowError(te.ToString());
#else
view.ShowError(te.Message);
#endif
}
catch (EndpointNotFoundException enfe)
{
#if DEBUG
view.ShowError(enfe.ToString());
#else
view.ShowError(enfe.Message);
#endif
}
}