public Unit UnitFor(ValuePointColumn column)
      {
         if (column == ValuePointColumn.X)
            return _formula.XDisplayUnit;

         return _formula.YDisplayUnit;
      }
 public void SetUnit(ValuePointColumn column, Unit newUnit)
 {
    if (column == ValuePointColumn.X)
       SetXUnit(newUnit);
    else
       SetYUnit(newUnit);
 }
      public IEnumerable<Unit> AvailableUnitsFor(ValuePointColumn column)
      {
         if (column == ValuePointColumn.X)
            return _formula.XDimension.Units;

         return _formula.Dimension.Units;
      }
Exemplo n.º 4
0
        private DXMenuItem createUnitMenuItem(ValuePointColumn columnIndex, Unit unit)
        {
            var          currentUnit = _presenter.UnitFor(columnIndex);
            var          tag         = new Tuple <ValuePointColumn, Unit>(columnIndex, unit);
            EventHandler handler     = (o, e) => OnEvent(setUnit, o, e);

            if (Equals(currentUnit, unit))
            {
                return new DXMenuCheckItem(unit.Name, check: true, image: null, checkedChanged: handler)
                       {
                           Tag = tag
                       }
            }
            ;

            return(new DXMenuItem(unit.Name, handler)
            {
                Tag = tag
            });
        }