Exemplo n.º 1
0
        void IStreamedObject.ReadStream(BinaryReader reader, object options)
        {
            StreamUtils.CheckTag(reader, Tags.tgList);
            Clear();
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgList_Count:
                    var c = StreamUtils.ReadInt32(reader);
                    break;

                case Tags.tgList_Item:
                    var l = new CubeLevel(FHierarchy);
                    StreamUtils.ReadStreamedObject(reader, l);
                    Add(l);
                    break;

                case Tags.tgList_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
Exemplo n.º 2
0
        void IStreamedObject.ReadStream(BinaryReader reader, object options)
        {
            StreamUtils.CheckTag(reader, Tags.tgList);
            Clear();
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgList_Count:
                    var c = StreamUtils.ReadInt32(reader);
                    break;

                case Tags.tgList_Item:
                    var item = new InfoAttribute();
                    StreamUtils.ReadStreamedObject(reader, item);
                    // AfterRead
                    Add(item);
                    break;

                case Tags.tgList_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
        void IStreamedObject.ReadStream(BinaryReader reader, object options)
        {
            StreamUtils.CheckTag(reader, Tags.tgList);
            Clear();
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgList_Count:
                    var c = StreamUtils.ReadInt32(reader);
                    break;

                case Tags.tgList_Item:
                    var measure = new CubeMeasure();
                    // BeforeRead
                    measure.FCube = FCube;
                    StreamUtils.ReadStreamedObject(reader, measure);
                    // AfterRead
                    Add(measure);
                    break;

                case Tags.tgList_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
        void IStreamedObject.ReadStream(BinaryReader reader, object options)
        {
            StreamUtils.CheckTag(reader, Tags.tgList);
            Clear();
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgList_Count:
                    var c = StreamUtils.ReadInt32(reader);
                    break;

                case Tags.tgList_Item:
                    var h = new Hierarchy(Dimension);
                    // BeforeRead
                    StreamUtils.ReadStreamedObject(reader, h);
                    // AfterRead
                    Add(h);
                    break;

                case Tags.tgList_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
        public void ReadStream(BinaryReader reader, object options)
        {
            StreamUtils.CheckTag(reader, Tags.tgHierarchyEditorStyle);
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgHierarchyEditorStyle_Resizable:
                    Resizable = false;
                    break;

                case Tags.tgHierarchyEditorStyle_ItemsInPage:
                    ItemsInPage = StreamUtils.ReadInt32(reader);
                    break;

                case Tags.tgHierarchyEditorStyle_TreeHeight:
                    TreeHeight = StreamUtils.ReadInt32(reader);
                    break;

                case Tags.tgHierarchyEditorStyle_Width:
                    Width = StreamUtils.ReadInt32(reader);
                    break;

                case Tags.tgHierarchyEditorStyle_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
        void IStreamedObject.ReadStream(BinaryReader reader, object options)
        {
            StreamUtils.CheckTag(reader, Tags.tgASPGridSessionState);
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgASPGridSessionState_Stream:
                    ms = new MemoryStream();
                    StreamUtils.ReadStream(reader, ms);
                    break;

                case Tags.tgASPGridSessionState_CubeId:
                    CubeID = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgASPGridSessionState_Length:
                    length = StreamUtils.ReadInt32(reader);
                    break;

                case Tags.tgASPGridSessionState_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
Exemplo n.º 7
0
        public void ReadStream(BinaryReader reader, object options)
        {
            StreamUtils.CheckTag(reader, Tags.tgList);
            Clear();
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgList_Count:
                    var c = StreamUtils.ReadInt32(reader);
                    break;

                case Tags.tgList_Item:
                    var b = new CustomToolboxButton();
                    // BeforeRead
                    StreamUtils.ReadStreamedObject(reader, b);
                    // AfterRead
                    Add(b);
                    break;

                case Tags.tgList_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
Exemplo n.º 8
0
        void IStreamedObject.ReadStream(BinaryReader reader, object options)
        {
            fM = (MetaLine)options;
            StreamUtils.CheckTag(reader, Tags.tgLine);
            for (var exit = false; !exit;)
            {
                int c;
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgLine_CacheKey:
                    fCacheKey = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgLine_Depthes:
                    c        = StreamUtils.ReadInt32(reader);
                    fDepthes = new List <int>(c);
                    for (var i = 0; i < c; i++)
                    {
                        fDepthes.Add(StreamUtils.ReadInt32(reader));
                    }
                    break;

                case Tags.tgLine_ID:
                    fID = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgLine_HierID:
                    fHierId = StreamUtils.ReadInt32(reader);
                    break;

                case Tags.tgLine_Measure:
                    fMeasureID = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgLine_Mode:
                    fMode = Measure.ShowModes.ShowModeById(StreamUtils.ReadGuid(reader));
                    break;

                case Tags.tgLine_CurrentMap:
                    StreamUtils.ReadStreamedObject(reader, CurrentMap, fM.FGrid);
                    break;

                case Tags.tgLine_EOT:
                    exit = true;
                    break;

                default:
                    DoReadStream(reader, tag);
                    break;
                }
            }
        }
Exemplo n.º 9
0
            void IStreamedObject.ReadStream(BinaryReader reader, object options)
            {
                var editor = (HierarchyEditor)options;

                StreamUtils.CheckTag(reader, Tags.tgASPHierNode);
                for (var exit = false; !exit;)
                {
                    var tag = StreamUtils.ReadTag(reader);
                    switch (tag)
                    {
                    case Tags.tgASPHierNode_MemberName:
                        fMemberName = StreamUtils.ReadString(reader);
                        editor.allnodes.Add(fMemberName, this);
                        break;

                    case Tags.tgASPHierNode_HasCustomMembers:
                        hasCustomMembers = true;
                        break;

                    case Tags.tgASPHierNode_IsCustomMember:
                        IsCustomMember = true;
                        break;

                    case Tags.tgASPHierNode_Checked:
                        fChecked = StreamUtils.ReadBoolean(reader);
                        break;

                    case Tags.tgASPHierNode_Expanded:
                        fExpanded = true;
                        break;

                    case Tags.tgASPHierNode_ParentName:
                        editor.allnodes.TryGetValue(StreamUtils.ReadString(reader), out fParent);
                        break;

                    case Tags.tgASPHierNode_Children:
                        StreamUtils.ReadStreamedObject(reader, fChildren, editor);
                        break;

                    case Tags.tgASPHierNode_EOT:
                        exit = true;
                        break;

                    default:
                        StreamUtils.SkipValue(reader);
                        break;
                    }
                }
            }
Exemplo n.º 10
0
        void IStreamedObject.ReadStream(BinaryReader reader, object options)
        {
            FGrid = (OlapControl)options;
            StreamUtils.CheckTag(reader, Tags.tgEngine);
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                int c;
                switch (tag)
                {
                case Tags.tgEngine_Levels:
                    c           = StreamUtils.ReadInt32(reader);
                    FLevelsList = new List <Level>(c);
                    for (var i = 0; i < c; i++)
                    {
                        var l = FGrid.Dimensions.FindLevel(StreamUtils.ReadString(reader));
                        FLevelsList.Add(l);
                    }
                    break;

                case Tags.tgEngine_Metalines:
                    c          = StreamUtils.ReadInt32(reader);
                    FMetaLines = new SortedList <string, MetaLine>(c);
                    for (var i = 0; i < c; i++)
                    {
                        var s = StreamUtils.ReadString(reader);
                        StreamUtils.ReadTag(reader);     // skip Tags.tgMetaLine
                        var m = (MetaLine)StreamUtils.ReadTypedStreamedObject(reader, FGrid);
                        FMetaLines.Add(s, m);
                    }
                    break;

                case Tags.tgEngine_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
Exemplo n.º 11
0
        void IStreamedObject.ReadStream(BinaryReader reader, object options)
        {
            StreamUtils.CheckTag(reader, Tags.tgMeasureShowMode);
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgMeasureShowMode_BitmapUrl:
                    BitmapURL = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgMeasureShowMode_Caption:
                    Caption = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgMeasureShowMode_Mode:
                    Mode = (MeasureShowModeType)StreamUtils.ReadInt32(reader);
                    break;

                case Tags.tgMeasureShowMode_Visible:
                    fVisible = true;
                    break;

                case Tags.tgMeasureShowMode_UniqueName:
                    fUniqueName    = StreamUtils.ReadGuid(reader);
                    _UniqueName    = fUniqueName.ToString();
                    _DotUniqueName = "." + fUniqueName;
                    break;

                case Tags.tgMeasureShowMode_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
Exemplo n.º 12
0
        void IStreamedObject.ReadStream(BinaryReader reader, object options)
        {
            StreamUtils.CheckTag(reader, Tags.tgList);
            Clear();
            ClearCache();
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgMeasures_MembersStream:
                    ReadStream(reader);
                    break;

                case Tags.tgList_Count:
                    var c = StreamUtils.ReadInt32(reader);
                    break;

                case Tags.tgList_Item:
                    var m = new Measure(FGrid);
                    m.ShowModes.Clear();
                    // BeforeRead
                    StreamUtils.ReadStreamedObject(reader, m);
                    // AfterRead
                    Add(m);
                    break;

                case Tags.tgList_EOT:
                    break;

                case Tags.tgMeasures_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
Exemplo n.º 13
0
        void IStreamedObject.ReadStream(BinaryReader reader, object options)
        {
            StreamUtils.CheckTag(reader, Tags.tgASPHierEditor);
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgASPHierEditor_FilterString:
                    FFilterString = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgASPHierEditor_HierarchyName:
                    fHierarchyName = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgASPHierEditor_ContextLevelName:
                    fContextLevelName = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgASPHierEditor_Root:
                    if (root == null)
                    {
                        root = new Node(fGrid.fHierarchyEditorStyle.ItemsInPage);
                    }
                    StreamUtils.ReadStreamedObject(reader, root, this);
                    break;

                case Tags.tgASPHierEditor_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
Exemplo n.º 14
0
        public void ReadStream(BinaryReader reader, object options)
        {
            StreamUtils.CheckTag(reader, Tags.tgToolbox);
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgToolbox_CustomButtons:
                    StreamUtils.ReadStreamedObject(reader, CustomButtons);
                    break;

                case Tags.tgToolbox_ConnectButton:
                    StreamUtils.ReadStreamedObject(reader, ConnectButton);
                    break;

                case Tags.tgToolbox_SaveLayoutButton:
                    StreamUtils.ReadStreamedObject(reader, SaveLayoutButton);
                    break;

                case Tags.tgToolbox_LoadLayoutButton:
                    StreamUtils.ReadStreamedObject(reader, LoadLayoutButton);
                    break;

                case Tags.tgToolbox_MDXQueryButton:
                    StreamUtils.ReadStreamedObject(reader, MDXQueryButton);
                    break;

                case Tags.tgToolbox_AddCalculatedMeasureButton:
                    StreamUtils.ReadStreamedObject(reader, AddCalculatedMeasureButton);
                    break;

                case Tags.tgToolbox_AllAreasButton:
                    StreamUtils.ReadStreamedObject(reader, AllAreasButton);
                    break;

                case Tags.tgToolbox_ClearLayoutButton:
                    StreamUtils.ReadStreamedObject(reader, ClearLayoutButton);
                    break;

                case Tags.tgToolbox_DataAreaButton:
                    StreamUtils.ReadStreamedObject(reader, DataAreaButton);
                    break;

                case Tags.tgToolbox_PivotAreaButton:
                    StreamUtils.ReadStreamedObject(reader, PivotAreaButton);
                    break;

                case Tags.tgToolbox_ZoomOutButton:
                    StreamUtils.ReadStreamedObject(reader, ZoomOutButton);
                    break;

                case Tags.tgToolbox_ZoomInButton:
                    StreamUtils.ReadStreamedObject(reader, ZoomInButton);
                    break;

                case Tags.tgToolbox_ResetZoomButton:
                    StreamUtils.ReadStreamedObject(reader, ResetZoomButton);
                    break;

                case Tags.tgToolbox_ModeButton:
                    StreamUtils.ReadStreamedObject(reader, ModeButton);
                    break;

                case Tags.tgToolbox_DelayPivotingButton:
                    StreamUtils.ReadStreamedObject(reader, DelayPivotingButton);
                    break;

                case Tags.tgToolbox_ResizingButton:
                    StreamUtils.ReadStreamedObject(reader, ResizingButton);
                    break;

                case Tags.tgToolbox_MeasurePlaceButton:
                    StreamUtils.ReadStreamedObject(reader, MeasurePlaceButton);
                    break;

                case Tags.tgToolbox_ButtonsOrder:
                    var count        = StreamUtils.ReadInt32(reader);
                    var buttonsOrder = new string[count];
                    for (var i = 0; i < buttonsOrder.Length; i++)
                    {
                        buttonsOrder[i] = StreamUtils.ReadString(reader);
                    }

                    SortToolItems(buttonsOrder);
                    break;

                case Tags.tgToolbox_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
Exemplo n.º 15
0
            void IStreamedObject.ReadStream(BinaryReader reader, object options)
            {
                var editor = (HierarchyEditor)options;

                StreamUtils.CheckTag(reader, Tags.tgASPHierNodes);
                for (var exit = false; !exit;)
                {
                    var tag = StreamUtils.ReadTag(reader);
                    switch (tag)
                    {
                    case Tags.tgASPHierNodes_Count:
                        var c = StreamUtils.ReadInt32(reader);
                        for (var i = 0; i < c; i++)
                        {
                            var n = new Node(fItemsInPage);
                            Add(n);
                            (n as IStreamedObject).ReadStream(reader, editor);
                        }
                        break;

                    case Tags.tgASPHierNodes_Frame1:
                        c = StreamUtils.ReadInt32(reader);
                        for (var i = 0; i < c; i++)
                        {
                            Node n;
                            editor.allnodes.TryGetValue(StreamUtils.ReadString(reader), out n);
                            frame.Add(n);
                        }
                        break;

                    case Tags.tgASPHierNodes_Frame2:
                        c = StreamUtils.ReadInt32(reader);
                        for (var i = 0; i < c; i++)
                        {
                            Node n;
                            editor.allnodes.TryGetValue(StreamUtils.ReadString(reader), out n);
                            frame2.Add(n);
                        }
                        break;

                    case Tags.tgASPHierNodes_CurrentPage:
                        fCurrentPage = StreamUtils.ReadInt32(reader);
                        break;

                    case Tags.tgASPHierNodes_ItemsInPage:
                        fItemsInPage = StreamUtils.ReadInt32(reader);
                        break;

                    case Tags.tgASPHierNodes_TotalCount:
                        FTotalCount = StreamUtils.ReadInt32(reader);
                        break;

                    case Tags.tgASPHierNodes_EOT:
                        exit = true;
                        break;

                    default:
                        StreamUtils.SkipValue(reader);
                        break;
                    }
                }
            }
Exemplo n.º 16
0
        public void ReadStream(BinaryReader reader, object options)
        {
            StreamUtils.CheckTag(reader, Tags.tgToolboxButton);
            IsPressed     = false;
            Visible       = true;
            NeedSeparator = false;
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgToolboxButton_Text:
                    Text = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgToolboxButton_ButtonID:
                    ButtonID = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgToolboxButton_PressedImage:
                    PressedImage = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgToolboxButton_PressedText:
                    PressedText = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgToolboxButton_Tooltip:
                    Tooltip = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgToolboxButton_Image:
                    Image = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgToolboxButton_IsPressed:
                    IsPressed = true;
                    break;

                case Tags.tgToolboxButton_Visible:
                    Visible = false;
                    break;

                case Tags.tgToolboxButton_NeedSeparator:
                    NeedSeparator = true;
                    break;

                case Tags.tgToolboxButton_ClientScript:
                    ClientScript = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgToolboxButton_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
Exemplo n.º 17
0
        void IStreamedObject.ReadStream(BinaryReader reader, object options)
        {
            var g = (OlapControl)options;

            if (map == null)
            {
                map = new Dictionary <Level, HashSet <Member> >();
            }
            else
            {
                map.Clear();
            }
            StreamUtils.CheckTag(reader, Tags.tgLineMap);
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                switch (tag)
                {
                case Tags.tgLineMap_Map:
                    var lcnt = StreamUtils.ReadInt32(reader);
                    for (var j = 0; j < lcnt; j++)
                    {
                        var uniqName = StreamUtils.ReadString(reader);
                        var l        = g.Dimensions.FindLevel(uniqName);
                        var mcnt     = StreamUtils.ReadInt32(reader);
                        if (mcnt >= 0)
                        {
                            var mm = new HashSet <Member>();
                            for (var k = 0; k < mcnt; k++)
                            {
                                var mname = StreamUtils.ReadString(reader);
                                if (l != null)
                                {
                                    var m = l.FindMember(mname);
                                    if (m != null)
                                    {
                                        mm.Add(m);
                                    }
                                }
                            }
                            if (l != null)
                            {
                                map.Add(l, mm);
                            }
                        }
                        else if (l != null)
                        {
                            map.Add(l, null);
                        }
                    }
                    break;

                case Tags.tgLineMap_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }
Exemplo n.º 18
0
        void IStreamedObject.ReadStream(BinaryReader reader, object options)
        {
            FGrid = (OlapControl)options;
            StreamUtils.CheckTag(reader, Tags.tgMetaLine);
            for (var exit = false; !exit;)
            {
                var tag = StreamUtils.ReadTag(reader);
                int c;
                switch (tag)
                {
                case Tags.tgMetaline_HierArray:
                    c          = StreamUtils.ReadInt32(reader);
                    fHierArray = new List <int>(c);
                    for (var i = 0; i < c; i++)
                    {
                        fHierArray.Add(StreamUtils.ReadInt32(reader));
                    }
                    break;

                case Tags.tgMetaline_Levels:
                    c       = StreamUtils.ReadInt32(reader);
                    fLevels = new List <Level>(c);
                    for (var i = 0; i < c; i++)
                    {
                        fLevels.Add(FGrid.Dimensions.FindLevel(StreamUtils.ReadString(reader)));
                    }
                    break;

                case Tags.tgMetaline_IdxArray:
                    c         = StreamUtils.ReadInt32(reader);
                    fIdxArray = new List <long>(c);
                    for (var i = 0; i < c; i++)
                    {
                        fIdxArray.Add(StreamUtils.ReadInt64(reader));
                    }
                    break;

                case Tags.tgMetaline_Lines:
                    c      = StreamUtils.ReadInt32(reader);
                    fLines = new SortedList <string, Line>(c);
                    for (var i = 0; i < c; i++)
                    {
                        StreamUtils.ReadTag(reader);     // skip Tags.tgLine
                        var l = (Line)StreamUtils.ReadTypedStreamedObject(reader, this);
                        if (l.fMode != null)
                        {
                            fLines.Add(l.fID, l);
                        }
                    }
                    break;

                case Tags.tgMetaline_ID:
                    fID = StreamUtils.ReadString(reader);
                    break;

                case Tags.tgMetaline_Limit:
                    FLimit = StreamUtils.ReadInt64(reader);
                    break;

                case Tags.tgMetaLine_EOT:
                    exit = true;
                    break;

                default:
                    StreamUtils.SkipValue(reader);
                    break;
                }
            }
        }