Browse Source

进度查询可滚动

shim 8 years ago
parent
commit
eab4461761

+ 116 - 102
UAS-MES/FunctionCode/Query/Query_ExeProgress.Designer.cs

@@ -31,6 +31,15 @@
             this.sn_code_label = new System.Windows.Forms.Label();
             this.SerialPanel = new System.Windows.Forms.Panel();
             this.CraftInfDgv = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.mp_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mp_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ma_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mp_sourcecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mp_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ma_craftcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sc_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mp_inman = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.em_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.groupBoxWithBorder1 = new UAS_MES.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.label1 = new System.Windows.Forms.Label();
             this.pictureBox4 = new System.Windows.Forms.PictureBox();
@@ -41,15 +50,6 @@
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.sn_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.mp_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mp_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ma_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mp_sourcecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mp_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ma_craftcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.sc_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mp_inman = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.em_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
@@ -62,9 +62,10 @@
             // 
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_code_label.Location = new System.Drawing.Point(10, 11);
+            this.sn_code_label.Location = new System.Drawing.Point(15, 16);
+            this.sn_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.sn_code_label.Name = "sn_code_label";
-            this.sn_code_label.Size = new System.Drawing.Size(58, 21);
+            this.sn_code_label.Size = new System.Drawing.Size(86, 31);
             this.sn_code_label.TabIndex = 183;
             this.sn_code_label.Text = "序列号";
             // 
@@ -72,12 +73,13 @@
             // 
             this.SerialPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
+            this.SerialPanel.AutoScroll = true;
             this.SerialPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.SerialPanel.Location = new System.Drawing.Point(14, 107);
-            this.SerialPanel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.SerialPanel.Location = new System.Drawing.Point(21, 160);
             this.SerialPanel.Name = "SerialPanel";
-            this.SerialPanel.Size = new System.Drawing.Size(950, 254);
+            this.SerialPanel.Size = new System.Drawing.Size(1423, 379);
             this.SerialPanel.TabIndex = 194;
+            this.SerialPanel.Scroll += new System.Windows.Forms.ScrollEventHandler(this.SerialPanel_Scroll);
             this.SerialPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.SerialPanel_Paint);
             // 
             // CraftInfDgv
@@ -95,13 +97,74 @@
             this.sc_linecode,
             this.mp_inman,
             this.em_name});
-            this.CraftInfDgv.Location = new System.Drawing.Point(0, 388);
-            this.CraftInfDgv.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.CraftInfDgv.EnableContentClick = true;
+            this.CraftInfDgv.Location = new System.Drawing.Point(0, 582);
             this.CraftInfDgv.Name = "CraftInfDgv";
             this.CraftInfDgv.RowTemplate.Height = 27;
-            this.CraftInfDgv.Size = new System.Drawing.Size(975, 190);
+            this.CraftInfDgv.Size = new System.Drawing.Size(1462, 285);
             this.CraftInfDgv.TabIndex = 193;
             // 
+            // mp_sncode
+            // 
+            this.mp_sncode.DataPropertyName = "mp_sncode";
+            this.mp_sncode.HeaderText = "序列号";
+            this.mp_sncode.Name = "mp_sncode";
+            this.mp_sncode.Width = 120;
+            // 
+            // mp_makecode
+            // 
+            this.mp_makecode.DataPropertyName = "mp_makecode";
+            this.mp_makecode.HeaderText = "工单代码";
+            this.mp_makecode.Name = "mp_makecode";
+            this.mp_makecode.Width = 120;
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.DataPropertyName = "ma_prodcode";
+            this.ma_prodcode.HeaderText = "产品代码";
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.Width = 120;
+            // 
+            // mp_sourcecode
+            // 
+            this.mp_sourcecode.DataPropertyName = "mp_sourcecode";
+            this.mp_sourcecode.HeaderText = "资源编号";
+            this.mp_sourcecode.Name = "mp_sourcecode";
+            this.mp_sourcecode.Width = 120;
+            // 
+            // mp_indate
+            // 
+            this.mp_indate.DataPropertyName = "mp_indate";
+            this.mp_indate.HeaderText = "过站时间";
+            this.mp_indate.Name = "mp_indate";
+            this.mp_indate.Width = 120;
+            // 
+            // ma_craftcode
+            // 
+            this.ma_craftcode.DataPropertyName = "ma_craftcode";
+            this.ma_craftcode.HeaderText = "途程代码";
+            this.ma_craftcode.Name = "ma_craftcode";
+            this.ma_craftcode.Width = 120;
+            // 
+            // sc_linecode
+            // 
+            this.sc_linecode.DataPropertyName = "sc_linecode";
+            this.sc_linecode.HeaderText = "产线";
+            this.sc_linecode.Name = "sc_linecode";
+            this.sc_linecode.Width = 120;
+            // 
+            // mp_inman
+            // 
+            this.mp_inman.DataPropertyName = "mp_inman";
+            this.mp_inman.HeaderText = "人员工号";
+            this.mp_inman.Name = "mp_inman";
+            // 
+            // em_name
+            // 
+            this.em_name.DataPropertyName = "em_name";
+            this.em_name.HeaderText = "人员姓名";
+            this.em_name.Name = "em_name";
+            // 
             // groupBoxWithBorder1
             // 
             this.groupBoxWithBorder1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
@@ -116,9 +179,11 @@
             this.groupBoxWithBorder1.Controls.Add(this.label2);
             this.groupBoxWithBorder1.Controls.Add(this.label3);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(12, 40);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(18, 60);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(953, 40);
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(1430, 60);
             this.groupBoxWithBorder1.TabIndex = 192;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = "颜色说明";
@@ -128,27 +193,30 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(848, 14);
+            this.label1.Location = new System.Drawing.Point(1272, 21);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(74, 21);
+            this.label1.Size = new System.Drawing.Size(110, 31);
             this.label1.TabIndex = 193;
             this.label1.Text = "尚未执行";
             // 
             // pictureBox4
             // 
             this.pictureBox4.BackColor = System.Drawing.Color.White;
-            this.pictureBox4.Location = new System.Drawing.Point(776, 12);
+            this.pictureBox4.Location = new System.Drawing.Point(1164, 18);
+            this.pictureBox4.Margin = new System.Windows.Forms.Padding(4);
             this.pictureBox4.Name = "pictureBox4";
-            this.pictureBox4.Size = new System.Drawing.Size(60, 20);
+            this.pictureBox4.Size = new System.Drawing.Size(90, 30);
             this.pictureBox4.TabIndex = 192;
             this.pictureBox4.TabStop = false;
             // 
             // pictureBox2
             // 
             this.pictureBox2.BackColor = System.Drawing.Color.Green;
-            this.pictureBox2.Location = new System.Drawing.Point(99, 12);
+            this.pictureBox2.Location = new System.Drawing.Point(148, 18);
+            this.pictureBox2.Margin = new System.Windows.Forms.Padding(4);
             this.pictureBox2.Name = "pictureBox2";
-            this.pictureBox2.Size = new System.Drawing.Size(60, 20);
+            this.pictureBox2.Size = new System.Drawing.Size(90, 30);
             this.pictureBox2.TabIndex = 187;
             this.pictureBox2.TabStop = false;
             // 
@@ -156,27 +224,30 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(653, 14);
+            this.label4.Location = new System.Drawing.Point(980, 21);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(58, 21);
+            this.label4.Size = new System.Drawing.Size(86, 31);
             this.label4.TabIndex = 191;
             this.label4.Text = "已报废";
             // 
             // pictureBox1
             // 
             this.pictureBox1.BackColor = System.Drawing.Color.Red;
-            this.pictureBox1.Location = new System.Drawing.Point(338, 12);
+            this.pictureBox1.Location = new System.Drawing.Point(507, 18);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4);
             this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(60, 20);
+            this.pictureBox1.Size = new System.Drawing.Size(90, 30);
             this.pictureBox1.TabIndex = 186;
             this.pictureBox1.TabStop = false;
             // 
             // pictureBox3
             // 
             this.pictureBox3.BackColor = System.Drawing.Color.Black;
-            this.pictureBox3.Location = new System.Drawing.Point(581, 12);
+            this.pictureBox3.Location = new System.Drawing.Point(872, 18);
+            this.pictureBox3.Margin = new System.Windows.Forms.Padding(4);
             this.pictureBox3.Name = "pictureBox3";
-            this.pictureBox3.Size = new System.Drawing.Size(60, 20);
+            this.pictureBox3.Size = new System.Drawing.Size(90, 30);
             this.pictureBox3.TabIndex = 190;
             this.pictureBox3.TabStop = false;
             // 
@@ -184,9 +255,10 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(171, 14);
+            this.label2.Location = new System.Drawing.Point(256, 21);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(122, 21);
+            this.label2.Size = new System.Drawing.Size(182, 31);
             this.label2.TabIndex = 188;
             this.label2.Text = "已执行且为良品";
             // 
@@ -194,9 +266,10 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(410, 14);
+            this.label3.Location = new System.Drawing.Point(615, 21);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(138, 21);
+            this.label3.Size = new System.Drawing.Size(206, 31);
             this.label3.TabIndex = 189;
             this.label3.Text = "已执行且为不良品";
             // 
@@ -205,10 +278,11 @@
             this.sn_code.AllPower = null;
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(92, 13);
+            this.sn_code.Location = new System.Drawing.Point(138, 20);
+            this.sn_code.Margin = new System.Windows.Forms.Padding(4);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(145, 21);
+            this.sn_code.Size = new System.Drawing.Size(216, 28);
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
@@ -216,91 +290,31 @@
             this.sn_code.Tag = "NoAuto";
             this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
             // 
-            // mp_sncode
-            // 
-            this.mp_sncode.DataPropertyName = "mp_sncode";
-            this.mp_sncode.HeaderText = "序列号";
-            this.mp_sncode.Name = "mp_sncode";
-            this.mp_sncode.Width = 120;
-            // 
-            // mp_makecode
-            // 
-            this.mp_makecode.DataPropertyName = "mp_makecode";
-            this.mp_makecode.HeaderText = "工单代码";
-            this.mp_makecode.Name = "mp_makecode";
-            this.mp_makecode.Width = 120;
-            // 
-            // ma_prodcode
-            // 
-            this.ma_prodcode.DataPropertyName = "ma_prodcode";
-            this.ma_prodcode.HeaderText = "产品代码";
-            this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Width = 120;
-            // 
-            // mp_sourcecode
-            // 
-            this.mp_sourcecode.DataPropertyName = "mp_sourcecode";
-            this.mp_sourcecode.HeaderText = "资源编号";
-            this.mp_sourcecode.Name = "mp_sourcecode";
-            this.mp_sourcecode.Width = 120;
-            // 
-            // mp_indate
-            // 
-            this.mp_indate.DataPropertyName = "mp_indate";
-            this.mp_indate.HeaderText = "过站时间";
-            this.mp_indate.Name = "mp_indate";
-            this.mp_indate.Width = 120;
-            // 
-            // ma_craftcode
-            // 
-            this.ma_craftcode.DataPropertyName = "ma_craftcode";
-            this.ma_craftcode.HeaderText = "途程代码";
-            this.ma_craftcode.Name = "ma_craftcode";
-            this.ma_craftcode.Width = 120;
-            // 
-            // sc_linecode
-            // 
-            this.sc_linecode.DataPropertyName = "sc_linecode";
-            this.sc_linecode.HeaderText = "产线";
-            this.sc_linecode.Name = "sc_linecode";
-            this.sc_linecode.Width = 120;
-            // 
-            // mp_inman
-            // 
-            this.mp_inman.DataPropertyName = "mp_inman";
-            this.mp_inman.HeaderText = "人员工号";
-            this.mp_inman.Name = "mp_inman";
-            // 
-            // em_name
-            // 
-            this.em_name.DataPropertyName = "em_name";
-            this.em_name.HeaderText = "人员姓名";
-            this.em_name.Name = "em_name";
-            // 
             // Query_ExeProgress
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(975, 578);
+            this.ClientSize = new System.Drawing.Size(1462, 867);
             this.Controls.Add(this.SerialPanel);
             this.Controls.Add(this.CraftInfDgv);
             this.Controls.Add(this.groupBoxWithBorder1);
             this.Controls.Add(this.sn_code);
             this.Controls.Add(this.sn_code_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "Query_ExeProgress";
             this.Tag = "Query!ExeProgress";
             this.Text = "工单执行进度";
             this.Load += new System.EventHandler(this.工单执行进度_Load);
             this.SizeChanged += new System.EventHandler(this.工单执行进度_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).EndInit();
-            this.groupBoxWithBorder1.ResumeLayout(false);
+            this.groupBoxWithBorder1.ResumeLayout(true);
             this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 14 - 7
UAS-MES/FunctionCode/Query/Query_ExeProgress.cs

@@ -326,12 +326,12 @@ namespace UAS_MES.Query
 
                         //设定param文本框的位置
                         //Param.Location = new Point(x + r.Width / 14 * RectangleCountEachRow, y + r.Height / 10 * 4);
-                        Param.Location = new Point(x + (int)(r.Width - size.Width) / 2, y + (int)(r.Height - size.Height) / 2);
+                        Param.Location = new Point(SerialPanel.AutoScrollPosition.X + x + (int)(r.Width - size.Width) / 2, SerialPanel.AutoScrollPosition.Y + y + (int)(r.Height - size.Height) / 2);
                         graphics.Dispose();
                         //如果在奇数行
                         if (i % 2 != 0)
                         {
-                            r.Location = new Point(x, y);
+                            r.Location = new Point(SerialPanel.AutoScrollPosition.X + x, SerialPanel.AutoScrollPosition.Y + y);
                             g.FillRectangle(PaintColor[j], r);
                             //填充方块内的信息
                             if (SerialPanel.Controls[Param.Name] == null)
@@ -342,13 +342,13 @@ namespace UAS_MES.Query
                             //如果是一行中的箭头
                             if (j + 1 < RectangleCountEachRow * i)
                             {
-                                g.DrawLine(p, x + r.Width + 10, y + r.Height / 2, x + ScreenWidth / (RectangleCountEachRow), y + r.Height / 2);
+                                g.DrawLine(p, SerialPanel.AutoScrollPosition.X+ x + r.Width + 10, SerialPanel.AutoScrollPosition.Y + y + r.Height / 2, SerialPanel.AutoScrollPosition.X + x + ScreenWidth / (RectangleCountEachRow), SerialPanel.AutoScrollPosition.Y + y + r.Height / 2);
                                 x += ScreenWidth / RectangleCountEachRow;
                             }
                             //如果是行的最后一个的箭头
                             else if (j + 1 == RectangleCountEachRow * i)
                             {
-                                g.DrawLine(p, x + r.Width / 2, y + r.Height + 10, x + r.Width / 2, y + r.Height + r.Height);
+                                g.DrawLine(p, SerialPanel.AutoScrollPosition.X + x + r.Width / 2, SerialPanel.AutoScrollPosition.Y + y + r.Height + 10, SerialPanel.AutoScrollPosition.X + x + r.Width / 2, SerialPanel.AutoScrollPosition.Y + y + r.Height + r.Height);
                                 y = y + r.Height + r.Height;
                             }
 
@@ -356,7 +356,7 @@ namespace UAS_MES.Query
                         //如果在偶数行
                         else
                         {
-                            r.Location = new Point(x, y);
+                            r.Location = new Point(SerialPanel.AutoScrollPosition.X + x, SerialPanel.AutoScrollPosition.Y + y);
                             g.FillRectangle(PaintColor[j], r);
                             //填充文字信息
                             //存在这个名称的则不进行添加
@@ -372,13 +372,13 @@ namespace UAS_MES.Query
                             //如果不是本行的最后一个画横向的箭头
                             if (j + 1 < RectangleCountEachRow * i)
                             {
-                                g.DrawLine(p, (x - 10), (y + r.Height / 2), (x - ScreenWidth / RectangleCountEachRow + r.Width), (y + r.Height / 2));
+                                g.DrawLine(p, SerialPanel.AutoScrollPosition.X + (x - 10), SerialPanel.AutoScrollPosition.Y + (y + r.Height / 2), SerialPanel.AutoScrollPosition.X + (x - ScreenWidth / RectangleCountEachRow + r.Width), SerialPanel.AutoScrollPosition.Y + (y + r.Height / 2));
                                 x -= ScreenWidth / RectangleCountEachRow;
                             }
                             //如果是最后一个画纵向的箭头
                             else if (j + 1 == RectangleCountEachRow * i)
                             {
-                                g.DrawLine(p, (x + r.Width / 2), (y + r.Height + 10), (x + r.Width / 2), (y + r.Height + r.Height));
+                                g.DrawLine(p, SerialPanel.AutoScrollPosition.X + (x + r.Width / 2), SerialPanel.AutoScrollPosition.Y + (y + r.Height + 10), SerialPanel.AutoScrollPosition.X + (x + r.Width / 2), SerialPanel.AutoScrollPosition.Y + (y + r.Height + r.Height));
                                 y = y + r.Height + r.Height;
                             }
                         }
@@ -387,5 +387,12 @@ namespace UAS_MES.Query
                 }
             }
         }
+
+        private void SerialPanel_Scroll(object sender, ScrollEventArgs e)
+        {
+            Graphics g = this.SerialPanel.CreateGraphics();
+            g.Clear(this.BackColor);
+            SerialPanel.Refresh();
+        }
     }
 }