BasePane.cs 889 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Collections.Generic;
  3. namespace COM3D2.MeidoPhotoStudio.Plugin
  4. {
  5. internal abstract class BasePane
  6. {
  7. protected List<BaseControl> Controls { get; set; }
  8. protected bool updating = false;
  9. public virtual bool Visible { get; set; }
  10. public virtual bool Enabled { get; set; }
  11. public BasePane()
  12. {
  13. Translation.ReloadTranslationEvent += OnReloadTranslation;
  14. Controls = new List<BaseControl>();
  15. }
  16. ~BasePane()
  17. {
  18. Translation.ReloadTranslationEvent -= OnReloadTranslation;
  19. }
  20. private void OnReloadTranslation(object sender, EventArgs args)
  21. {
  22. ReloadTranslation();
  23. }
  24. protected virtual void ReloadTranslation() { }
  25. public virtual void UpdatePane() { }
  26. public virtual void Draw() { }
  27. }
  28. }