개정판 63c5305b
dev issue #000 : validation check form
Change-Id: I5737d659dfebebaa3c03f3c2262272fd47aac779
DTI_PID/SPPIDConverter/BaseModel/Document.cs | ||
---|---|---|
86 | 86 |
SetTrimLine(xml.Element("TRIMLINENOS")); |
87 | 87 |
|
88 | 88 |
SetAllConnectors(); |
89 |
ValidationCheck(); |
|
90 | 89 |
_Enable = true; |
90 |
ValidationCheck(); |
|
91 | 91 |
} |
92 | 92 |
} |
93 | 93 |
catch (Exception ex) |
... | ... | |
542 | 542 |
|
543 | 543 |
public void ValidationCheck() |
544 | 544 |
{ |
545 |
bool validationResult = false; |
|
545 | 546 |
#region Connection Check / Symbol의 SceneConnectPoint Check |
546 | 547 |
foreach (var item in _SYMBOLS) |
547 | 548 |
{ |
... | ... | |
555 | 556 |
validationStringBuilder.AppendLine("Check connection!"); |
556 | 557 |
validationStringBuilder.AppendLine("Symbol UID : " + item.UID); |
557 | 558 |
validationStringBuilder.AppendLine("Line UID : " + line.UID); |
558 |
throw new Exception(validationStringBuilder.ToString()); |
|
559 |
validationStringBuilder.AppendLine(); |
|
560 |
validationResult = true; |
|
559 | 561 |
} |
560 | 562 |
} |
561 | 563 |
|
... | ... | |
563 | 565 |
{ |
564 | 566 |
validationStringBuilder.AppendLine("Check Symbol SceneConnectPoint!"); |
565 | 567 |
validationStringBuilder.AppendLine("Symbol UID : " + item.UID); |
566 |
throw new Exception(validationStringBuilder.ToString()); |
|
568 |
validationStringBuilder.AppendLine(); |
|
569 |
validationResult = true; |
|
567 | 570 |
} |
568 | 571 |
} |
569 | 572 |
} |
... | ... | |
580 | 583 |
validationStringBuilder.AppendLine("Check connection!"); |
581 | 584 |
validationStringBuilder.AppendLine("Symbol UID : " + symbol.UID); |
582 | 585 |
validationStringBuilder.AppendLine("Line UID : " + item.UID); |
583 |
throw new Exception(validationStringBuilder.ToString()); |
|
586 |
validationStringBuilder.AppendLine(); |
|
587 |
validationResult = true; |
|
584 | 588 |
} |
585 | 589 |
} |
586 | 590 |
} |
... | ... | |
594 | 598 |
{ |
595 | 599 |
validationStringBuilder.AppendLine("Check symbol size!"); |
596 | 600 |
validationStringBuilder.AppendLine("Symbol UID : " + item.UID); |
597 |
throw new Exception(validationStringBuilder.ToString()); |
|
601 |
validationStringBuilder.AppendLine(); |
|
602 |
validationResult = true; |
|
598 | 603 |
} |
599 | 604 |
} |
600 | 605 |
#endregion |
... | ... | |
608 | 613 |
{ |
609 | 614 |
validationStringBuilder.AppendLine("Check SpecBreak UpStream, DownStream!"); |
610 | 615 |
validationStringBuilder.AppendLine("UID : " + item.UID); |
611 |
throw new Exception(validationStringBuilder.ToString()); |
|
616 |
validationStringBuilder.AppendLine(); |
|
617 |
validationResult = true; |
|
612 | 618 |
} |
613 | 619 |
else |
614 | 620 |
{ |
... | ... | |
648 | 654 |
{ |
649 | 655 |
validationStringBuilder.AppendLine("Check SpecBreak UpStream, DownStream!"); |
650 | 656 |
validationStringBuilder.AppendLine("UID : " + item.UID); |
651 |
throw new Exception(validationStringBuilder.ToString()); |
|
657 |
validationStringBuilder.AppendLine(); |
|
658 |
validationResult = true; |
|
652 | 659 |
} |
653 | 660 |
} |
654 | 661 |
} |
... | ... | |
661 | 668 |
{ |
662 | 669 |
validationStringBuilder.AppendLine("Check EndBreak Owner, Connected Item!"); |
663 | 670 |
validationStringBuilder.AppendLine("UID : " + item.UID); |
664 |
throw new Exception(validationStringBuilder.ToString()); |
|
671 |
validationStringBuilder.AppendLine(); |
|
672 |
validationResult = true; |
|
665 | 673 |
} |
666 | 674 |
else |
667 | 675 |
{ |
... | ... | |
701 | 709 |
{ |
702 | 710 |
validationStringBuilder.AppendLine("Check EndBreak Owner, Connected Item!"); |
703 | 711 |
validationStringBuilder.AppendLine("UID : " + item.UID); |
704 |
throw new Exception(validationStringBuilder.ToString()); |
|
712 |
validationStringBuilder.AppendLine(); |
|
713 |
validationResult = true; |
|
705 | 714 |
} |
706 | 715 |
} |
707 | 716 |
} |
... | ... | |
725 | 734 |
validationStringBuilder.AppendLine("Check line flow direction!"); |
726 | 735 |
validationStringBuilder.AppendLine("UID : " + line.UID); |
727 | 736 |
validationStringBuilder.AppendLine("UID : " + connLine.UID); |
728 |
throw new Exception(validationStringBuilder.ToString()); |
|
737 |
validationStringBuilder.AppendLine(); |
|
738 |
validationResult = true; |
|
729 | 739 |
} |
730 | 740 |
} |
731 | 741 |
} |
732 | 742 |
} |
733 | 743 |
#endregion |
744 |
|
|
745 |
if (validationResult) |
|
746 |
{ |
|
747 |
_Enable = false; |
|
748 |
SPPID.Form.MessageForm message = new SPPID.Form.MessageForm(validationStringBuilder.ToString()); |
|
749 |
message.ShowDialog(); |
|
750 |
} |
|
734 | 751 |
} |
735 | 752 |
} |
736 | 753 |
} |
DTI_PID/SPPIDConverter/Form/MessageForm.Designer.cs | ||
---|---|---|
1 |
namespace Converter.SPPID.Form |
|
2 |
{ |
|
3 |
partial class MessageForm |
|
4 |
{ |
|
5 |
/// <summary> |
|
6 |
/// Required designer variable. |
|
7 |
/// </summary> |
|
8 |
private System.ComponentModel.IContainer components = null; |
|
9 |
|
|
10 |
/// <summary> |
|
11 |
/// Clean up any resources being used. |
|
12 |
/// </summary> |
|
13 |
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> |
|
14 |
protected override void Dispose(bool disposing) |
|
15 |
{ |
|
16 |
if (disposing && (components != null)) |
|
17 |
{ |
|
18 |
components.Dispose(); |
|
19 |
} |
|
20 |
base.Dispose(disposing); |
|
21 |
} |
|
22 |
|
|
23 |
#region Windows Form Designer generated code |
|
24 |
|
|
25 |
/// <summary> |
|
26 |
/// Required method for Designer support - do not modify |
|
27 |
/// the contents of this method with the code editor. |
|
28 |
/// </summary> |
|
29 |
private void InitializeComponent() |
|
30 |
{ |
|
31 |
this.memoEdit = new DevExpress.XtraEditors.MemoEdit(); |
|
32 |
this.ribbonControl = new DevExpress.XtraBars.Ribbon.RibbonControl(); |
|
33 |
this.ribbonPage2 = new DevExpress.XtraBars.Ribbon.RibbonPage(); |
|
34 |
((System.ComponentModel.ISupportInitialize)(this.memoEdit.Properties)).BeginInit(); |
|
35 |
((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).BeginInit(); |
|
36 |
this.SuspendLayout(); |
|
37 |
// |
|
38 |
// memoEdit |
|
39 |
// |
|
40 |
this.memoEdit.Dock = System.Windows.Forms.DockStyle.Fill; |
|
41 |
this.memoEdit.Location = new System.Drawing.Point(0, 27); |
|
42 |
this.memoEdit.Name = "memoEdit"; |
|
43 |
this.memoEdit.Size = new System.Drawing.Size(744, 426); |
|
44 |
this.memoEdit.TabIndex = 0; |
|
45 |
// |
|
46 |
// ribbonControl |
|
47 |
// |
|
48 |
this.ribbonControl.ExpandCollapseItem.Id = 0; |
|
49 |
this.ribbonControl.Items.AddRange(new DevExpress.XtraBars.BarItem[] { |
|
50 |
this.ribbonControl.ExpandCollapseItem}); |
|
51 |
this.ribbonControl.Location = new System.Drawing.Point(0, 0); |
|
52 |
this.ribbonControl.MaxItemId = 1; |
|
53 |
this.ribbonControl.Name = "ribbonControl"; |
|
54 |
this.ribbonControl.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; |
|
55 |
this.ribbonControl.ShowDisplayOptionsMenuButton = DevExpress.Utils.DefaultBoolean.False; |
|
56 |
this.ribbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages; |
|
57 |
this.ribbonControl.ShowToolbarCustomizeItem = false; |
|
58 |
this.ribbonControl.Size = new System.Drawing.Size(744, 27); |
|
59 |
this.ribbonControl.Toolbar.ShowCustomizeItem = false; |
|
60 |
// |
|
61 |
// ribbonPage2 |
|
62 |
// |
|
63 |
this.ribbonPage2.Name = "ribbonPage2"; |
|
64 |
this.ribbonPage2.Text = "ribbonPage2"; |
|
65 |
// |
|
66 |
// MessageForm |
|
67 |
// |
|
68 |
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); |
|
69 |
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|
70 |
this.ClientSize = new System.Drawing.Size(744, 453); |
|
71 |
this.Controls.Add(this.memoEdit); |
|
72 |
this.Controls.Add(this.ribbonControl); |
|
73 |
this.Name = "MessageForm"; |
|
74 |
this.Ribbon = this.ribbonControl; |
|
75 |
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; |
|
76 |
this.Text = "Message"; |
|
77 |
((System.ComponentModel.ISupportInitialize)(this.memoEdit.Properties)).EndInit(); |
|
78 |
((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).EndInit(); |
|
79 |
this.ResumeLayout(false); |
|
80 |
this.PerformLayout(); |
|
81 |
|
|
82 |
} |
|
83 |
|
|
84 |
#endregion |
|
85 |
|
|
86 |
private DevExpress.XtraEditors.MemoEdit memoEdit; |
|
87 |
private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl; |
|
88 |
private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage2; |
|
89 |
} |
|
90 |
} |
DTI_PID/SPPIDConverter/Form/MessageForm.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.ComponentModel; |
|
4 |
using System.Data; |
|
5 |
using System.Drawing; |
|
6 |
using System.Linq; |
|
7 |
using System.Text; |
|
8 |
using System.Threading.Tasks; |
|
9 |
using System.Windows.Forms; |
|
10 |
|
|
11 |
namespace Converter.SPPID.Form |
|
12 |
{ |
|
13 |
public partial class MessageForm : DevExpress.XtraBars.Ribbon.RibbonForm |
|
14 |
{ |
|
15 |
public MessageForm(string text) |
|
16 |
{ |
|
17 |
InitializeComponent(); |
|
18 |
memoEdit.Text = text; |
|
19 |
} |
|
20 |
} |
|
21 |
} |
DTI_PID/SPPIDConverter/Form/MessageForm.resx | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<root> |
|
3 |
<!-- |
|
4 |
Microsoft ResX Schema |
|
5 |
|
|
6 |
Version 2.0 |
|
7 |
|
|
8 |
The primary goals of this format is to allow a simple XML format |
|
9 |
that is mostly human readable. The generation and parsing of the |
|
10 |
various data types are done through the TypeConverter classes |
|
11 |
associated with the data types. |
|
12 |
|
|
13 |
Example: |
|
14 |
|
|
15 |
... ado.net/XML headers & schema ... |
|
16 |
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|
17 |
<resheader name="version">2.0</resheader> |
|
18 |
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|
19 |
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|
20 |
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|
21 |
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|
22 |
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|
23 |
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|
24 |
</data> |
|
25 |
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|
26 |
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|
27 |
<comment>This is a comment</comment> |
|
28 |
</data> |
|
29 |
|
|
30 |
There are any number of "resheader" rows that contain simple |
|
31 |
name/value pairs. |
|
32 |
|
|
33 |
Each data row contains a name, and value. The row also contains a |
|
34 |
type or mimetype. Type corresponds to a .NET class that support |
|
35 |
text/value conversion through the TypeConverter architecture. |
|
36 |
Classes that don't support this are serialized and stored with the |
|
37 |
mimetype set. |
|
38 |
|
|
39 |
The mimetype is used for serialized objects, and tells the |
|
40 |
ResXResourceReader how to depersist the object. This is currently not |
|
41 |
extensible. For a given mimetype the value must be set accordingly: |
|
42 |
|
|
43 |
Note - application/x-microsoft.net.object.binary.base64 is the format |
|
44 |
that the ResXResourceWriter will generate, however the reader can |
|
45 |
read any of the formats listed below. |
|
46 |
|
|
47 |
mimetype: application/x-microsoft.net.object.binary.base64 |
|
48 |
value : The object must be serialized with |
|
49 |
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|
50 |
: and then encoded with base64 encoding. |
|
51 |
|
|
52 |
mimetype: application/x-microsoft.net.object.soap.base64 |
|
53 |
value : The object must be serialized with |
|
54 |
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|
55 |
: and then encoded with base64 encoding. |
|
56 |
|
|
57 |
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|
58 |
value : The object must be serialized into a byte array |
|
59 |
: using a System.ComponentModel.TypeConverter |
|
60 |
: and then encoded with base64 encoding. |
|
61 |
--> |
|
62 |
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|
63 |
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|
64 |
<xsd:element name="root" msdata:IsDataSet="true"> |
|
65 |
<xsd:complexType> |
|
66 |
<xsd:choice maxOccurs="unbounded"> |
|
67 |
<xsd:element name="metadata"> |
|
68 |
<xsd:complexType> |
|
69 |
<xsd:sequence> |
|
70 |
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|
71 |
</xsd:sequence> |
|
72 |
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|
73 |
<xsd:attribute name="type" type="xsd:string" /> |
|
74 |
<xsd:attribute name="mimetype" type="xsd:string" /> |
|
75 |
<xsd:attribute ref="xml:space" /> |
|
76 |
</xsd:complexType> |
|
77 |
</xsd:element> |
|
78 |
<xsd:element name="assembly"> |
|
79 |
<xsd:complexType> |
|
80 |
<xsd:attribute name="alias" type="xsd:string" /> |
|
81 |
<xsd:attribute name="name" type="xsd:string" /> |
|
82 |
</xsd:complexType> |
|
83 |
</xsd:element> |
|
84 |
<xsd:element name="data"> |
|
85 |
<xsd:complexType> |
|
86 |
<xsd:sequence> |
|
87 |
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|
88 |
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|
89 |
</xsd:sequence> |
|
90 |
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|
91 |
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|
92 |
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|
93 |
<xsd:attribute ref="xml:space" /> |
|
94 |
</xsd:complexType> |
|
95 |
</xsd:element> |
|
96 |
<xsd:element name="resheader"> |
|
97 |
<xsd:complexType> |
|
98 |
<xsd:sequence> |
|
99 |
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|
100 |
</xsd:sequence> |
|
101 |
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|
102 |
</xsd:complexType> |
|
103 |
</xsd:element> |
|
104 |
</xsd:choice> |
|
105 |
</xsd:complexType> |
|
106 |
</xsd:element> |
|
107 |
</xsd:schema> |
|
108 |
<resheader name="resmimetype"> |
|
109 |
<value>text/microsoft-resx</value> |
|
110 |
</resheader> |
|
111 |
<resheader name="version"> |
|
112 |
<value>2.0</value> |
|
113 |
</resheader> |
|
114 |
<resheader name="reader"> |
|
115 |
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|
116 |
</resheader> |
|
117 |
<resheader name="writer"> |
|
118 |
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|
119 |
</resheader> |
|
120 |
</root> |
DTI_PID/SPPIDConverter/SPPIDConverter.csproj | ||
---|---|---|
171 | 171 |
<Compile Include="Form\MappingForm.Designer.cs"> |
172 | 172 |
<DependentUpon>MappingForm.cs</DependentUpon> |
173 | 173 |
</Compile> |
174 |
<Compile Include="Form\MessageForm.cs"> |
|
175 |
<SubType>Form</SubType> |
|
176 |
</Compile> |
|
177 |
<Compile Include="Form\MessageForm.Designer.cs"> |
|
178 |
<DependentUpon>MessageForm.cs</DependentUpon> |
|
179 |
</Compile> |
|
174 | 180 |
<Compile Include="Form\SPPID_DB_SettingForm.cs"> |
175 | 181 |
<SubType>Form</SubType> |
176 | 182 |
</Compile> |
... | ... | |
243 | 249 |
<EmbeddedResource Include="Form\MappingForm.resx"> |
244 | 250 |
<DependentUpon>MappingForm.cs</DependentUpon> |
245 | 251 |
</EmbeddedResource> |
252 |
<EmbeddedResource Include="Form\MessageForm.resx"> |
|
253 |
<DependentUpon>MessageForm.cs</DependentUpon> |
|
254 |
</EmbeddedResource> |
|
246 | 255 |
<EmbeddedResource Include="Form\SPPID_DB_SettingForm.resx"> |
247 | 256 |
<DependentUpon>SPPID_DB_SettingForm.cs</DependentUpon> |
248 | 257 |
</EmbeddedResource> |
내보내기 Unified diff