コード例 #1
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(_controller.Doc) == null)
                {
                    return(null); // if there is no parent data set we can enter anything
                }
                else if (GraphDocumentCollection.GetParentGraphDocumentCollectionOf(_controller.Doc).Contains(graphname))
                {
                    return("This graph name already exists, please choose another name!");
                }
                else
                {
                    return(null);
                }
            }
コード例 #2
0
        public Altaxo.Graph.Gdi.GraphDocument CreateNewGraphDocument()
        {
            GraphDocument doc = new GraphDocument();

            GraphDocumentCollection.Add(doc);

            return(doc);
        }