Exemple #1
0
            internal ItemSizes GetSharedRenderRepeatItemSizesElement(ItemSizes itemSizes, bool isPadded, bool returnPaddings)
            {
                if (itemSizes == null)
                {
                    return(null);
                }
                if (isPadded)
                {
                    RSTrace.RenderingTracer.Assert(itemSizes is PaddItemSizes, "The ItemSizes object is not a PaddItemSizes object.");
                }
                ItemSizes itemSizes2 = null;

                if (itemSizes.ID == null)
                {
                    itemSizes2 = ((!(isPadded && returnPaddings)) ? new ItemSizes(itemSizes) : new PaddItemSizes(itemSizes as PaddItemSizes));
                }
                else if (m_sharedRenderRepeatItemSizes.ContainsKey(itemSizes.ID))
                {
                    itemSizes2 = (ItemSizes)m_sharedRenderRepeatItemSizes[itemSizes.ID];
                    itemSizes2.Update(itemSizes, returnPaddings);
                }
                else
                {
                    itemSizes2 = ((!isPadded) ? new ItemSizes(itemSizes) : ((!returnPaddings) ? new PaddItemSizes(itemSizes) : new PaddItemSizes(itemSizes as PaddItemSizes)));
                    m_sharedRenderRepeatItemSizes.Add(itemSizes.ID, itemSizes2);
                }
                return(itemSizes2);
            }
Exemple #2
0
            internal ItemSizes GetSharedRenderEdgeItemSizesElement(ItemSizes itemSizes)
            {
                if (itemSizes == null)
                {
                    return(null);
                }
                ItemSizes itemSizes2 = null;

                if (itemSizes.ID != null)
                {
                    if (m_sharedRenderEdgeItemSizes.ContainsKey(itemSizes.ID))
                    {
                        itemSizes2 = (ItemSizes)m_sharedRenderEdgeItemSizes[itemSizes.ID];
                        itemSizes2.Update(itemSizes, returnPaddings: false);
                    }
                    else
                    {
                        itemSizes2 = new ItemSizes(itemSizes);
                        m_sharedRenderEdgeItemSizes.Add(itemSizes.ID, itemSizes2);
                    }
                }
                else
                {
                    itemSizes2 = new ItemSizes(itemSizes);
                }
                return(itemSizes2);
            }
Exemple #3
0
            internal ItemSizes GetSharedEdgeItemSizesElement(double top, double left, string id)
            {
                if (id == null)
                {
                    return(null);
                }
                ItemSizes itemSizes = null;

                if (m_sharedEdgeItemSizes.ContainsKey(id))
                {
                    itemSizes = (ItemSizes)m_sharedEdgeItemSizes[id];
                    itemSizes.Update(top, left);
                }
                else
                {
                    itemSizes = new ItemSizes(top, left, id);
                    m_sharedEdgeItemSizes.Add(id, itemSizes);
                }
                return(itemSizes);
            }
Exemple #4
0
            internal ItemSizes GetSharedItemSizesElement(ReportSize width, ReportSize height, string id, bool isPadded)
            {
                if (id == null)
                {
                    return(null);
                }
                ItemSizes itemSizes = null;

                if (m_sharedItemSizes.ContainsKey(id))
                {
                    itemSizes = (ItemSizes)m_sharedItemSizes[id];
                    itemSizes.Update(width, height);
                }
                else
                {
                    itemSizes = ((!isPadded) ? new ItemSizes(width, height, id) : new PaddItemSizes(width, height, id));
                    m_sharedItemSizes.Add(id, itemSizes);
                }
                return(itemSizes);
            }
Exemple #5
0
            internal ItemSizes GetSharedItemSizesElement(ReportItem reportItem, bool isPadded)
            {
                if (reportItem == null)
                {
                    return(null);
                }
                ItemSizes itemSizes = null;

                if (m_sharedItemSizes.ContainsKey(reportItem.ID))
                {
                    itemSizes = (ItemSizes)m_sharedItemSizes[reportItem.ID];
                    itemSizes.Update(reportItem);
                }
                else
                {
                    itemSizes = ((!isPadded) ? new ItemSizes(reportItem) : new PaddItemSizes(reportItem));
                    m_sharedItemSizes.Add(reportItem.ID, itemSizes);
                }
                return(itemSizes);
            }
Exemple #6
0
            internal ItemSizes GetSharedFromRepeatItemSizesElement(ReportItem reportItem, bool isPadded)
            {
                if (reportItem == null)
                {
                    return(null);
                }
                ItemSizes itemSizes = null;
                string    key       = reportItem.ID + "_REPEAT";

                if (m_sharedItemSizes.ContainsKey(key))
                {
                    itemSizes = (ItemSizes)m_sharedItemSizes[key];
                    itemSizes.Update(reportItem);
                }
                else
                {
                    itemSizes = ((!isPadded) ? new ItemSizes(reportItem) : new PaddItemSizes(reportItem));
                    m_sharedItemSizes.Add(key, itemSizes);
                }
                return(itemSizes);
            }