internal static bool ComputeDeepHidden(bool hidden, IVisibilityOwner visibilityOwner, ToggleCascadeDirection direction, Microsoft.ReportingServices.OnDemandReportRendering.RenderingContext renderingContext) { Visibility visibility = visibilityOwner.Visibility; if (hidden && (visibility == null || !visibility.IsToggleReceiver)) { hidden = false; } if (!hidden && visibility != null && visibility.IsToggleReceiver) { hidden = ((!visibility.RecursiveReceiver || !(visibilityOwner is TablixMember)) ? (hidden | visibility.ToggleSender.ComputeDeepHidden(renderingContext, direction)) : (hidden | ((TablixMember)visibilityOwner).ComputeToggleSenderDeepHidden(renderingContext))); } if (!hidden && (visibility == null || !visibility.RecursiveReceiver) && visibilityOwner.ContainingDynamicVisibility != null) { hidden |= visibilityOwner.ContainingDynamicVisibility.ComputeDeepHidden(renderingContext, direction); } if (!hidden && direction != ToggleCascadeDirection.Column && visibilityOwner.ContainingDynamicRowVisibility != null) { hidden |= visibilityOwner.ContainingDynamicRowVisibility.ComputeDeepHidden(renderingContext, direction); } if (!hidden && direction != ToggleCascadeDirection.Row && visibilityOwner.ContainingDynamicColumnVisibility != null) { hidden |= visibilityOwner.ContainingDynamicColumnVisibility.ComputeDeepHidden(renderingContext, direction); } return(hidden); }
internal static bool ComputeHidden(IVisibilityOwner visibilityOwner, Microsoft.ReportingServices.OnDemandReportRendering.RenderingContext renderingContext, ToggleCascadeDirection direction, out bool valueIsDeep) { valueIsDeep = false; bool flag = false; Visibility visibility = visibilityOwner.Visibility; if (visibility != null) { switch (GetSharedHidden(visibility)) { case SharedHiddenState.Always: flag = true; break; case SharedHiddenState.Never: flag = false; break; case SharedHiddenState.Sometimes: flag = visibilityOwner.ComputeStartHidden(renderingContext); if (visibility.IsToggleReceiver) { TextBox toggleSender = visibility.ToggleSender; Global.Tracer.Assert(toggleSender != null, "Missing Persisted Toggle Receiver -> Sender Link"); string senderUniqueName = visibilityOwner.SenderUniqueName; if (senderUniqueName != null && renderingContext.IsSenderToggled(senderUniqueName)) { flag = !flag; } if (!flag) { flag = ComputeDeepHidden(flag, visibilityOwner, direction, renderingContext); } valueIsDeep = true; } break; default: Global.Tracer.Assert(condition: false); break; } } return(flag); }
public override void ResolveReferences(Dictionary <Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType, List <MemberReference> > memberReferencesCollection, Dictionary <int, IReferenceable> referenceableItems) { if (!memberReferencesCollection.TryGetValue(m_Declaration.ObjectType, out List <MemberReference> value)) { return; } foreach (MemberReference item in value) { switch (item.MemberName) { case MemberName.ContainingDynamicVisibility: { if (referenceableItems.TryGetValue(item.RefID, out IReferenceable value3)) { m_containingDynamicVisibility = (value3 as IVisibilityOwner); } break; } case MemberName.ContainingDynamicRowVisibility: { if (referenceableItems.TryGetValue(item.RefID, out IReferenceable value4)) { m_containingDynamicRowVisibility = (value4 as IVisibilityOwner); } break; } case MemberName.ContainingDynamicColumnVisibility: { if (referenceableItems.TryGetValue(item.RefID, out IReferenceable value2)) { m_containingDynamicColumnVisibility = (value2 as IVisibilityOwner); } break; } default: Global.Tracer.Assert(condition: false); break; } } }
public override void Deserialize(IntermediateFormatReader reader) { base.Deserialize(reader); reader.RegisterDeclaration(m_Declaration); while (reader.NextMember()) { switch (reader.CurrentMember.MemberName) { case MemberName.Name: m_name = reader.ReadString(); break; case MemberName.StyleClass: m_styleClass = (Style)reader.ReadRIFObject(); break; case MemberName.Top: m_top = reader.ReadString(); break; case MemberName.TopValue: m_topValue = reader.ReadDouble(); break; case MemberName.Left: m_left = reader.ReadString(); break; case MemberName.LeftValue: m_leftValue = reader.ReadDouble(); break; case MemberName.Height: m_height = reader.ReadString(); break; case MemberName.HeightValue: m_heightValue = reader.ReadDouble(); break; case MemberName.Width: m_width = reader.ReadString(); break; case MemberName.WidthValue: m_widthValue = reader.ReadDouble(); break; case MemberName.ZIndex: m_zIndex = reader.ReadInt32(); break; case MemberName.Visibility: m_visibility = (Visibility)reader.ReadRIFObject(); break; case MemberName.ToolTip: m_toolTip = (ExpressionInfo)reader.ReadRIFObject(); break; case MemberName.Label: m_documentMapLabel = (ExpressionInfo)reader.ReadRIFObject(); break; case MemberName.Bookmark: m_bookmark = (ExpressionInfo)reader.ReadRIFObject(); break; case MemberName.RepeatedSibling: m_repeatedSibling = reader.ReadBoolean(); break; case MemberName.IsFullSize: m_isFullSize = reader.ReadBoolean(); break; case MemberName.ExprHostID: m_exprHostID = reader.ReadInt32(); break; case MemberName.DataElementName: m_dataElementName = reader.ReadString(); break; case MemberName.DataElementOutput: m_dataElementOutput = (DataElementOutputTypes)reader.ReadEnum(); break; case MemberName.CustomProperties: m_customProperties = reader.ReadListOfRIFObjects <DataValueList>(); break; case MemberName.Computed: m_computed = reader.ReadBoolean(); break; case MemberName.ContainingDynamicVisibility: m_containingDynamicVisibility = reader.ReadReference <IVisibilityOwner>(this); break; case MemberName.ContainingDynamicRowVisibility: m_containingDynamicRowVisibility = reader.ReadReference <IVisibilityOwner>(this); break; case MemberName.ContainingDynamicColumnVisibility: m_containingDynamicColumnVisibility = reader.ReadReference <IVisibilityOwner>(this); break; case MemberName.RepeatWith: m_repeatWith = reader.ReadString(); break; default: Global.Tracer.Assert(condition: false); break; } } }