Beispiel #1
0
 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;
         }
     }
 }
Beispiel #2
0
 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();
         }
     }
 }
Beispiel #3
0
 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();
 }
Beispiel #4
0
        private void FrmMain_Load(object sender, EventArgs e)
        {
            openConnection();



            timer1.Start();
            PrintTimer.Start();
        }
Beispiel #5
0
        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());
            }
        }
Beispiel #6
0
 public void Print(string text)
 {
     _lines.Add(text);
     PrintTimer.Start();
 }
Beispiel #7
0
 public void Clear()
 {
     _lines.Clear();
     PrintTimer.Start();
 }