锐腾搅拌上料功能
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
3.2 KiB

5 months ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. using DevExpress.XtraEditors;
  9. using ICSSoft.Frame.User.BLL;
  10. using ICSSoft.Base.Language.Tool;
  11. using ICSSoft.Base.UserControl.MessageControl;
  12. using System.Data.SqlClient;
  13. using ICSSoft.Base.Config.AppConfig;
  14. using ICSSoft.Base.Report.Filter;
  15. using ICSSoft.Base.Config.DBHelper;
  16. using ICSSoft.Base.UserControl.FormControl;
  17. using ICSSoft.Base.ReferForm.AppReferForm;
  18. using ICSSoft.Base.Lable.PrintTool;
  19. using ICSSoft.Frame.Data.BLL;
  20. using ICSSoft.Frame.Data.Entity;
  21. using System.Collections;
  22. namespace ICSSoft.Frame.APP
  23. {
  24. public partial class FormICSPOArriveLOTAllCreate : DevExpress.XtraEditors.XtraForm
  25. {
  26. private FormICSRdrecord2LOTUIModelX RecInfo;
  27. public string VenBatch;
  28. #region 构造函数
  29. public FormICSPOArriveLOTAllCreate()
  30. {
  31. InitializeComponent();
  32. }
  33. #endregion
  34. #region 移动窗体
  35. private const int WM_NCHITTEST = 0x84;
  36. private const int HTCLIENT = 0x1;
  37. private const int HTCAPTION = 0x2;
  38. //首先必须了解Windows的消息传递机制,当有鼠标活动消息时,
  39. //系统发送WM_NCHITTEST 消息给窗体作为判断消息发生地的根据。 nchittest
  40. //假如你点击的是标题栏,窗体收到的消息值就是 HTCAPTION ,
  41. //同样地,若接受到的消息是 HTCLIENT,说明用户点击的是客户区,也就是鼠标消息发生在客户区。
  42. //重写窗体,使窗体可以不通过自带标题栏实现移动
  43. protected override void WndProc(ref Message m)
  44. {
  45. //当重载窗体的 WndProc 方法时,可以截获 WM_NCHITTEST 消息并改些该消息,
  46. //当判断鼠标事件发生在客户区时,改写改消息,发送 HTCAPTION 给窗体,
  47. //这样,窗体收到的消息就时 HTCAPTION ,在客户区通过鼠标来拖动窗体就如同通过标题栏来拖动一样。
  48. //注意:当你重载 WndProc 并改写鼠标事件后,整个窗体的鼠标事件也就随之改变了。
  49. switch (m.Msg)
  50. {
  51. case WM_NCHITTEST:
  52. base.WndProc(ref m);
  53. if ((int)m.Result == HTCLIENT)
  54. m.Result = (IntPtr)HTCAPTION;
  55. return;
  56. }
  57. //拦截双击标题栏、移动窗体的系统消息
  58. if (m.Msg != 0xA3)
  59. {
  60. base.WndProc(ref m);
  61. }
  62. }
  63. #endregion
  64. #region 退出
  65. private void btnClose_Click(object sender, EventArgs e)
  66. {
  67. VenBatch = "";
  68. this.DialogResult = DialogResult.No;
  69. this.Close();
  70. }
  71. private void btnExit_Click(object sender, EventArgs e)
  72. {
  73. VenBatch = "";
  74. this.DialogResult = DialogResult.No;
  75. this.Close();
  76. }
  77. #endregion
  78. private void btnLabelCreate_Click(object sender, EventArgs e)
  79. {
  80. VenBatch = txtVenBatch.Text;
  81. this.DialogResult = DialogResult.OK;
  82. this.Close();
  83. }
  84. }
  85. }