private void PrintTimer_Tick(object sender, EventArgs e) { if (pcollapsed) { Print.BringToFront(); Print.Width += 100; if (Print.Size == Print.MaximumSize) { PrintTimer.Stop(); pcollapsed = false; HomeButton.Enabled = true; EventListButton.Enabled = true; EventRegButton.Enabled = true; PrintButton.Enabled = true; } } else { Print.SendToBack(); Print.Width -= 100; if (Print.Size == Print.MinimumSize) { PrintTimer.Stop(); pcollapsed = true; HomeButton.Enabled = true; EventListButton.Enabled = true; EventRegButton.Enabled = true; PrintButton.Enabled = true; } } }
private void PrintTimer_Tick(object sender, EventArgs e) { PrintTimer.Stop(); textOutput.Text = string.Join("\r\n", _lines) + "\r\n"; textOutput.SelectionStart = textOutput.Text.Length; textOutput.SelectionLength = 0; textOutput.ScrollToCaret(); }
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (e.Error != null) { PrintTimer.Stop(); timer1.Stop(); lbl_status.Text = "Error Occurred. Please restart after removing error"; MessageBox.Show(e.Error.ToString()); } }