AutoPrintCheckBox.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using UAS_MES.Entity;
  10. namespace UAS_MES.CustomControl.CustomCheckBox
  11. {
  12. public partial class AutoPrintCheckBox : UserControl
  13. {
  14. public AutoPrintCheckBox()
  15. {
  16. InitializeComponent();
  17. this.Load += AutoPrintCheckBox_Load;
  18. }
  19. private void AutoPrintCheckBox_Load(object sender, EventArgs e)
  20. {
  21. if (SystemInf.EnablePrint)
  22. AutoPrint.Checked = true;
  23. else
  24. AutoPrint.Checked = false;
  25. }
  26. public bool Checked
  27. {
  28. get
  29. {
  30. return AutoPrint.Checked;
  31. }
  32. set
  33. {
  34. AutoPrint.Checked = value;
  35. }
  36. }
  37. public override string Text
  38. {
  39. get
  40. {
  41. return AutoPrint.Text;
  42. }
  43. set
  44. {
  45. AutoPrint.Text = value;
  46. }
  47. }
  48. }
  49. }