Exemplo n.º 1
0
        public void Remove(MaskButtonEdit aEdit)
        {
            EditElement aElement = Find(aEdit);

            if (aElement != null)
            {
                List.Remove(aElement);
            }
        }
Exemplo n.º 2
0
        public virtual int Add(EditElement element)
        {
            int res = IndexOf(element);

            if (res == -1)
            {
                res = List.Add(element);
            }
            return(res);
        }
        public override DateTime ApplyElement(int result, DateTime editedDateTime)
        {
            MaskElement aElement    = aEdit.Properties.MaskElements[aIndex];
            EditElement editElement = aElement.EditCollection.Find(aEdit);

            if (editElement != null)
            {
                editElement.EditValue = result;
            }
            return(new DateTime(editedDateTime.Ticks + 1));
        }
        public override string Format(DateTime formattedDateTime)
        {
            MaskElement aElement    = aEdit.Properties.MaskElements[aIndex];
            EditElement editElement = aElement.EditCollection.Find(aEdit);

            if (editElement != null)
            {
                return(editElement.EditValue.ToString());
            }
            initvalue = 0;
            return(initvalue.ToString());
        }
        public override DateTimeElementEditor CreateElementEditor(DateTime editedDateTime)
        {
            MaskElement aElement    = aEdit.Properties.MaskElements[aIndex];
            EditElement editElement = aElement.EditCollection.Find(aEdit);

            if (editElement != null)
            {
                initvalue = editElement.EditValue;
            }
            else
            {
                initvalue = 0;
            }
            return(new DateTimeNumericRangeElementEditor(initvalue, aElement.MinValue, aElement.MaxValue, 1, Math.Max(aElement.MinValue.ToString().Length, aElement.MaxValue.ToString().Length)));
        }
Exemplo n.º 6
0
 public void Insert(int index, EditElement value)
 {
     List.Insert(index, value);
 }
Exemplo n.º 7
0
 public int IndexOf(EditElement element)
 {
     return(List.IndexOf(element));
 }