BasePane.cs 810 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. namespace COM3D2.MeidoPhotoStudio.Plugin
  4. {
  5. public abstract class BasePane : BaseControl
  6. {
  7. protected List<BaseControl> Controls { get; set; }
  8. protected List<BasePane> Panes { get; set; }
  9. protected bool updating = false;
  10. public BasePane()
  11. {
  12. Translation.ReloadTranslationEvent += OnReloadTranslation;
  13. Controls = new List<BaseControl>();
  14. Panes = new List<BasePane>();
  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. }
  26. }