版博士V2.0程序
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.
 
 
 
 

60 line
1.7 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace ProductionControl.UIExtend
  11. {
  12. public partial class DefectCountOfSizeControl : UserControl
  13. {
  14. public DefectCountOfSizeControl()
  15. {
  16. InitializeComponent();
  17. }
  18. [Description("启用"), Category("自定义")]
  19. public bool Checked
  20. {
  21. get { return this.checkBox1.Checked; }
  22. set { this.checkBox1.Checked=value; }
  23. }
  24. [Description("标题"), Category("自定义")]
  25. public string Title
  26. {
  27. get { return this.checkBox1.Text; }
  28. set { this.checkBox1.Text = value; }
  29. }
  30. [Description("Code"), Category("自定义")]
  31. public string Code
  32. {
  33. get { return this.checkBox1.Tag==null?"":this.checkBox1.Tag.ToString(); }
  34. set { this.checkBox1.Tag = value; }
  35. }
  36. [Description("尺寸范围"), Category("自定义")]
  37. public decimal SizeValue
  38. {
  39. get { return this.numSize.Value; }
  40. set { this.numSize.Value = value; }
  41. }
  42. [Description("最大允许缺陷数量"), Category("自定义")]
  43. public decimal MaxDefectCount
  44. {
  45. get { return this.numMaxDefectCount.Value; }
  46. set { this.numMaxDefectCount.Value = value; }
  47. }
  48. private void checkBox1_CheckedChanged(object sender, EventArgs e)
  49. {
  50. this.numMaxDefectCount.Enabled = this.numSize.Enabled = this.Checked;
  51. }
  52. }
  53. }