Example #1
0
        public static ActionInfoWithDynamicImageMapCollection GetImageMaps(IEnumerable <MapAreaInfo> mapAreaInfoList, ActionInfoWithDynamicImageMapCollection actions, ReportItem reportItem)
        {
            List <ActionInfoWithDynamicImageMap> list = new List <ActionInfoWithDynamicImageMap>();

            bool[] array = new bool[actions.Count];
            foreach (MapAreaInfo mapAreaInfo in mapAreaInfoList)
            {
                MapAreaInfo current = mapAreaInfo;
                int         num     = MappingHelper.AddMapArea(current, actions, reportItem);
                if (num > -1 && !array[num])
                {
                    list.Add(((ReportElementCollectionBase <ActionInfoWithDynamicImageMap>)actions)[num]);
                    array[num] = true;
                }
                else if (!string.IsNullOrEmpty(current.ToolTip))
                {
                    string text = default(string);
                    ActionInfoWithDynamicImageMap actionInfoWithDynamicImageMap = MappingHelper.CreateActionInfoDynamic(reportItem, (ActionInfo)null, current.ToolTip, out text);
                    if (actionInfoWithDynamicImageMap != null)
                    {
                        actionInfoWithDynamicImageMap.CreateImageMapAreaInstance(current.MapAreaShape, current.Coordinates, current.ToolTip);
                        list.Add(actionInfoWithDynamicImageMap);
                    }
                }
            }
            actions.InternalList.Clear();
            actions.InternalList.AddRange(list);
            if (actions.Count == 0)
            {
                return(null);
            }
            return(actions);
        }
Example #2
0
        public static ActionInfoWithDynamicImageMap CreateActionInfoDynamic(ReportItem reportItem, ActionInfo actionInfo, string toolTip, out string href, bool applyExpression)
        {
            Action actionFromActionInfo = MappingHelper.GetActionFromActionInfo(actionInfo);

            if (actionFromActionInfo == null)
            {
                href = null;
            }
            else
            {
                bool flag = default(bool);
                href = MappingHelper.EvaluateHref(actionFromActionInfo, out flag);
                if (flag && !applyExpression)
                {
                    href = null;
                }
            }
            bool flag2 = actionFromActionInfo == null || href == null;
            bool flag3 = string.IsNullOrEmpty(toolTip);

            if (flag2 && flag3)
            {
                return(null);
            }
            ActionInfoWithDynamicImageMap actionInfoWithDynamicImageMap;

            if (!flag2)
            {
                actionInfoWithDynamicImageMap = new ActionInfoWithDynamicImageMap(reportItem.RenderingContext, reportItem, actionInfo.ReportScope, actionInfo.InstancePath, actionInfo.ROMActionOwner, true);
                if (actionFromActionInfo.BookmarkLink != null)
                {
                    Action action = actionInfoWithDynamicImageMap.CreateBookmarkLinkAction();
                    action.Instance.BookmarkLink = href;
                }
                else if (actionFromActionInfo.Hyperlink != null)
                {
                    Action action2 = actionInfoWithDynamicImageMap.CreateHyperlinkAction();
                    action2.Instance.HyperlinkText = href;
                }
                else if (actionFromActionInfo.Drillthrough != null)
                {
                    Action action3 = actionInfoWithDynamicImageMap.CreateDrillthroughAction();
                    action3.Drillthrough.Instance.ReportName = href;
                    MappingHelper.EvaluateActionParameters(actionFromActionInfo.Drillthrough, action3.Drillthrough);
                    string drillthroughID = action3.Drillthrough.Instance.DrillthroughID;
                }
            }
            else
            {
                actionInfoWithDynamicImageMap = new ActionInfoWithDynamicImageMap(reportItem.RenderingContext, reportItem, reportItem.ReportScope, reportItem.ReportItemDef, null, true);
            }
            return(actionInfoWithDynamicImageMap);
        }
Example #3
0
        private static int AddMapArea(MapAreaInfo mapAreaInfo, ActionInfoWithDynamicImageMapCollection actions, ReportItem reportItem)
        {
            if (mapAreaInfo.Tag == null)
            {
                return(-1);
            }
            int num = (int)mapAreaInfo.Tag;
            ActionInfoWithDynamicImageMap actionInfoWithDynamicImageMap = actions.InternalList[num];

            if (actionInfoWithDynamicImageMap.Actions.Count <= 0 && string.IsNullOrEmpty(mapAreaInfo.ToolTip))
            {
                return(-1);
            }
            actionInfoWithDynamicImageMap.CreateImageMapAreaInstance(mapAreaInfo.MapAreaShape, mapAreaInfo.Coordinates, mapAreaInfo.ToolTip);
            return(num);
        }
        public IPersistable CreateRIFObject(AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType objectType, ref IntermediateFormatReader context)
        {
            IPersistable persistable;

            switch (objectType)
            {
            case AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.Null:
                return(null);

            case AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.ImageInstance:
                persistable = (ImageInstance)this.m_reportItemInstance;
                break;

            case AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.StyleInstance:
                persistable = this.m_reportItemInstance.Style;
                break;

            case AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.ActionInstance:
                Global.Tracer.Assert(this.m_currentActionInfo != null && this.m_currentActionInfo.Actions.Count > this.m_currentActionIndex, "Ensure m_currentActionInfo is setup properly");
                persistable = ((ReportElementCollectionBase <Action>) this.m_currentActionInfo.Actions)[this.m_currentActionIndex].Instance;
                this.m_currentActionIndex++;
                break;

            case AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.ParameterInstance:
                Global.Tracer.Assert(this.m_currentParameterCollection != null && this.m_currentParameterCollection.Count > this.m_currentParameterIndex, "Ensure m_currentParameterCollection is setup properly");
                persistable = ((ReportElementCollectionBase <Parameter>) this.m_currentParameterCollection)[this.m_currentParameterIndex].Instance;
                this.m_currentParameterIndex++;
                break;

            case AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.ActionInfoWithDynamicImageMap:
                persistable = new ActionInfoWithDynamicImageMap(this.m_reportItemInstance.RenderingContext, null, (ReportItem)this.m_reportItemInstance.ReportElementDef, (IROMActionOwner)this.m_reportItemInstance.ReportElementDef);
                break;

            case AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.ImageMapAreaInstance:
                persistable = new ImageMapAreaInstance();
                break;

            default:
                return(this.ProcessingRIFObjectCreator.CreateRIFObject(objectType, ref context));
            }
            persistable.Deserialize(context);
            return(persistable);
        }