1
1
mirror of https://github.com/dgis/xsddiagram.git synced 2024-08-17 06:20:23 +03:00

fix: add type in diagram.cs

This commit is contained in:
EIDMANN Andreas 2017-05-24 17:15:09 +02:00
parent 22466990a8
commit 67c613b701
2 changed files with 7 additions and 7 deletions

View File

@ -143,7 +143,8 @@ namespace XSDDiagram.Rendering
childDiagramElement.Diagram = this;
childDiagramElement.TabSchema = childElement;
childDiagramElement.Name = childElement.name != null ? childElement.name : "";
string type = childDiagramElement.GetTypeAnnotation();
childDiagramElement.Name = childElement.name != null ? childElement.name + " : " + type : "";
childDiagramElement.NameSpace = nameSpace;
childDiagramElement.ItemType = DiagramItemType.element;
int occurrence;
@ -225,8 +226,9 @@ namespace XSDDiagram.Rendering
{
DiagramItem childDiagramElement = new DiagramItem();
childDiagramElement.Diagram = this;
childDiagramElement.TabSchema = childElement;
childDiagramElement.Name = childElement.name != null ? childElement.name : "";
childDiagramElement.TabSchema = childElement;
childDiagramElement.Name = childElement.name != null ? childElement.name : "";
childDiagramElement.NameSpace = nameSpace;
childDiagramElement.ItemType = DiagramItemType.type;
childDiagramElement.MinOccurrence = 1;

View File

@ -492,10 +492,8 @@ namespace XSDDiagram.Rendering
stringFormatText.Alignment = StringAlignment.Center;
stringFormatText.LineAlignment = StringAlignment.Center;
stringFormatText.FormatFlags |= StringFormatFlags.NoClip; //MONOFIX
string type = drawingItem.GetTypeAnnotation();
_graphics.DrawString(drawingItem.Name +" : "+type,drawingItem.FontScaled, foreground, new RectangleF(scaledElementBox.X, scaledElementBox.Y, scaledElementBox.Width, scaledElementBox.Height), stringFormatText);
_graphics.DrawString(drawingItem.Name,drawingItem.FontScaled, foreground, new RectangleF(scaledElementBox.X, scaledElementBox.Y, scaledElementBox.Width, scaledElementBox.Height), stringFormatText);
}
// Draw Documentation