jt
2021-06-10 5d0d028456874576560552f5a5c4e8b801786f11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.Text;
 
namespace HH.WMS.Utils.ExcelLibrary.SpreadSheet
{
    public class Row
    {
        Dictionary<int, Cell> Cells = new Dictionary<int, Cell>();
 
        public int FirstColIndex = int.MaxValue;
        public int LastColIndex = int.MinValue;
 
        public UInt16 Height = 257;
 
        public Cell GetCell(int colIndex)
        {
            if (Cells.ContainsKey(colIndex))
            {
                return Cells[colIndex];
            }
            return Cell.EmptyCell;
        }
 
        public void SetCell(int colIndex, Cell cell)
        {
            FirstColIndex = Math.Min(FirstColIndex, colIndex);
            LastColIndex = Math.Max(LastColIndex, colIndex);
            Cells[colIndex] = cell;
        }
 
        public Dictionary<int, Cell>.Enumerator GetEnumerator()
        {
            return Cells.GetEnumerator();
        }
    }
}