private void StreamView_VisibleChanged(object sender, EventArgs e)
{
if (this.Visible == true)
{
if (Properties.Settings.Default.TopMost)
{
this.TopMost = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
stayOnTopToolStripMenuItem.Checked = true;
}
this.shouldRun = true;
this.readerThread = new Thread(ReaderThread);
this.readerThread.Priority = ThreadPriority.BelowNormal;
this.readerThread.Start();
}
else
{
this.shouldRun = false;
this.readerThread.Join();
}
}