public void GetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
            {
                GraphDocumentCollection s = (GraphDocumentCollection)obj;

                // info.AddValue("Parent",s.parent);
                info.AddValue("Graphs", s.m_GraphsByName);
            }
예제 #2
0
            public override string Validate(string graphname)
            {
                string err = base.Validate(graphname);

                if (null != err)
                {
                    return(err);
                }

                if (_doc.Name == graphname)
                {
                    return(null);
                }
                else if (GraphDocumentCollection.GetParentGraphDocumentCollectionOf(_doc) == null)
                {
                    return(null); // if there is no parent data set we can enter anything
                }
                else if (GraphDocumentCollection.GetParentGraphDocumentCollectionOf(_doc).ContainsAnyName(graphname))
                {
                    return("This graph name already exists, please choose another name!");
                }
                else
                {
                    return(null);
                }
            }
예제 #3
0
 public AltaxoDocument()
 {
     m_DataSet           = new Altaxo.Data.DataTableCollection(this);
     m_GraphSet          = new GraphDocumentCollection(this);
     m_TableLayoutList   = new Altaxo.Worksheet.WorksheetLayoutCollection(this);
     _FitFunctionScripts = new Altaxo.Scripting.FitFunctionScriptCollection();
     //  m_Worksheets = new System.Collections.ArrayList();
     //  m_GraphForms = new System.Collections.ArrayList();
 }
            public object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector)
            {
                GraphDocumentCollection s = (GraphDocumentCollection)obj;

                // s.parent = (AltaxoDocument)(info.GetValue("Parent",typeof(AltaxoDocument)));
                s.m_GraphsByName = (SortedDictionary <string, GraphDocument>)(info.GetValue("Graphs", typeof(SortedDictionary <string, GraphDocument>)));

                return(s);
            }