BasePane.cs 769 B

1234567891011121314151617181920212223242526
  1. using System;
  2. namespace COM3D2.MeidoPhotoStudio.Plugin
  3. {
  4. public abstract class BasePane
  5. {
  6. protected BaseWindow parent;
  7. protected bool updating;
  8. public virtual bool Visible { get; set; }
  9. public virtual bool Enabled { get; set; }
  10. protected BasePane() => Translation.ReloadTranslationEvent += OnReloadTranslation;
  11. ~BasePane() => Translation.ReloadTranslationEvent -= OnReloadTranslation;
  12. private void OnReloadTranslation(object sender, EventArgs args) => ReloadTranslation();
  13. public virtual void SetParent(BaseWindow window) => parent = window;
  14. protected virtual void ReloadTranslation() { }
  15. public virtual void UpdatePane() { }
  16. public virtual void Draw() { }
  17. }
  18. }