Exemple #1
0
        // create in grid(control) the children of current view
        public static void AddToGrid(BaseBand obj, MVCxGridViewColumnCollection Columns)
        {
            PdfExportHelper pdfHelper = new PdfExportHelper(
                obj, BaseSettings.GetSystemFont(true));

            // at first put bands that were reordered by user
            // after that put bands that were not reordered by user in pivot order
            obj.Bands.FindAll(x => !x.IsToDelete).OrderBy(x => x.Order_ForUse).ToList().ForEach(b => AddToGrid(b, Columns, pdfHelper));
            // at first put columns that were reordered by user
            // after that put columns that were not reordered by user in pivot order
            obj.Columns.FindAll(x => !x.IsToDelete).OrderBy(x => x.Order_ForUse).ToList().ForEach(c => AddToGrid(c, Columns, pdfHelper));
        }
Exemple #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Bootloader.Length != 0)
            {
                hash ^= Bootloader.GetHashCode();
            }
            if (ProcVersion.Length != 0)
            {
                hash ^= ProcVersion.GetHashCode();
            }
            if (CodeName.Length != 0)
            {
                hash ^= CodeName.GetHashCode();
            }
            if (Incremental.Length != 0)
            {
                hash ^= Incremental.GetHashCode();
            }
            if (Fingerprint.Length != 0)
            {
                hash ^= Fingerprint.GetHashCode();
            }
            if (BootID.Length != 0)
            {
                hash ^= BootID.GetHashCode();
            }
            if (AndroidID.Length != 0)
            {
                hash ^= AndroidID.GetHashCode();
            }
            if (BaseBand.Length != 0)
            {
                hash ^= BaseBand.GetHashCode();
            }
            if (InnerVersion.Length != 0)
            {
                hash ^= InnerVersion.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #3
0
        private static AllCaptionsRetValue SelectAllCaptionsRecursively(BaseBand obj, int currentDepth, int maxDepth)
        {
            if (maxDepth < currentDepth)
            {
                maxDepth = currentDepth;
            }

            AllCaptionsRetValue retValue = new AllCaptionsRetValue();

            retValue.RecursionDepth = maxDepth;

            for (int i = 0; i < obj.Columns.Count; ++i)
            {
                if (!obj.Columns[i].IsToDelete)
                {
                    retValue.Captions.Add(new CaptionString(
                                              PreProcessString(obj.Columns[i].DisplayText),
                                              obj.Columns[i].IsRowArea, obj.Columns[i].UniquePath));
                }
            }

            for (int i = 0; i < obj.Bands.Count; ++i)
            {
                if (!obj.Bands[i].IsToDelete)
                {
                    AllCaptionsRetValue captions = SelectAllCaptionsRecursively(obj.Bands[i], currentDepth + 1, maxDepth);

                    if (captions.Captions.Count > 0)
                    {
                        retValue.Captions.AddRange(captions.Captions);
                    }

                    if (retValue.RecursionDepth < captions.RecursionDepth)
                    {
                        retValue.RecursionDepth = captions.RecursionDepth;
                    }
                }
            }

            return(retValue);
        }
Exemple #4
0
        private static List <ColumnElement> GetVisibleBandsColumns(this BaseBand obj, string path, List <ColumnElement> result)
        {
            obj.Columns.FindAll(c => !c.IsToDelete && c.IsVisible)
            .OrderBy(c => c.Order_ForUse)
            .ToList()
            .ForEach(c =>
            {
                c.FullPath = (path.Length == 0 ? " " : path + "->") + bv.common.Core.Utils.Str(c.DisplayText);
                result.Add(new ColumnElement(c));
            });

            obj.Bands.FindAll(b => !b.IsToDelete && b.IsVisible)
            .OrderBy(b => b.Order_ForUse)
            .ToList()
            .ForEach(b =>
            {
                b.FullPath = (path.Length == 0 ? " " : path + "->") + bv.common.Core.Utils.Str(b.DisplayText);
                result.Add(new ColumnElement(b));

                b.GetVisibleBandsColumns(b.FullPath, result);
            });
            return(result);
        }
Exemple #5
0
 public PdfExportHelper(BaseBand band, Font captionFont, float documentWidthinMillimeters = DocumentWidthinMillimetersDefault)
     : this(SelectAllCaptionsRecursively(band, 1, 1), captionFont, documentWidthinMillimeters)
 {
 }