개정판 a6830a94
dev issue #000 : add ValidationCheck (Connline Type 다를경우
Change-Id: If44820296d9a0b01c241fb7777c1df5a8ee193b5
DTI_PID/SPPIDConverter/BaseModel/Document.cs | ||
---|---|---|
762 | 762 |
} |
763 | 763 |
#endregion |
764 | 764 |
|
765 |
#region Line To Line Type Check |
|
766 |
List<string[]> typeCheck = new List<string[]>(); |
|
767 |
foreach (var item in LINES) |
|
768 |
{ |
|
769 |
foreach (var connector in item.CONNECTORS) |
|
770 |
{ |
|
771 |
Line connLine = connector.ConnectedObject as Line; |
|
772 |
if (connLine != null && connLine.CONNECTORS.Find(x => x.ConnectedObject == item) != null && |
|
773 |
connLine.TYPE != item.TYPE && |
|
774 |
typeCheck.Find(x => (x[0] == item.UID || x[1] == connLine.UID) || (x[1] == item.UID || x[0] == connLine.UID)) == null) |
|
775 |
{ |
|
776 |
validationStringBuilder.AppendLine("Check line type!"); |
|
777 |
validationStringBuilder.AppendLine("UID : " + item.UID); |
|
778 |
validationStringBuilder.AppendLine("UID : " + connLine.UID); |
|
779 |
validationStringBuilder.AppendLine(); |
|
780 |
validationResult = true; |
|
781 |
typeCheck.Add(new string[] { item.UID, connLine.UID }); |
|
782 |
} |
|
783 |
} |
|
784 |
} |
|
785 |
#endregion |
|
786 |
|
|
765 | 787 |
if (validationResult) |
766 | 788 |
{ |
767 | 789 |
_Enable = false; |
내보내기 Unified diff