示例#1
0
 public RichTextIndentMaskManager(RepositoryItemRichTextIndentEdit properties, UIUnitConverter unitConverter)
 {
     Guard.ArgumentNotNull(properties, "properties");
     Guard.ArgumentNotNull(unitConverter, "unitConverter");
     this.properties    = properties;
     this.unitConverter = unitConverter;
 }
示例#2
0
 public RichTextIndentEdit()
 {
     this.batchUpdateHelper  = new BatchUpdateHelper(this);
     this.uiUnitConverter    = new UIUnitConverter(GetUnitPrecisions());
     this.valueUnitConverter = new DocumentModelUnitTwipsConverter();
     //EditValue = UIUnit.Create("0", DocumentUnit.Inch, UnitPrecisionDictionary.DefaultPrecisions); // ???
     EditValue       = uiUnitConverter.CreateUIUnit("0", Properties.DefaultUnitType);
     this.exactValue = 0;
     SubscribeEvents();
 }
示例#3
0
        public bool IsWithinAllowedLimits(string stringValue, DocumentUnit unitType, bool isValueInPercent, UIUnitConverter uiUnitConverter)
        {
            UIUnit unit     = uiUnitConverter.CreateUIUnit(stringValue, unitType, isValueInPercent);
            int    intValue = uiUnitConverter.ToTwipsUnit(unit, IsValueInPercent);

            return(IsWithinAllowedLimits(intValue));
        }