示例#1
0
        private FormattingHint RetrieveFormattingHint()
        {
            FormattingHint formattingHint = this.formattingHint;

            this.formattingHint = null;
            return(formattingHint);
        }
示例#2
0
        /// <summary>
        /// helper for consuming the formatting hint
        /// </summary>
        /// <returns></returns>
        private FormattingHint RetrieveFormattingHint()
        {
            FormattingHint fh = _formattingHint;

            _formattingHint = null;
            return(fh);
        }
示例#3
0
 private void ProcessCachedGroupOnWide(WideViewHeaderInfo wvhi, List <PacketInfoData> objects)
 {
     if (wvhi.columns == 0)
     {
         int num = 0;
         foreach (PacketInfoData data in objects)
         {
             FormatEntryData data2 = data as FormatEntryData;
             if (data2 != null)
             {
                 WideViewEntry       formatEntryInfo     = data2.formatEntryInfo as WideViewEntry;
                 FormatPropertyField formatPropertyField = formatEntryInfo.formatPropertyField;
                 if (!string.IsNullOrEmpty(formatPropertyField.propertyValue))
                 {
                     int num2 = this.lo.DisplayCells.Length(formatPropertyField.propertyValue);
                     if (num2 > num)
                     {
                         num = num2;
                     }
                 }
             }
         }
         WideFormattingHint hint = new WideFormattingHint {
             maxWidth = num
         };
         this.formattingHint = hint;
     }
 }
示例#4
0
 private void ProcessCachedGroupOnTable(TableHeaderInfo thi, List <PacketInfoData> objects)
 {
     if (thi.tableColumnInfoList.Count != 0)
     {
         int[] numArray = new int[thi.tableColumnInfoList.Count];
         for (int i = 0; i < thi.tableColumnInfoList.Count; i++)
         {
             string label = thi.tableColumnInfoList[i].label;
             if (string.IsNullOrEmpty(label))
             {
                 label = thi.tableColumnInfoList[i].propertyName;
             }
             if (string.IsNullOrEmpty(label))
             {
                 numArray[i] = 0;
             }
             else
             {
                 numArray[i] = this.lo.DisplayCells.Length(label);
             }
         }
         foreach (PacketInfoData data in objects)
         {
             FormatEntryData data2 = data as FormatEntryData;
             if (data2 != null)
             {
                 TableRowEntry formatEntryInfo = data2.formatEntryInfo as TableRowEntry;
                 int           index           = 0;
                 foreach (FormatPropertyField field in formatEntryInfo.formatPropertyFieldList)
                 {
                     int num2 = this.lo.DisplayCells.Length(field.propertyValue);
                     if (numArray[index] < num2)
                     {
                         numArray[index] = num2;
                     }
                     index++;
                 }
             }
         }
         TableFormattingHint hint = new TableFormattingHint {
             columnWidths = numArray
         };
         this.formattingHint = hint;
     }
 }
示例#5
0
        private void ProcessCachedGroup(FormatStartData formatStartData, List <PacketInfoData> objects)
        {
            this.formattingHint = null;
            TableHeaderInfo shapeInfo = formatStartData.shapeInfo as TableHeaderInfo;

            if (shapeInfo != null)
            {
                this.ProcessCachedGroupOnTable(shapeInfo, objects);
            }
            else
            {
                WideViewHeaderInfo wvhi = formatStartData.shapeInfo as WideViewHeaderInfo;
                if (wvhi != null)
                {
                    this.ProcessCachedGroupOnWide(wvhi, objects);
                }
            }
        }
 /// <summary>
 /// helper for consuming the formatting hint
 /// </summary>
 /// <returns></returns>
 private FormattingHint RetrieveFormattingHint()
 {
     FormattingHint fh = _formattingHint;
     _formattingHint = null;
     return fh;
 }
示例#7
0
 private FormattingHint RetrieveFormattingHint()
 {
     FormattingHint formattingHint = this.formattingHint;
     this.formattingHint = null;
     return formattingHint;
 }
示例#8
0
 private void ProcessCachedGroupOnWide(WideViewHeaderInfo wvhi, List<PacketInfoData> objects)
 {
     if (wvhi.columns == 0)
     {
         int num = 0;
         foreach (PacketInfoData data in objects)
         {
             FormatEntryData data2 = data as FormatEntryData;
             if (data2 != null)
             {
                 WideViewEntry formatEntryInfo = data2.formatEntryInfo as WideViewEntry;
                 FormatPropertyField formatPropertyField = formatEntryInfo.formatPropertyField;
                 if (!string.IsNullOrEmpty(formatPropertyField.propertyValue))
                 {
                     int num2 = this.lo.DisplayCells.Length(formatPropertyField.propertyValue);
                     if (num2 > num)
                     {
                         num = num2;
                     }
                 }
             }
         }
         WideFormattingHint hint = new WideFormattingHint {
             maxWidth = num
         };
         this.formattingHint = hint;
     }
 }
示例#9
0
 private void ProcessCachedGroupOnTable(TableHeaderInfo thi, List<PacketInfoData> objects)
 {
     if (thi.tableColumnInfoList.Count != 0)
     {
         int[] numArray = new int[thi.tableColumnInfoList.Count];
         for (int i = 0; i < thi.tableColumnInfoList.Count; i++)
         {
             string label = thi.tableColumnInfoList[i].label;
             if (string.IsNullOrEmpty(label))
             {
                 label = thi.tableColumnInfoList[i].propertyName;
             }
             if (string.IsNullOrEmpty(label))
             {
                 numArray[i] = 0;
             }
             else
             {
                 numArray[i] = this.lo.DisplayCells.Length(label);
             }
         }
         foreach (PacketInfoData data in objects)
         {
             FormatEntryData data2 = data as FormatEntryData;
             if (data2 != null)
             {
                 TableRowEntry formatEntryInfo = data2.formatEntryInfo as TableRowEntry;
                 int index = 0;
                 foreach (FormatPropertyField field in formatEntryInfo.formatPropertyFieldList)
                 {
                     int num2 = this.lo.DisplayCells.Length(field.propertyValue);
                     if (numArray[index] < num2)
                     {
                         numArray[index] = num2;
                     }
                     index++;
                 }
             }
         }
         TableFormattingHint hint = new TableFormattingHint {
             columnWidths = numArray
         };
         this.formattingHint = hint;
     }
 }
示例#10
0
 private void ProcessCachedGroup(FormatStartData formatStartData, List<PacketInfoData> objects)
 {
     this.formattingHint = null;
     TableHeaderInfo shapeInfo = formatStartData.shapeInfo as TableHeaderInfo;
     if (shapeInfo != null)
     {
         this.ProcessCachedGroupOnTable(shapeInfo, objects);
     }
     else
     {
         WideViewHeaderInfo wvhi = formatStartData.shapeInfo as WideViewHeaderInfo;
         if (wvhi != null)
         {
             this.ProcessCachedGroupOnWide(wvhi, objects);
         }
     }
 }