UserControlPlus.cs 853 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. namespace Y.Skin.YoControl
  10. {
  11. public partial class UserControlPlus : UserControl
  12. {
  13. public UserControlPlus()
  14. {
  15. InitializeComponent();
  16. }
  17. private void UserControlPlus_Load(object sender, EventArgs e)
  18. {
  19. }
  20. protected void UIVisible(Control ctrl, bool visible = true)
  21. {
  22. Invoke(new Action(() =>
  23. {
  24. ctrl.Visible = visible;
  25. }));
  26. }
  27. protected void UIEnable(Control ctrl, bool enable = true)
  28. {
  29. Invoke(new Action(() =>
  30. {
  31. ctrl.Enabled = enable;
  32. }));
  33. }
  34. }
  35. }