Beispiel #1
0
        // Show/hide the details box
        private void CheckBoxDetails_CheckedChanged(object sender, EventArgs e)
        {
            this.MaximumSize = new Size(int.MaxValue, int.MaxValue);
            this.MinimumSize = new Size(500, 180);

            // Show
            if (CheckBoxDetails.Checked)
            {
                if (TextBoxDetails.Tag == null)
                {
                    return;                     // error
                }
                if ((int)TextBoxDetails.Tag < 30)
                {
                    TextBoxDetails.Tag = 30;
                }
                TextBoxDetails.Visible = true;

                this.Height += (int)TextBoxDetails.Tag;
                TextBoxDetails.Focus();
                TextBoxDetails.ScrollToCaret();
            }

            // Hide
            else
            {
                TextBoxDetails.Tag     = TextBoxDetails.Height;
                TextBoxDetails.Visible = false;
                this.Height            = this.MinimumSize.Height;
            }
        }
Beispiel #2
0
        // Received a line on std error from the process
        protected void OnError(string data)
        {
            string val = (string)data.Clone();

            if (val.Contains("Duration:"))
            {
                GetDuration(val);
            }

            if (app.status != "Downloading")
            {
                app.status = "Analyzing";
            }

            this.Invoke(new Action(() => {
                TextBoxDetails.AppendText(val + "\r\n");
            }));
        }