Example #1
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;
     }
 }
Example #2
0
 internal override FormatStartData GenerateStartData(PSObject so)
 {
     FormatStartData data = base.GenerateStartData(so);
     WideViewHeaderInfo info = new WideViewHeaderInfo();
     data.shapeInfo = info;
     if (!base.AutoSize)
     {
         info.columns = this.Columns;
         return data;
     }
     info.columns = 0;
     return data;
 }
Example #3
0
        internal override FormatStartData GenerateStartData(PSObject so)
        {
            FormatStartData    data = base.GenerateStartData(so);
            WideViewHeaderInfo info = new WideViewHeaderInfo();

            data.shapeInfo = info;
            if (!base.AutoSize)
            {
                info.columns = this.Columns;
                return(data);
            }
            info.columns = 0;
            return(data);
        }
Example #4
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);
                }
            }
        }
Example #5
0
        /// <summary>
        /// handler for processing the caching notification and responsible for
        /// setting the value of the formatting hint
        /// </summary>
        /// <param name="formatStartData"></param>
        /// <param name="objects"></param>
        private void ProcessCachedGroup(FormatStartData formatStartData, List <PacketInfoData> objects)
        {
            _formattingHint = null;

            TableHeaderInfo thi = formatStartData.shapeInfo as TableHeaderInfo;

            if (thi != null)
            {
                ProcessCachedGroupOnTable(thi, objects);
                return;
            }

            WideViewHeaderInfo wvhi = formatStartData.shapeInfo as WideViewHeaderInfo;

            if (wvhi != null)
            {
                ProcessCachedGroupOnWide(wvhi, objects);
                return;
            }
        }
        internal override FormatStartData GenerateStartData(PSObject so)
        {
            FormatStartData startFormat = base.GenerateStartData(so);

            WideViewHeaderInfo wideViewHeaderInfo = new WideViewHeaderInfo();
            startFormat.shapeInfo = wideViewHeaderInfo;


            if (!this.AutoSize)
            {
                // autosize overrides columns
                wideViewHeaderInfo.columns = this.Columns;
            }
            else
            {
                wideViewHeaderInfo.columns = 0;
            }

            return startFormat;
        }
Example #7
0
        internal override FormatStartData GenerateStartData(PSObject so)
        {
            FormatStartData startFormat = base.GenerateStartData(so);

            WideViewHeaderInfo wideViewHeaderInfo = new WideViewHeaderInfo();

            startFormat.shapeInfo = wideViewHeaderInfo;

            if (!this.AutoSize)
            {
                // autosize overrides columns
                wideViewHeaderInfo.columns = this.Columns;
            }
            else
            {
                wideViewHeaderInfo.columns = 0;
            }

            return(startFormat);
        }
Example #8
0
        private void ProcessCachedGroupOnWide(WideViewHeaderInfo wvhi, List <PacketInfoData> objects)
        {
            if (wvhi.columns != 0)
            {
                // columns forced on the client
                return;
            }

            int maxLen = 0;
            int cellCount; // scratch variable

            foreach (PacketInfoData o in objects)
            {
                FormatEntryData fed = o as FormatEntryData;

                if (fed == null)
                {
                    continue;
                }

                WideViewEntry       wve = fed.formatEntryInfo as WideViewEntry;
                FormatPropertyField fpf = wve.formatPropertyField as FormatPropertyField;

                if (!string.IsNullOrEmpty(fpf.propertyValue))
                {
                    cellCount = _lo.DisplayCells.Length(fpf.propertyValue);
                    if (cellCount > maxLen)
                    {
                        maxLen = cellCount;
                    }
                }
            }

            WideFormattingHint hint = new WideFormattingHint();

            hint.maxWidth   = maxLen;
            _formattingHint = hint;
        }
        private void ProcessCachedGroupOnWide(WideViewHeaderInfo wvhi, List<PacketInfoData> objects)
        {
            if (wvhi.columns != 0)
            {
                // columns forced on the client
                return;
            }

            int maxLen = 0;
            int cellCount; // scratch variable

            foreach (PacketInfoData o in objects)
            {
                FormatEntryData fed = o as FormatEntryData;

                if (fed == null)
                    continue;

                WideViewEntry wve = fed.formatEntryInfo as WideViewEntry;
                FormatPropertyField fpf = wve.formatPropertyField as FormatPropertyField;

                if (!string.IsNullOrEmpty(fpf.propertyValue))
                {
                    cellCount = _lo.DisplayCells.Length(fpf.propertyValue);
                    if (cellCount > maxLen)
                        maxLen = cellCount;
                }
            }

            WideFormattingHint hint = new WideFormattingHint();

            hint.maxWidth = maxLen;
            _formattingHint = hint;
        }
Example #10
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;
     }
 }