ControlRadioButton.cs 598 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows.Forms;
  6. namespace Core.StlMes.Client.SaleOrder.Control
  7. {
  8. public class ControlRadioButton : RadioButton
  9. {
  10. private int num = 1;
  11. protected override void OnClick(EventArgs e)
  12. {
  13. if (this.Checked) { num = 0; } else { num = 1; }
  14. base.OnClick(e);
  15. num++;
  16. if (num % 2 == 0) { this.Checked = true; }
  17. else
  18. {
  19. this.Checked = false;
  20. }
  21. }
  22. }
  23. }