Exemplo n.º 1
0
            public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
            {
                WorksheetLayoutCollection s = (WorksheetLayoutCollection)obj;

                info.CreateArray("TableLayoutArray", s.m_TableLayouts.Count);
                foreach (object style in s.m_TableLayouts.Values)
                {
                    info.AddValue("WorksheetLayout", style);
                }
                info.CommitArray();
            }
Exemplo n.º 2
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                WorksheetLayoutCollection s = null != o ? (WorksheetLayoutCollection)o : new WorksheetLayoutCollection();

                int count;

                count = info.OpenArray(); // TableLayouts

                for (int i = 0; i < count; i++)
                {
                    var style = (WorksheetLayout)info.GetValue("WorksheetLayout", s);
                    s._items.Add(style.Guid.ToString(), style);
                }
                info.CloseArray(count);

                return(s);
            }