private void GoDownTimerTick(object sender, EventArgs e)
{
//Debug.WriteLine(String.Format("DEBUG Begin Toast.GoDownTimerTick(): Bounds = {0}", this.DesktopBounds));
//Lower window by 5 pixels
startPosY += 5;
//If window is fully visible stop the timer
if (startPosY > Screen.PrimaryScreen.Bounds.Height)
{
#if __MonoCS__
// The window doesn't move onto and off the screen on Wasta 14 Linux for some reason. I suspect some sort of system setting,
// not Mono, since it works fine on Trusty Linux and the Bounds values all look correct on Wasta 14. So we'll just make this
// form invisible at the right time. This should not hurt anything on Trusty, but I'm marking it for Mono only just in case
// setting Visible has the same wierd bug on Windows as calling Close().
this.Visible = false;
#endif
_goDownTimer.Stop();
//If the client app starts with a "show dialog" open (e.g., selecting a file to open), this Close() actually closes *that* dialog, which is, um, bad.
//So I'm just going to not do the close, figuring that it only runs once per run of the application anyhow
//Close();
_currentMessage = null;
}
else
{
SetDesktopLocation(startPosX, startPosY);
this.Refresh();
}
//Debug.WriteLine(String.Format("DEBUG End Toast.GoDownTimerTick(): Bounds = {0}", this.DesktopBounds));
}