Browse Source

enterTextBox的keypress处理,加音频文件

shim 7 years ago
parent
commit
2bc2f60e5b

+ 1 - 1
UAS-MES/CustomControl/RichText/RichTextAutoBottom.cs

@@ -9,7 +9,7 @@ namespace UAS_MES.CustomControl.RichText
     public partial class RichTextAutoBottom : RichTextBox
     {
         Thread thread;
-        string FileName = Application.StartupPath + @"\Resources\Sound\Windows Background.wav";
+        string FileName = Application.StartupPath + @"\Resources\Sound\3291.wav";
 
         public RichTextAutoBottom()
         {

+ 2 - 1
UAS-MES/CustomControl/TextBoxWithIcon/EnterTextBox.Designer.cs

@@ -32,8 +32,9 @@
             // 
             // EnterTextBox
             // 
-            this.Size = new System.Drawing.Size(196, 21);
+            this.Size = new System.Drawing.Size(196, 28);
             this.Enter += new System.EventHandler(this.EnterTextBox_Enter);
+            this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.EnterTextBox_KeyPress);
             this.Leave += new System.EventHandler(this.EnterTextBox_Leave);
             this.ResumeLayout(false);
 

+ 8 - 0
UAS-MES/CustomControl/TextBoxWithIcon/EnterTextBox.cs

@@ -76,5 +76,13 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
             if (e.Modifiers.CompareTo(Keys.Control) == 0 && e.KeyCode == Keys.A)
                 this.SelectAll();
         }
+
+        private void EnterTextBox_KeyPress(object sender, KeyPressEventArgs e)
+        {
+            if (e.KeyChar == System.Convert.ToChar(13))
+            {
+                e.Handled = true;
+            }
+        }
     }
 }

+ 10 - 10
UAS-MES/FunctionCode/Make/Make_FuselageLabelPrint.Designer.cs

@@ -39,6 +39,7 @@
             this.mcd_okqty_label = new System.Windows.Forms.Label();
             this.pr_code_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.ma_code = new System.Windows.Forms.Label();
             this.Printer = new UAS_MES.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.mcd_remainqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
             this.mcd_okqty = new UAS_MES.CustomControl.ValueLabel.ValueNumLabel(this.components);
@@ -47,7 +48,6 @@
             this.PrintNum = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
-            this.ma_code = new System.Windows.Forms.Label();
             this.SuspendLayout();
             // 
             // PrintLabel
@@ -161,6 +161,15 @@
             this.ms_makecode_label.TabIndex = 163;
             this.ms_makecode_label.Text = "归属工单";
             // 
+            // ma_code
+            // 
+            this.ma_code.AutoSize = true;
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ma_code.Location = new System.Drawing.Point(157, 67);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Size = new System.Drawing.Size(0, 31);
+            this.ma_code.TabIndex = 182;
+            // 
             // Printer
             // 
             this.Printer.Location = new System.Drawing.Point(1213, 65);
@@ -259,15 +268,6 @@
             this.OperateResult.TabIndex = 168;
             this.OperateResult.Text = "";
             // 
-            // ma_code
-            // 
-            this.ma_code.AutoSize = true;
-            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ma_code.Location = new System.Drawing.Point(157, 67);
-            this.ma_code.Name = "ma_code";
-            this.ma_code.Size = new System.Drawing.Size(0, 31);
-            this.ma_code.TabIndex = 182;
-            // 
             // Make_FuselageLabelPrint
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);

BIN
UAS-MES/Resources/Sound/3291.wav


+ 1 - 0
UAS-MES/UAS-MES.csproj

@@ -1085,6 +1085,7 @@
     <None Include="Resources\mailattachment.zip" />
   </ItemGroup>
   <ItemGroup>
+    <Content Include="Resources\Sound\3291.wav" />
     <Content Include="U_Icon.ico" />
     <None Include="Resources\timg.jpg" />
     <None Include="Resources\matte_white_square_icon_business_tool_hammer_128px_571061_easyicon.net.ico" />