CurrencyEditor.cs 689 B

12345678910111213141516171819202122232425262728293031
  1. namespace InABox.Core
  2. {
  3. public class CurrencyEditor : NumericEditor, IButtonEditor
  4. {
  5. public CurrencyEditor(int digits) : base(digits)
  6. {
  7. Buttons = new EditorButton[] { };
  8. Format = $"C{digits}";
  9. }
  10. public CurrencyEditor() : this(2)
  11. {
  12. }
  13. public string CurrencySymbol { get; set; }
  14. public EditorButton[]? Buttons { get; set; }
  15. protected override BaseEditor DoClone()
  16. {
  17. return new CurrencyEditor(Digits)
  18. {
  19. Buttons = Buttons,
  20. CurrencySymbol = CurrencySymbol
  21. };
  22. }
  23. }
  24. }