frmRowEditor
This commit is contained in:
parent
12aa22ebdf
commit
b7602d896a
@ -16,10 +16,13 @@ Public Class GridLoader
|
||||
.Name = pTable.Name
|
||||
}
|
||||
|
||||
|
||||
oGrid.ForceInitialize()
|
||||
oGrid.MainView.PopulateColumns()
|
||||
|
||||
Dim oView As GridView = oGrid.DefaultView
|
||||
oView.OptionsBehavior.ReadOnly = True
|
||||
oView.OptionsBehavior.Editable = False
|
||||
|
||||
For Each oCol In pTable.Columns
|
||||
Dim oColumn = New Columns.GridColumn With {
|
||||
|
||||
@ -91,6 +91,7 @@
|
||||
<Reference Include="DevExpress.XtraReports.v19.2.Extensions, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.XtraRichEdit.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraTreeList.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.XtraVerticalGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DigitalData.Controls.SQLConfig">
|
||||
<HintPath>..\..\DDMonorepo\SQLConfig\bin\Debug\DigitalData.Controls.SQLConfig.dll</HintPath>
|
||||
</Reference>
|
||||
@ -119,6 +120,7 @@
|
||||
<HintPath>..\packages\NLog.4.7.10\lib\net45\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
@ -173,6 +175,12 @@
|
||||
<Compile Include="frmMandatorSelection.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmRowEditor.Designer.vb">
|
||||
<DependentUpon>frmRowEditor.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmRowEditor.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="GridLoader.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
@ -220,6 +228,9 @@
|
||||
<EmbeddedResource Include="frmMandatorSelection.resx">
|
||||
<DependentUpon>frmMandatorSelection.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmRowEditor.resx">
|
||||
<DependentUpon>frmRowEditor.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\licenses.licx" />
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
|
||||
@ -1,15 +1,17 @@
|
||||
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraReports.UserDesigner.XRDesignDockManager, DevExpress.XtraReports.v19.2.Extensions, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraRichEdit.RichEditControl, DevExpress.XtraRichEdit.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraReports.UserDesigner.XRDesignBarManager, DevExpress.XtraReports.v19.2.Extensions, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.SearchLookUpEdit, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraReports.UserDesigner.XRDesignBarManager, DevExpress.XtraReports.v19.2.Extensions, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraReports.UserDesigner.XRDesignDockManager, DevExpress.XtraReports.v19.2.Extensions, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraVerticalGrid.PropertyGridControl, DevExpress.XtraVerticalGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraVerticalGrid.VGridControl, DevExpress.XtraVerticalGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraRichEdit.RichEditControl, DevExpress.XtraRichEdit.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
|
||||
27
EDIDocumentImport/frmImportMain.Designer.vb
generated
27
EDIDocumentImport/frmImportMain.Designer.vb
generated
@ -25,6 +25,8 @@ Partial Class frmImportMain
|
||||
Me.txtVersion = New DevExpress.XtraBars.BarStaticItem()
|
||||
Me.txtFilesLoaded = New DevExpress.XtraBars.BarStaticItem()
|
||||
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
||||
@ -38,7 +40,6 @@ Partial Class frmImportMain
|
||||
Me.SplitContainerControl3 = New DevExpress.XtraEditors.SplitContainerControl()
|
||||
Me.SplitContainerControl4 = New DevExpress.XtraEditors.SplitContainerControl()
|
||||
Me.UnboundSource1 = New DevExpress.Data.UnboundSource(Me.components)
|
||||
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
|
||||
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerControl1.SuspendLayout()
|
||||
@ -56,9 +57,9 @@ Partial Class frmImportMain
|
||||
'RibbonControl
|
||||
'
|
||||
Me.RibbonControl.ExpandCollapseItem.Id = 0
|
||||
Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.txtVersion, Me.txtFilesLoaded, Me.BarButtonItem1, Me.BarButtonItem2})
|
||||
Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.txtVersion, Me.txtFilesLoaded, Me.BarButtonItem1, Me.BarButtonItem2, Me.BarButtonItem3})
|
||||
Me.RibbonControl.Location = New System.Drawing.Point(0, 0)
|
||||
Me.RibbonControl.MaxItemId = 5
|
||||
Me.RibbonControl.MaxItemId = 6
|
||||
Me.RibbonControl.Name = "RibbonControl"
|
||||
Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
|
||||
Me.RibbonControl.Size = New System.Drawing.Size(1215, 158)
|
||||
@ -83,6 +84,18 @@ Partial Class frmImportMain
|
||||
Me.BarButtonItem1.Id = 3
|
||||
Me.BarButtonItem1.Name = "BarButtonItem1"
|
||||
'
|
||||
'BarButtonItem2
|
||||
'
|
||||
Me.BarButtonItem2.Caption = "Export"
|
||||
Me.BarButtonItem2.Id = 4
|
||||
Me.BarButtonItem2.Name = "BarButtonItem2"
|
||||
'
|
||||
'BarButtonItem3
|
||||
'
|
||||
Me.BarButtonItem3.Caption = "Edit"
|
||||
Me.BarButtonItem3.Id = 5
|
||||
Me.BarButtonItem3.Name = "BarButtonItem3"
|
||||
'
|
||||
'RibbonPage1
|
||||
'
|
||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1})
|
||||
@ -93,6 +106,7 @@ Partial Class frmImportMain
|
||||
'
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem1)
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem2)
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem3)
|
||||
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
|
||||
Me.RibbonPageGroup1.Text = "RibbonPageGroup1"
|
||||
'
|
||||
@ -203,12 +217,6 @@ Partial Class frmImportMain
|
||||
UnboundSourceProperty1.Name = "Property0"
|
||||
Me.UnboundSource1.Properties.Add(UnboundSourceProperty1)
|
||||
'
|
||||
'BarButtonItem2
|
||||
'
|
||||
Me.BarButtonItem2.Caption = "Export"
|
||||
Me.BarButtonItem2.Id = 4
|
||||
Me.BarButtonItem2.Name = "BarButtonItem2"
|
||||
'
|
||||
'frmImportMain
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@ -256,4 +264,5 @@ Partial Class frmImportMain
|
||||
Friend WithEvents GridColumn3 As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents UnboundSource1 As DevExpress.Data.UnboundSource
|
||||
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem
|
||||
End Class
|
||||
|
||||
@ -90,24 +90,28 @@ Public Class frmImportMain
|
||||
For Each oTable In pSchema.Tables
|
||||
If oTableCounter = 0 Then
|
||||
Dim oGrid = GridLoader.GetGridFromElement(oTable)
|
||||
AddHandler oGrid.DoubleClick, AddressOf Grid_DoubleClick
|
||||
SplitContainerControl3.Panel1.Controls.Add(oGrid)
|
||||
oGrids.Add(oGrid)
|
||||
End If
|
||||
|
||||
If oTableCounter = 1 Then
|
||||
Dim oGrid = GridLoader.GetGridFromElement(oTable)
|
||||
AddHandler oGrid.DoubleClick, AddressOf Grid_DoubleClick
|
||||
SplitContainerControl3.Panel2.Controls.Add(oGrid)
|
||||
oGrids.Add(oGrid)
|
||||
End If
|
||||
|
||||
If oTableCounter = 2 Then
|
||||
Dim oGrid = GridLoader.GetGridFromElement(oTable)
|
||||
AddHandler oGrid.DoubleClick, AddressOf Grid_DoubleClick
|
||||
SplitContainerControl4.Panel1.Controls.Add(oGrid)
|
||||
oGrids.Add(oGrid)
|
||||
End If
|
||||
|
||||
If oTableCounter = 3 Then
|
||||
Dim oGrid = GridLoader.GetGridFromElement(oTable)
|
||||
AddHandler oGrid.DoubleClick, AddressOf Grid_DoubleClick
|
||||
SplitContainerControl4.Panel2.Controls.Add(oGrid)
|
||||
oGrids.Add(oGrid)
|
||||
End If
|
||||
@ -126,6 +130,15 @@ Public Class frmImportMain
|
||||
Return oGrids
|
||||
End Function
|
||||
|
||||
Private Sub Grid_DoubleClick(sender As Object, e As EventArgs)
|
||||
Dim oGrid As GridControl = DirectCast(sender, GridControl)
|
||||
Dim oView As GridView = DirectCast(oGrid.FocusedView, GridView)
|
||||
Dim oRow As DataRow = oView.GetDataRow(oView.FocusedRowHandle)
|
||||
Dim oColumns = oView.Columns.Select(Function(c) c.FieldName).ToList()
|
||||
|
||||
Dim oForm As New frmRowEditor(oRow, oColumns)
|
||||
oForm.Showdialog()
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
|
||||
If DocumentLoader.LoadFiles(ConfigManager.Config.InputDirectory) Then
|
||||
|
||||
150
EDIDocumentImport/frmRowEditor.Designer.vb
generated
Normal file
150
EDIDocumentImport/frmRowEditor.Designer.vb
generated
Normal file
@ -0,0 +1,150 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class frmRowEditor
|
||||
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
|
||||
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
||||
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.GridControl1 = New DevExpress.XtraGrid.GridControl()
|
||||
Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
Me.KEY = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
Me.VALUE = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'RibbonControl1
|
||||
'
|
||||
Me.RibbonControl1.CommandLayout = DevExpress.XtraBars.Ribbon.CommandLayout.Simplified
|
||||
Me.RibbonControl1.ExpandCollapseItem.Id = 0
|
||||
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1})
|
||||
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.RibbonControl1.MaxItemId = 2
|
||||
Me.RibbonControl1.Name = "RibbonControl1"
|
||||
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
|
||||
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
|
||||
Me.RibbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide
|
||||
Me.RibbonControl1.Size = New System.Drawing.Size(914, 63)
|
||||
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
|
||||
'
|
||||
'BarButtonItem1
|
||||
'
|
||||
Me.BarButtonItem1.Caption = "Save"
|
||||
Me.BarButtonItem1.Id = 1
|
||||
Me.BarButtonItem1.Name = "BarButtonItem1"
|
||||
'
|
||||
'RibbonPage1
|
||||
'
|
||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1})
|
||||
Me.RibbonPage1.Name = "RibbonPage1"
|
||||
Me.RibbonPage1.Text = "RibbonPage1"
|
||||
'
|
||||
'RibbonPageGroup1
|
||||
'
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem1)
|
||||
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
|
||||
Me.RibbonPageGroup1.Text = "RibbonPageGroup1"
|
||||
'
|
||||
'RibbonStatusBar1
|
||||
'
|
||||
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 589)
|
||||
Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
|
||||
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
|
||||
Me.RibbonStatusBar1.Size = New System.Drawing.Size(914, 24)
|
||||
'
|
||||
'RibbonPage2
|
||||
'
|
||||
Me.RibbonPage2.Name = "RibbonPage2"
|
||||
Me.RibbonPage2.Text = "RibbonPage2"
|
||||
'
|
||||
'GridControl1
|
||||
'
|
||||
Me.GridControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GridControl1.Location = New System.Drawing.Point(0, 63)
|
||||
Me.GridControl1.MainView = Me.GridView1
|
||||
Me.GridControl1.MenuManager = Me.RibbonControl1
|
||||
Me.GridControl1.Name = "GridControl1"
|
||||
Me.GridControl1.Size = New System.Drawing.Size(914, 526)
|
||||
Me.GridControl1.TabIndex = 8
|
||||
Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1})
|
||||
'
|
||||
'GridView1
|
||||
'
|
||||
Me.GridView1.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.KEY, Me.VALUE})
|
||||
Me.GridView1.GridControl = Me.GridControl1
|
||||
Me.GridView1.Name = "GridView1"
|
||||
'
|
||||
'KEY
|
||||
'
|
||||
Me.KEY.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
|
||||
Me.KEY.AppearanceCell.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.KEY.AppearanceCell.Options.UseBackColor = True
|
||||
Me.KEY.AppearanceCell.Options.UseFont = True
|
||||
Me.KEY.Caption = "KEY"
|
||||
Me.KEY.FieldName = "KEY"
|
||||
Me.KEY.Name = "KEY"
|
||||
Me.KEY.OptionsColumn.AllowEdit = False
|
||||
Me.KEY.OptionsColumn.ReadOnly = True
|
||||
Me.KEY.Visible = True
|
||||
Me.KEY.VisibleIndex = 0
|
||||
'
|
||||
'VALUE
|
||||
'
|
||||
Me.VALUE.Caption = "VALUE"
|
||||
Me.VALUE.FieldName = "VALUE"
|
||||
Me.VALUE.Name = "VALUE"
|
||||
Me.VALUE.Visible = True
|
||||
Me.VALUE.VisibleIndex = 1
|
||||
'
|
||||
'frmRowEditor
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(914, 613)
|
||||
Me.Controls.Add(Me.GridControl1)
|
||||
Me.Controls.Add(Me.RibbonStatusBar1)
|
||||
Me.Controls.Add(Me.RibbonControl1)
|
||||
Me.Name = "frmRowEditor"
|
||||
Me.Ribbon = Me.RibbonControl1
|
||||
Me.StatusBar = Me.RibbonStatusBar1
|
||||
Me.Text = "frmRowEditor"
|
||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl
|
||||
Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage
|
||||
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar
|
||||
Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage
|
||||
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents GridControl1 As DevExpress.XtraGrid.GridControl
|
||||
Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView
|
||||
Friend WithEvents KEY As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents VALUE As DevExpress.XtraGrid.Columns.GridColumn
|
||||
End Class
|
||||
120
EDIDocumentImport/frmRowEditor.resx
Normal file
120
EDIDocumentImport/frmRowEditor.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
52
EDIDocumentImport/frmRowEditor.vb
Normal file
52
EDIDocumentImport/frmRowEditor.vb
Normal file
@ -0,0 +1,52 @@
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraVerticalGrid.Rows
|
||||
Imports ImporterShared.Documents
|
||||
|
||||
Public Class frmRowEditor
|
||||
Private Row As DataRow
|
||||
Private Columns As List(Of String)
|
||||
|
||||
Public Sub New(pRow As DataRow, pColumns As List(Of String))
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
Row = pRow
|
||||
Columns = pColumns
|
||||
End Sub
|
||||
|
||||
Private Sub frmRowEditor_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Row Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oDataTable As New DataTable()
|
||||
Dim oDict = New Dictionary(Of String, String)
|
||||
|
||||
For Each oColumn As String In Columns
|
||||
Dim oValue
|
||||
Try
|
||||
oValue = Row.Item(oColumn)
|
||||
Catch ex As Exception
|
||||
oValue = String.Empty
|
||||
End Try
|
||||
|
||||
oDict.Add(oColumn, oValue)
|
||||
Next
|
||||
|
||||
oDataTable.Columns.Add("KEY")
|
||||
oDataTable.Columns.Add("VALUE")
|
||||
|
||||
For Each oKV In oDict
|
||||
oDataTable.Rows.Add(oKV.Key, oKV.Value)
|
||||
Next
|
||||
|
||||
GridControl1.DataSource = oDataTable
|
||||
GridView1.BestFitColumns()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user