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 EventListButton_Click(object sender, EventArgs e) { distance = Marker.Top - EventListButton.Top; checksize(); timer1.Start(); if (elcollapsed) { HomeButton.Enabled = false; EventListButton.Enabled = false; EventRegButton.Enabled = false; PrintButton.Enabled = false; EventListTimer.Start(); if (!hcollapsed) { HomeTimer.Start(); } if (!ercollapsed) { EventRegTimer.Start(); } if (!pcollapsed) { PrintTimer.Start(); } } }
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 FrmMain_Load(object sender, EventArgs e) { openConnection(); timer1.Start(); PrintTimer.Start(); }
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()); } }
public void Print(string text) { _lines.Add(text); PrintTimer.Start(); }
public void Clear() { _lines.Clear(); PrintTimer.Start(); }