namespace InABox.Core
{
    public class DoubleEditor : BaseEditor
    {
        public DoubleEditor(int digits = 2)
        {
            Digits = digits;
            Visible = Visible.Default;
            Width = 70;
            Format = string.Format("F{0}", digits);
            Alignment = Alignment.MiddleRight;
        }

        public int Digits { get; }

        protected override BaseEditor DoClone()
        {
            return new DoubleEditor(Digits);
        }
    }
}