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); } }
public Altaxo.Graph.Gdi.GraphDocument CreateNewGraphDocument() { GraphDocument doc = new GraphDocument(); GraphDocumentCollection.Add(doc); return(doc); }