Beispiel #1
0
        public static Request GenerateRequest(GUpdateBordersType type, GBorderLineType lineType, GRange range)
        {
            UpdateBordersRequest request;

            switch (type)
            {
            case GUpdateBordersType.InnerRows:
                request = GetInnerRows(range, lineType);
                break;

            case GUpdateBordersType.InnerColumns:
                request = GetInnerCols(range, lineType);
                break;

            case GUpdateBordersType.Outer:
            default:
                request = GetOuterBorders(range, lineType);
                break;
            }

            return(new Request()
            {
                UpdateBorders = request
            });
        }
Beispiel #2
0
 public static UpdateBordersRequest GetInnerCols(GRange range, GBorderLineType lineType)
 {
     return(new UpdateBordersRequest()
     {
         InnerHorizontal = BorderDictionary[lineType],
         Range = range.GetGridRange()
     });
 }
Beispiel #3
0
 public static UpdateBordersRequest GetOuterBorders(GRange range, GBorderLineType lineType)
 {
     return(new UpdateBordersRequest()
     {
         Bottom = BorderDictionary[lineType],
         Left = BorderDictionary[lineType],
         Right = BorderDictionary[lineType],
         Top = BorderDictionary[lineType],
         Range = range.GetGridRange()
     });
 }