版博士V2.0程序
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

67 строки
1.9 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 Threshold
  38. {
  39. get { return this.numThreshold.Value; }
  40. set { this.numThreshold.Value = value; }
  41. }
  42. [Description("尺寸范围"), Category("自定义")]
  43. public decimal SizeValue
  44. {
  45. get { return this.numSize.Value; }
  46. set { this.numSize.Value = value; }
  47. }
  48. [Description("最大允许缺陷数量"), Category("自定义")]
  49. public decimal MaxDefectCount
  50. {
  51. get { return this.numMaxDefectCount.Value; }
  52. set { this.numMaxDefectCount.Value = value; }
  53. }
  54. private void checkBox1_CheckedChanged(object sender, EventArgs e)
  55. {
  56. this.numMaxDefectCount.Enabled = this.numThreshold.Enabled = this.numSize.Enabled = this.Checked;
  57. }
  58. }
  59. }