예제 #1
0
        public void SetForegroundBrush(IBrush brush, int startIndex, int length)
        {
            var key   = new FBrushRange(startIndex, length);
            int index = _foregroundBrushes.FindIndex(v => v.Key.Equals(key));

            if (index > -1)
            {
                _foregroundBrushes.RemoveAt(index);
            }

            if (brush != null)
            {
                _foregroundBrushes.Insert(0, new KeyValuePair <FBrushRange, IBrush>(key, brush));
            }
        }
예제 #2
0
        public void SetForegroundBrush(IBrush brush, int startIndex, int length)
        {
            var key = new FBrushRange(startIndex, length);

            if (brush == null)
            {
                if (_foregroundBrushes.ContainsKey(key))
                {
                    _foregroundBrushes.Remove(key);
                }
            }
            else
            {
                _foregroundBrushes[key] = brush;
            }
        }
예제 #3
0
        public void SetForegroundBrush(IBrush brush, int startIndex, int length)
        {
            var key = new FBrushRange(startIndex, length);
            int index = _foregroundBrushes.FindIndex(v => v.Key.Equals(key));

            if (index > -1)
            {
                _foregroundBrushes.RemoveAt(index);
            }

            if (brush != null)
            {
                _foregroundBrushes.Insert(0, new KeyValuePair<FBrushRange, IBrush>(key, brush));
            }
        }
예제 #4
0
 public void SetForegroundBrush(IBrush brush, int startIndex, int length)
 {
     var key = new FBrushRange(startIndex, length);
     if (brush == null)
     {
         if (_foregroundBrushes.ContainsKey(key))
             _foregroundBrushes.Remove(key);
     }
     else
     {
         _foregroundBrushes[key] = brush;
     }
 }