개정판 9cb58d01
dev issue #000: fix
DTI_PID/SPPIDConverter/Mapping.Designer.vb | ||
---|---|---|
1 |
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> |
|
2 |
Partial Class Mapping |
|
3 |
Inherits System.Windows.Forms.Form |
|
4 |
|
|
5 |
'Form은 Dispose를 재정의하여 구성 요소 목록을 정리합니다. |
|
6 |
<System.Diagnostics.DebuggerNonUserCode()> |
|
7 |
Protected Overrides Sub Dispose(ByVal disposing As Boolean) |
|
8 |
Try |
|
9 |
If disposing AndAlso components IsNot Nothing Then |
|
10 |
components.Dispose() |
|
11 |
End If |
|
12 |
Finally |
|
13 |
MyBase.Dispose(disposing) |
|
14 |
End Try |
|
15 |
End Sub |
|
16 |
|
|
17 |
'Windows Form 디자이너에 필요합니다. |
|
18 |
Private components As System.ComponentModel.IContainer |
|
19 |
|
|
20 |
'참고: 다음 프로시저는 Windows Form 디자이너에 필요합니다. |
|
21 |
'수정하려면 Windows Form 디자이너를 사용하십시오. |
|
22 |
'코드 편집기에서는 수정하지 마세요. |
|
23 |
<System.Diagnostics.DebuggerStepThrough()> |
|
24 |
Private Sub InitializeComponent() |
|
25 |
Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl() |
|
26 |
Me.TabControl_Mapping = New DevExpress.XtraTab.XtraTabPage() |
|
27 |
Me.XtraTabPage2 = New DevExpress.XtraTab.XtraTabPage() |
|
28 |
Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl() |
|
29 |
Me.Btn_Save = New DevExpress.XtraEditors.SimpleButton() |
|
30 |
Me.Btn_Load = New DevExpress.XtraEditors.SimpleButton() |
|
31 |
CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit() |
|
32 |
Me.XtraTabControl1.SuspendLayout |
|
33 |
CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).BeginInit() |
|
34 |
Me.PanelControl1.SuspendLayout |
|
35 |
Me.SuspendLayout() |
|
36 |
' |
|
37 |
'XtraTabControl1 |
|
38 |
' |
|
39 |
Me.XtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill |
|
40 |
Me.XtraTabControl1.HeaderLocation = DevExpress.XtraTab.TabHeaderLocation.Bottom |
|
41 |
Me.XtraTabControl1.Location = New System.Drawing.Point(0, 37) |
|
42 |
Me.XtraTabControl1.Name = "XtraTabControl1" |
|
43 |
Me.XtraTabControl1.SelectedTabPage = Me.TabControl_Mapping |
|
44 |
Me.XtraTabControl1.Size = New System.Drawing.Size(665, 496) |
|
45 |
Me.XtraTabControl1.TabIndex = 0 |
|
46 |
Me.XtraTabControl1.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.TabControl_Mapping, Me.XtraTabPage2}) |
|
47 |
' |
|
48 |
'TabControl_Mapping |
|
49 |
' |
|
50 |
Me.TabControl_Mapping.Name = "TabControl_Mapping" |
|
51 |
Me.TabControl_Mapping.Size = New System.Drawing.Size(659, 467) |
|
52 |
Me.TabControl_Mapping.Text = "XtraTabPage1" |
|
53 |
' |
|
54 |
'XtraTabPage2 |
|
55 |
' |
|
56 |
Me.XtraTabPage2.Name = "XtraTabPage2" |
|
57 |
Me.XtraTabPage2.Size = New System.Drawing.Size(659, 467) |
|
58 |
Me.XtraTabPage2.Text = "XtraTabPage2" |
|
59 |
' |
|
60 |
'PanelControl1 |
|
61 |
' |
|
62 |
Me.PanelControl1.Controls.Add(Me.Btn_Save) |
|
63 |
Me.PanelControl1.Controls.Add(Me.Btn_Load) |
|
64 |
Me.PanelControl1.Dock = System.Windows.Forms.DockStyle.Top |
|
65 |
Me.PanelControl1.Location = New System.Drawing.Point(0, 0) |
|
66 |
Me.PanelControl1.Name = "PanelControl1" |
|
67 |
Me.PanelControl1.Size = New System.Drawing.Size(665, 37) |
|
68 |
Me.PanelControl1.TabIndex = 1 |
|
69 |
' |
|
70 |
'Btn_Save |
|
71 |
' |
|
72 |
Me.Btn_Save.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) |
|
73 |
Me.Btn_Save.Location = New System.Drawing.Point(585, 9) |
|
74 |
Me.Btn_Save.Name = "Btn_Save" |
|
75 |
Me.Btn_Save.Size = New System.Drawing.Size(75, 23) |
|
76 |
Me.Btn_Save.TabIndex = 1 |
|
77 |
Me.Btn_Save.Text = "Save" |
|
78 |
' |
|
79 |
'Btn_Load |
|
80 |
' |
|
81 |
Me.Btn_Load.Location = New System.Drawing.Point(12, 9) |
|
82 |
Me.Btn_Load.Name = "Btn_Load" |
|
83 |
Me.Btn_Load.Size = New System.Drawing.Size(75, 23) |
|
84 |
Me.Btn_Load.TabIndex = 0 |
|
85 |
Me.Btn_Load.Text = "Load" |
|
86 |
' |
|
87 |
'Mapping |
|
88 |
' |
|
89 |
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 12.0!) |
|
90 |
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font |
|
91 |
Me.ClientSize = New System.Drawing.Size(665, 533) |
|
92 |
Me.Controls.Add(Me.XtraTabControl1) |
|
93 |
Me.Controls.Add(Me.PanelControl1) |
|
94 |
Me.Name = "Mapping" |
|
95 |
Me.ShowIcon = False |
|
96 |
Me.Text = "Mapping Table" |
|
97 |
CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).EndInit() |
|
98 |
Me.XtraTabControl1.ResumeLayout(False) |
|
99 |
CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).EndInit() |
|
100 |
Me.PanelControl1.ResumeLayout(False) |
|
101 |
Me.ResumeLayout(False) |
|
102 |
|
|
103 |
End Sub |
|
104 |
|
|
105 |
Friend WithEvents XtraTabControl1 As DevExpress.XtraTab.XtraTabControl |
|
106 |
Friend WithEvents TabControl_Mapping As DevExpress.XtraTab.XtraTabPage |
|
107 |
Friend WithEvents XtraTabPage2 As DevExpress.XtraTab.XtraTabPage |
|
108 |
Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl |
|
109 |
Friend WithEvents Btn_Save As DevExpress.XtraEditors.SimpleButton |
|
110 |
Friend WithEvents Btn_Load As DevExpress.XtraEditors.SimpleButton |
|
111 |
End Class |
DTI_PID/SPPIDConverter/Mapping.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/Mapping.vb | ||
---|---|---|
1 |
|
|
2 |
|
|
3 |
Imports DevExpress.XtraEditors.Repository |
|
4 |
|
|
5 |
Public Class Mapping |
|
6 |
|
|
7 |
Dim oPidSymbolCombobox As DevExpress.XtraEditors.Repository.RepositoryItemComboBox |
|
8 |
Dim _PID_Ds As DataSet |
|
9 |
Dim _PIDSymbol_Dt As DataTable = New DataTable |
|
10 |
Dim _Gembox As New CGembox() |
|
11 |
|
|
12 |
Sub New(ByVal oDt As DataTable) |
|
13 |
' 디자이너에서 이 호출이 필요합니다. |
|
14 |
InitializeComponent() |
|
15 |
_PIDSymbol_Dt = oDt |
|
16 |
LoadSymbolLibrary() |
|
17 |
' InitializeComponent() 호출 뒤에 초기화 코드를 추가하세요. |
|
18 |
End Sub |
|
19 |
|
|
20 |
|
|
21 |
Private Function LoadSymbolDataset() As DataSet |
|
22 |
Dim oPID_Ds As DataSet |
|
23 |
_Gembox.isLoadFile(My.Settings.SymbolLibrary) |
|
24 |
oPID_Ds = _Gembox.LoadFileFunc() |
|
25 |
Return oPID_Ds |
|
26 |
End Function |
|
27 |
|
|
28 |
Private Sub LoadSymbolLibrary() |
|
29 |
|
|
30 |
_Gembox.isLoadFile(My.Settings.SymbolLibrary) |
|
31 |
_PID_Ds = _Gembox.LoadFileFunc() |
|
32 |
|
|
33 |
XtraTabControl1.TabPages.Clear() |
|
34 |
For Each oDt As DataTable In _PID_Ds.Tables |
|
35 |
|
|
36 |
Dim bCheckImageColumn As Boolean = False |
|
37 |
'Image Pid ComboBox 추가 |
|
38 |
For Each oColumn As DataColumn In oDt.Columns |
|
39 |
If oColumn.ColumnName = _Column_ImageSymbol Then |
|
40 |
bCheckImageColumn = True |
|
41 |
End If |
|
42 |
Next |
|
43 |
If bCheckImageColumn = False Then |
|
44 |
Try |
|
45 |
Dim iIndex As Integer = oDt.Columns(oDt.Columns.Count - 1).Namespace + 1 |
|
46 |
Dim oAddCol As DataColumn = oDt.Columns.Add(_Column_ImageSymbol) |
|
47 |
oAddCol.Namespace = iIndex |
|
48 |
Catch ex As Exception |
|
49 |
|
|
50 |
End Try |
|
51 |
|
|
52 |
End If |
|
53 |
|
|
54 |
Dim oTabPage As New DevExpress.XtraTab.XtraTabPage |
|
55 |
oTabPage.Name = oDt.TableName |
|
56 |
oTabPage.Text = oDt.TableName |
|
57 |
Dim oGridControl As New DevExpress.XtraGrid.GridControl |
|
58 |
Dim oGridview As New DevExpress.XtraGrid.Views.Grid.GridView |
|
59 |
' oGridview.CustomRowCellEdit += New DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventHandler(GridView_Mapping_CustomRowCellEdit); |
|
60 |
|
|
61 |
oGridControl.ViewCollection.Add(oGridview) |
|
62 |
oGridControl.MainView = oGridview |
|
63 |
oGridControl.DataSource = oDt |
|
64 |
oGridControl.BindingContext = New BindingContext() |
|
65 |
oGridControl.ForceInitialize() |
|
66 |
oGridview.Columns(_Column_ImageSymbol).ColumnEdit = GetComboEdit(oDt.TableName) |
|
67 |
oGridview.OptionsView.BestFitMode = DevExpress.XtraGrid.Views.Grid.GridBestFitMode.Full |
|
68 |
oGridview.OptionsView.ColumnAutoWidth = False |
|
69 |
oGridview.BestFitColumns() |
|
70 |
oGridControl.Dock = DockStyle.Fill |
|
71 |
oTabPage.Controls.Add(oGridControl) |
|
72 |
XtraTabControl1.TabPages.Add(oTabPage) |
|
73 |
Next |
|
74 |
End Sub |
|
75 |
|
|
76 |
Private Function GetComboEdit(ByVal sType As String) As RepositoryItemComboBox |
|
77 |
Dim oSymbolCombo As New RepositoryItemComboBox() |
|
78 |
oSymbolCombo.DropDownRows = 30 |
|
79 |
If _PIDSymbol_Dt IsNot Nothing Then |
|
80 |
Dim oDataRows() As DataRow = _PIDSymbol_Dt.Select("category = '" & sType & "'") |
|
81 |
|
|
82 |
For Each oRow In oDataRows |
|
83 |
|
|
84 |
Dim sCategory As String = oRow("name").ToString() |
|
85 |
oSymbolCombo.Items.Add(sCategory) |
|
86 |
Next |
|
87 |
|
|
88 |
End If |
|
89 |
|
|
90 |
Return oSymbolCombo |
|
91 |
|
|
92 |
End Function |
|
93 |
|
|
94 |
Private Sub GridView_Mapping_CustomRowCellEdit(ByVal oObject As Object, ByVal e As DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs) |
|
95 |
If e.Column.FieldName = _Column_ImageSymbol Then |
|
96 |
e.RepositoryItem = oPidSymbolCombobox |
|
97 |
Else |
|
98 |
Return |
|
99 |
End If |
|
100 |
End Sub |
|
101 |
|
|
102 |
Private Sub TabControl_Mapping_Paint(sender As Object, e As PaintEventArgs) Handles TabControl_Mapping.Paint |
|
103 |
|
|
104 |
End Sub |
|
105 |
|
|
106 |
Private Sub TabControl_Mapping_MouseDown(sender As Object, e As MouseEventArgs) Handles TabControl_Mapping.MouseDown |
|
107 |
|
|
108 |
End Sub |
|
109 |
|
|
110 |
Private Sub Btn_Save_Click(sender As Object, e As EventArgs) Handles Btn_Save.Click |
|
111 |
|
|
112 |
'Dim oSaveFileDialog As New SaveFileDialog |
|
113 |
'oSaveFileDialog.Filter = "xlsx Files (*.xlsx)|*.xlsx" |
|
114 |
'If oSaveFileDialog.ShowDialog() = DialogResult.OK Then |
|
115 |
' If oSaveFileDialog.FileName <> "" Then |
|
116 |
|
|
117 |
' End If |
|
118 |
'End If |
|
119 |
If _PID_Ds IsNot Nothing Then |
|
120 |
Dim iAddColCnt As Integer = 0 |
|
121 |
Dim oPidSymbol_Dt As DataTable = _Gembox.AddImageLibrary(_PID_Ds, _PIDSymbol_Dt) |
|
122 |
For Each oDt As DataTable In _PID_Ds.Tables |
|
123 |
'Dim oGembox As New CGembox |
|
124 |
_Gembox.SaveSymbolLibrary(oDt, oPidSymbol_Dt) |
|
125 |
'_Gembox.outputToExcelFile(oDt, oDt.TableName, oSaveFileDialog.FileName) |
|
126 |
_Gembox.SetSaveFile(My.Settings.SymbolLibrary) |
|
127 |
Next |
|
128 |
MessageBox.Show("저장 완료") |
|
129 |
' System.Diagnostics.Process.Start(My.Settings.SymbolLibrary) |
|
130 |
Else |
|
131 |
MessageBox.Show("Symbol DB가 없습니다.") |
|
132 |
End If |
|
133 |
End Sub |
|
134 |
|
|
135 |
Private Sub Btn_Load_Click(sender As Object, e As EventArgs) Handles Btn_Load.Click |
|
136 |
|
|
137 |
End Sub |
|
138 |
End Class |
DTI_PID/SPPIDConverter/SPPIDConverter.vbproj | ||
---|---|---|
123 | 123 |
<DependentUpon>Main.vb</DependentUpon> |
124 | 124 |
<SubType>Form</SubType> |
125 | 125 |
</Compile> |
126 |
<Compile Include="Mapping.Designer.vb"> |
|
127 |
<DependentUpon>Mapping.vb</DependentUpon> |
|
128 |
</Compile> |
|
129 |
<Compile Include="Mapping.vb"> |
|
130 |
<SubType>Form</SubType> |
|
131 |
</Compile> |
|
132 | 126 |
<Compile Include="MDatatable.vb" /> |
133 | 127 |
<Compile Include="MKey.vb" /> |
134 | 128 |
<Compile Include="MThread.vb" /> |
... | ... | |
170 | 164 |
<EmbeddedResource Include="Main.resx"> |
171 | 165 |
<DependentUpon>Main.vb</DependentUpon> |
172 | 166 |
</EmbeddedResource> |
173 |
<EmbeddedResource Include="Mapping.resx"> |
|
174 |
<DependentUpon>Mapping.vb</DependentUpon> |
|
175 |
</EmbeddedResource> |
|
176 | 167 |
<EmbeddedResource Include="My Project\licenses.licx" /> |
177 | 168 |
<EmbeddedResource Include="My Project\Resources.resx"> |
178 | 169 |
<Generator>VbMyResourcesResXFileCodeGenerator</Generator> |
내보내기 Unified diff