From 5a8440ff05906e621d61ff6c85310439c141bec3 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 28 Jan 2022 12:05:41 +0100 Subject: [PATCH] Allow delete of config, add F5 for loading data in windows --- MultiTool.Form/DS_DD_ECM.Designer.vb | 1 + MultiTool.Form/DS_DD_ECM.xsd | 20 +-- MultiTool.Form/MultiTool.Form.vbproj | 3 + .../My Project/Resources.Designer.vb | 20 +++ MultiTool.Form/My Project/Resources.resx | 38 +++--- .../Resources/actions_addcircled.svg | 15 +++ .../Resources/actions_deletecircled1.svg | 15 +++ MultiTool.Form/frmConfig.Designer.vb | 114 ++++++++++-------- MultiTool.Form/frmConfig.resx | 15 ++- MultiTool.Form/frmConfig.vb | 61 +++++++++- MultiTool.Form/frmExportMain.Designer.vb | 54 ++++----- MultiTool.Form/frmExportMain.resx | 3 + MultiTool.Form/frmExportMain.vb | 6 + MultiTool.Form/frmImportMain.Designer.vb | 1 + MultiTool.Form/frmImportMain.resx | 2 +- MultiTool.Form/frmImportMain.vb | 70 ++++++----- MultiTool.Form/frmMain.Designer.vb | 37 ++---- MultiTool.Form/frmMain.vb | 7 ++ 18 files changed, 316 insertions(+), 166 deletions(-) create mode 100644 MultiTool.Form/Resources/actions_addcircled.svg create mode 100644 MultiTool.Form/Resources/actions_deletecircled1.svg diff --git a/MultiTool.Form/DS_DD_ECM.Designer.vb b/MultiTool.Form/DS_DD_ECM.Designer.vb index de9df58..0133e62 100644 --- a/MultiTool.Form/DS_DD_ECM.Designer.vb +++ b/MultiTool.Form/DS_DD_ECM.Designer.vb @@ -2377,6 +2377,7 @@ Partial Public Class DS_DD_ECM Me.columnADDED_WHO.MaxLength = 50 Me.columnCHANGED_WHO.MaxLength = 50 Me.columnACTIVE.AllowDBNull = false + Me.columnACTIVE.DefaultValue = CType(false,Boolean) Me.columnCOMMENT.MaxLength = 100 End Sub diff --git a/MultiTool.Form/DS_DD_ECM.xsd b/MultiTool.Form/DS_DD_ECM.xsd index d5dfa5e..006ee90 100644 --- a/MultiTool.Form/DS_DD_ECM.xsd +++ b/MultiTool.Form/DS_DD_ECM.xsd @@ -381,7 +381,7 @@ WHERE (GUID = @Original_GUID) - + @@ -426,7 +426,7 @@ WHERE (GUID = @Original_GUID) - + @@ -440,7 +440,7 @@ WHERE (GUID = @Original_GUID) - + @@ -461,7 +461,7 @@ WHERE (GUID = @Original_GUID) - + @@ -477,7 +477,7 @@ WHERE (GUID = @Original_GUID) - + @@ -505,7 +505,7 @@ WHERE (GUID = @Original_GUID) - + @@ -539,7 +539,7 @@ WHERE (GUID = @Original_GUID) - + @@ -580,9 +580,9 @@ WHERE (GUID = @Original_GUID) - - - + + + \ No newline at end of file diff --git a/MultiTool.Form/MultiTool.Form.vbproj b/MultiTool.Form/MultiTool.Form.vbproj index 27ee0f2..57b5487 100644 --- a/MultiTool.Form/MultiTool.Form.vbproj +++ b/MultiTool.Form/MultiTool.Form.vbproj @@ -297,6 +297,7 @@ frmConfig.vb + Designer My.Resources @@ -337,6 +338,8 @@ + + diff --git a/MultiTool.Form/My Project/Resources.Designer.vb b/MultiTool.Form/My Project/Resources.Designer.vb index 444de6f..8bc635f 100644 --- a/MultiTool.Form/My Project/Resources.Designer.vb +++ b/MultiTool.Form/My Project/Resources.Designer.vb @@ -70,6 +70,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property actions_addcircled() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("actions_addcircled", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. ''' @@ -120,6 +130,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property actions_deletecircled1() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("actions_deletecircled1", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. ''' diff --git a/MultiTool.Form/My Project/Resources.resx b/MultiTool.Form/My Project/Resources.resx index f003383..8ee522a 100644 --- a/MultiTool.Form/My Project/Resources.resx +++ b/MultiTool.Form/My Project/Resources.resx @@ -124,6 +124,9 @@ ..\Resources\mailmergepreview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\squarified1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\redo.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -175,8 +178,8 @@ ..\Resources\exporttopdf.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\actions_reload.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\actions_checkcircled1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\open21.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -187,24 +190,24 @@ ..\Resources\bo_product.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\open3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - ..\Resources\paymentrefund.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\rotatecounterclockwise.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\actions_deletecircled.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\support.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\bo_unknown.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\charthorizontalaxis_logscale.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\actions_arrow4down.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - ..\Resources\deletetablerows.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -232,8 +235,8 @@ ..\Resources\bo_validation.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\rotatecounterclockwise.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\actions_reload.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\actions_send2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -241,8 +244,8 @@ ..\Resources\open27.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\actions_checkcircled1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\actions_arrow4down.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\open2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -265,8 +268,8 @@ ..\Resources\icon_export.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\support.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\open3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\save.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -295,13 +298,16 @@ ..\Resources\actions_send.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\actions_addcircled.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\resetview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\itemtypechecked.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\squarified1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\actions_deletecircled1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a \ No newline at end of file diff --git a/MultiTool.Form/Resources/actions_addcircled.svg b/MultiTool.Form/Resources/actions_addcircled.svg new file mode 100644 index 0000000..0c97b24 --- /dev/null +++ b/MultiTool.Form/Resources/actions_addcircled.svg @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/MultiTool.Form/Resources/actions_deletecircled1.svg b/MultiTool.Form/Resources/actions_deletecircled1.svg new file mode 100644 index 0000000..d8c9bb3 --- /dev/null +++ b/MultiTool.Form/Resources/actions_deletecircled1.svg @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/MultiTool.Form/frmConfig.Designer.vb b/MultiTool.Form/frmConfig.Designer.vb index 75bcdce..57f3415 100644 --- a/MultiTool.Form/frmConfig.Designer.vb +++ b/MultiTool.Form/frmConfig.Designer.vb @@ -27,10 +27,10 @@ Partial Class frmConfig Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfig)) Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl() Me.tabPageSchema = New DevExpress.XtraTab.XtraTabPage() - Me.GridControl1 = New DevExpress.XtraGrid.GridControl() + Me.GridSchema = New DevExpress.XtraGrid.GridControl() Me.TBEDIXMLITEMSBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.DS_DD_ECM = New MultiTool.Form.DS_DD_ECM() - Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.GridViewSchema = New DevExpress.XtraGrid.Views.Grid.GridView() Me.colGUID = New DevExpress.XtraGrid.Columns.GridColumn() Me.colXML_NAME = New DevExpress.XtraGrid.Columns.GridColumn() Me.colXML_TYPE_ID = New DevExpress.XtraGrid.Columns.GridColumn() @@ -47,9 +47,9 @@ Partial Class frmConfig Me.colCHANGED_WHO1 = New DevExpress.XtraGrid.Columns.GridColumn() Me.colCHANGED_WHEN1 = New DevExpress.XtraGrid.Columns.GridColumn() Me.tabPageConfig = New DevExpress.XtraTab.XtraTabPage() - Me.GridControl2 = New DevExpress.XtraGrid.GridControl() + Me.GridConfig = New DevExpress.XtraGrid.GridControl() Me.TBEDI_XML_CONFIGBindingSource = New System.Windows.Forms.BindingSource(Me.components) - Me.GridView2 = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.GridViewConfig = New DevExpress.XtraGrid.Views.Grid.GridView() Me.colGUID1 = New DevExpress.XtraGrid.Columns.GridColumn() Me.colKEY = New DevExpress.XtraGrid.Columns.GridColumn() Me.colVALUE = New DevExpress.XtraGrid.Columns.GridColumn() @@ -62,6 +62,8 @@ Partial Class frmConfig Me.colTEMPLATE_ID = New DevExpress.XtraGrid.Columns.GridColumn() Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() 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.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() @@ -72,14 +74,14 @@ Partial Class frmConfig CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.XtraTabControl1.SuspendLayout() Me.tabPageSchema.SuspendLayout() - CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridSchema, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TBEDIXMLITEMSBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.DS_DD_ECM, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridViewSchema, System.ComponentModel.ISupportInitialize).BeginInit() Me.tabPageConfig.SuspendLayout() - CType(Me.GridControl2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridConfig, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TBEDI_XML_CONFIGBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.GridView2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridViewConfig, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' @@ -95,21 +97,21 @@ Partial Class frmConfig ' 'tabPageSchema ' - Me.tabPageSchema.Controls.Add(Me.GridControl1) + Me.tabPageSchema.Controls.Add(Me.GridSchema) Me.tabPageSchema.Name = "tabPageSchema" Me.tabPageSchema.Size = New System.Drawing.Size(1091, 546) Me.tabPageSchema.Text = "Schema" ' - 'GridControl1 + 'GridSchema ' - Me.GridControl1.DataSource = Me.TBEDIXMLITEMSBindingSource - Me.GridControl1.Dock = System.Windows.Forms.DockStyle.Fill - Me.GridControl1.Location = New System.Drawing.Point(0, 0) - Me.GridControl1.MainView = Me.GridView1 - Me.GridControl1.Name = "GridControl1" - Me.GridControl1.Size = New System.Drawing.Size(1091, 546) - Me.GridControl1.TabIndex = 0 - Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1}) + Me.GridSchema.DataSource = Me.TBEDIXMLITEMSBindingSource + Me.GridSchema.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridSchema.Location = New System.Drawing.Point(0, 0) + Me.GridSchema.MainView = Me.GridViewSchema + Me.GridSchema.Name = "GridSchema" + Me.GridSchema.Size = New System.Drawing.Size(1091, 546) + Me.GridSchema.TabIndex = 0 + Me.GridSchema.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridViewSchema}) ' 'TBEDIXMLITEMSBindingSource ' @@ -121,11 +123,11 @@ Partial Class frmConfig Me.DS_DD_ECM.DataSetName = "DS_DD_ECM" Me.DS_DD_ECM.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema ' - 'GridView1 + 'GridViewSchema ' - Me.GridView1.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colGUID, Me.colXML_NAME, Me.colXML_TYPE_ID, Me.colIS_READ_ONLY, Me.colIS_VISIBLE, Me.colORDER_KEY, Me.colIS_REQUIRED, Me.colIS_VIRTUAL, Me.colFUNCTION_ID, Me.colFUNCTION_PARAMETERS, Me.colXML_TABLE_ID, Me.colADDED_WHO1, Me.colADDED_WHEN1, Me.colCHANGED_WHO1, Me.colCHANGED_WHEN1}) - Me.GridView1.GridControl = Me.GridControl1 - Me.GridView1.Name = "GridView1" + Me.GridViewSchema.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colGUID, Me.colXML_NAME, Me.colXML_TYPE_ID, Me.colIS_READ_ONLY, Me.colIS_VISIBLE, Me.colORDER_KEY, Me.colIS_REQUIRED, Me.colIS_VIRTUAL, Me.colFUNCTION_ID, Me.colFUNCTION_PARAMETERS, Me.colXML_TABLE_ID, Me.colADDED_WHO1, Me.colADDED_WHEN1, Me.colCHANGED_WHO1, Me.colCHANGED_WHEN1}) + Me.GridViewSchema.GridControl = Me.GridSchema + Me.GridViewSchema.Name = "GridViewSchema" ' 'colGUID ' @@ -246,33 +248,33 @@ Partial Class frmConfig ' 'tabPageConfig ' - Me.tabPageConfig.Controls.Add(Me.GridControl2) + Me.tabPageConfig.Controls.Add(Me.GridConfig) Me.tabPageConfig.Name = "tabPageConfig" Me.tabPageConfig.Size = New System.Drawing.Size(1091, 546) Me.tabPageConfig.Text = "Konfiguration" ' - 'GridControl2 + 'GridConfig ' - Me.GridControl2.DataSource = Me.TBEDI_XML_CONFIGBindingSource - Me.GridControl2.Dock = System.Windows.Forms.DockStyle.Fill - Me.GridControl2.Location = New System.Drawing.Point(0, 0) - Me.GridControl2.MainView = Me.GridView2 - Me.GridControl2.MenuManager = Me.RibbonControl1 - Me.GridControl2.Name = "GridControl2" - Me.GridControl2.Size = New System.Drawing.Size(1091, 546) - Me.GridControl2.TabIndex = 0 - Me.GridControl2.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView2}) + Me.GridConfig.DataSource = Me.TBEDI_XML_CONFIGBindingSource + Me.GridConfig.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridConfig.Location = New System.Drawing.Point(0, 0) + Me.GridConfig.MainView = Me.GridViewConfig + Me.GridConfig.MenuManager = Me.RibbonControl1 + Me.GridConfig.Name = "GridConfig" + Me.GridConfig.Size = New System.Drawing.Size(1091, 546) + Me.GridConfig.TabIndex = 0 + Me.GridConfig.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridViewConfig}) ' 'TBEDI_XML_CONFIGBindingSource ' Me.TBEDI_XML_CONFIGBindingSource.DataMember = "TBEDI_XML_CONFIG" Me.TBEDI_XML_CONFIGBindingSource.DataSource = Me.DS_DD_ECM ' - 'GridView2 + 'GridViewConfig ' - Me.GridView2.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colGUID1, Me.colKEY, Me.colVALUE, Me.colADDED_WHO, Me.colADDED_WHEN, Me.colCHANGED_WHO, Me.colCHANGED_WHEN, Me.colCOMMENT, Me.colACTIVE, Me.colTEMPLATE_ID}) - Me.GridView2.GridControl = Me.GridControl2 - Me.GridView2.Name = "GridView2" + Me.GridViewConfig.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colGUID1, Me.colKEY, Me.colVALUE, Me.colADDED_WHO, Me.colADDED_WHEN, Me.colCHANGED_WHO, Me.colCHANGED_WHEN, Me.colCOMMENT, Me.colACTIVE, Me.colTEMPLATE_ID}) + Me.GridViewConfig.GridControl = Me.GridConfig + Me.GridViewConfig.Name = "GridViewConfig" ' 'colGUID1 ' @@ -343,9 +345,9 @@ Partial Class frmConfig ' 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.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1, Me.BarButtonItem2, Me.BarButtonItem3}) Me.RibbonControl1.Location = New System.Drawing.Point(0, 0) - Me.RibbonControl1.MaxItemId = 2 + Me.RibbonControl1.MaxItemId = 4 Me.RibbonControl1.Name = "RibbonControl1" Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] @@ -362,6 +364,20 @@ Partial Class frmConfig Me.BarButtonItem1.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.BarButtonItem1.Name = "BarButtonItem1" ' + 'BarButtonItem2 + ' + Me.BarButtonItem2.Caption = "Neuer Eintrag" + Me.BarButtonItem2.Id = 2 + Me.BarButtonItem2.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.actions_addcircled + Me.BarButtonItem2.Name = "BarButtonItem2" + ' + 'BarButtonItem3 + ' + Me.BarButtonItem3.Caption = "Eintrag löschen" + Me.BarButtonItem3.Id = 3 + Me.BarButtonItem3.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.actions_deletecircled1 + Me.BarButtonItem3.Name = "BarButtonItem3" + ' 'RibbonPage1 ' Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1}) @@ -370,7 +386,9 @@ Partial Class frmConfig ' 'RibbonPageGroup1 ' + Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem2) Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem1) + Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem3) Me.RibbonPageGroup1.Name = "RibbonPageGroup1" Me.RibbonPageGroup1.Text = "RibbonPageGroup1" ' @@ -421,14 +439,14 @@ Partial Class frmConfig CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).EndInit() Me.XtraTabControl1.ResumeLayout(False) Me.tabPageSchema.ResumeLayout(False) - CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridSchema, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TBEDIXMLITEMSBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.DS_DD_ECM, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridViewSchema, System.ComponentModel.ISupportInitialize).EndInit() Me.tabPageConfig.ResumeLayout(False) - CType(Me.GridControl2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridConfig, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TBEDI_XML_CONFIGBindingSource, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.GridView2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridViewConfig, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -442,8 +460,8 @@ Partial Class frmConfig Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem Friend WithEvents tabPageSchema As XtraTabPage - Friend WithEvents GridControl1 As DevExpress.XtraGrid.GridControl - Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents GridSchema As DevExpress.XtraGrid.GridControl + Friend WithEvents GridViewSchema As DevExpress.XtraGrid.Views.Grid.GridView Friend WithEvents DS_DD_ECM As DS_DD_ECM Friend WithEvents TBEDIXMLITEMSBindingSource As BindingSource Friend WithEvents TBEDI_XML_TEMPLATE_ITEMSTableAdapter As DS_DD_ECMTableAdapters.TBEDI_XML_TEMPLATE_ITEMSTableAdapter @@ -451,8 +469,8 @@ Partial Class frmConfig Friend WithEvents TBEDI_XML_CONFIGTableAdapter As DS_DD_ECMTableAdapters.TBEDI_XML_CONFIGTableAdapter Friend WithEvents TableAdapterManager As DS_DD_ECMTableAdapters.TableAdapterManager Friend WithEvents tabPageConfig As XtraTabPage - Friend WithEvents GridControl2 As DevExpress.XtraGrid.GridControl - Friend WithEvents GridView2 As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents GridConfig As DevExpress.XtraGrid.GridControl + Friend WithEvents GridViewConfig As DevExpress.XtraGrid.Views.Grid.GridView Friend WithEvents colGUID1 As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents colKEY As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents colVALUE As DevExpress.XtraGrid.Columns.GridColumn @@ -478,4 +496,6 @@ Partial Class frmConfig Friend WithEvents colCOMMENT As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents colACTIVE As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents colTEMPLATE_ID As DevExpress.XtraGrid.Columns.GridColumn + Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem End Class diff --git a/MultiTool.Form/frmConfig.resx b/MultiTool.Form/frmConfig.resx index 43a5a5d..bf6aef8 100644 --- a/MultiTool.Form/frmConfig.resx +++ b/MultiTool.Form/frmConfig.resx @@ -117,12 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 313, 17 - - - 194, 17 - 758, 17 @@ -143,6 +137,15 @@ IC8+DQo8L3N2Zz4L + + 313, 17 + + + 194, 17 + + + 194, 17 + 533, 17 diff --git a/MultiTool.Form/frmConfig.vb b/MultiTool.Form/frmConfig.vb index aaea886..8a5452d 100644 --- a/MultiTool.Form/frmConfig.vb +++ b/MultiTool.Form/frmConfig.vb @@ -1,4 +1,6 @@ Imports System.Data.SqlClient +Imports DevExpress.XtraGrid +Imports DevExpress.XtraGrid.Views.Grid Imports DigitalData.Modules.Config Imports DigitalData.Modules.Database Imports DigitalData.Modules.Logging @@ -7,6 +9,11 @@ Public Class frmConfig Private ReadOnly ConfigManager As ConfigManager(Of MultiTool.Shared.Config) Private ReadOnly FormHelper As FormHelper + Private BindingSource As BindingSource = TBEDIXMLITEMSBindingSource + Private TableAdapter = TBEDI_XML_TEMPLATE_ITEMSTableAdapter + Private View As GridView = GridViewSchema + Private AddingNew As Boolean = False + Private ReadOnly Property Config As MultiTool.Shared.Config Get Return ConfigManager?.Config @@ -29,23 +36,67 @@ Public Class frmConfig .InitialCatalog = "DD_ECM" } + ' Default Values + DS_DD_ECM.TBEDI_XML_CONFIG.ADDED_WHOColumn.DefaultValue = Environment.UserName + DS_DD_ECM.TBEDI_XML_CONFIG.CHANGED_WHOColumn.DefaultValue = Environment.UserName + DS_DD_ECM.TBEDI_XML_TEMPLATE_ITEMS.ADDED_WHOColumn.DefaultValue = Environment.UserName + DS_DD_ECM.TBEDI_XML_TEMPLATE_ITEMS.CHANGED_WHOColumn.DefaultValue = Environment.UserName + TBEDI_XML_TEMPLATE_ITEMSTableAdapter.Connection.ConnectionString = oBuilder.ToString() - TBEDI_XML_TEMPLATE_ITEMSTableAdapter.Fill(Me.DS_DD_ECM.TBEDI_XML_TEMPLATE_ITEMS) + TBEDI_XML_TEMPLATE_ITEMSTableAdapter.Fill(DS_DD_ECM.TBEDI_XML_TEMPLATE_ITEMS) TBEDI_XML_CONFIGTableAdapter.Connection.ConnectionString = oBuilder.ToString() - TBEDI_XML_CONFIGTableAdapter.Fill(Me.DS_DD_ECM.TBEDI_XML_CONFIG) + TBEDI_XML_CONFIGTableAdapter.Fill(DS_DD_ECM.TBEDI_XML_CONFIG) + End Sub + + Private Sub Save() + TBEDI_XML_CONFIGTableAdapter.Update(DS_DD_ECM.TBEDI_XML_CONFIG) + DS_DD_ECM.TBEDI_XML_CONFIG.AcceptChanges() + + TBEDI_XML_TEMPLATE_ITEMSTableAdapter.Update(DS_DD_ECM.TBEDI_XML_TEMPLATE_ITEMS) + DS_DD_ECM.TBEDI_XML_TEMPLATE_ITEMS.AcceptChanges() End Sub Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick Try TBEDI_XML_CONFIGBindingSource.EndEdit() - TBEDI_XML_CONFIGTableAdapter.Update(DS_DD_ECM.TBEDI_XML_CONFIG) - TBEDIXMLITEMSBindingSource.EndEdit() - TBEDI_XML_TEMPLATE_ITEMSTableAdapter.Update(DS_DD_ECM.TBEDI_XML_TEMPLATE_ITEMS) + + Save() Catch ex As Exception FormHelper.ShowError(ex, "Speichern der Konfiguration") End Try + End Sub + + Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick + BindingSource.AddNew() + End Sub + + Private Sub XtraTabControl1_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles XtraTabControl1.SelectedPageChanged + Select Case e.Page.Name + Case tabPageSchema.Name + BindingSource = TBEDIXMLITEMSBindingSource + View = GridViewSchema + + Case tabPageConfig.Name + BindingSource = TBEDI_XML_CONFIGBindingSource + View = GridViewConfig + + End Select + End Sub + + Private Sub BarButtonItem3_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem3.ItemClick + If View.FocusedRowHandle <> GridControl.InvalidRowHandle Then + Dim oResult = MsgBox("Wollen Sie den ausgewählten Eintrag löschen?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, "Eintrag löschen?") + + If oResult = MsgBoxResult.Yes Then + Dim oRow As DataRow = View.GetDataRow(View.FocusedRowHandle) + BindingSource.RemoveCurrent() + BindingSource.EndEdit() + + Save() + End If + End If End Sub End Class \ No newline at end of file diff --git a/MultiTool.Form/frmExportMain.Designer.vb b/MultiTool.Form/frmExportMain.Designer.vb index c1c1391..11d55e4 100644 --- a/MultiTool.Form/frmExportMain.Designer.vb +++ b/MultiTool.Form/frmExportMain.Designer.vb @@ -71,6 +71,8 @@ Partial Class frmExportMain Me.txtDocumentFrom = New DevExpress.XtraEditors.TextEdit() Me.txtDocumentTo = New DevExpress.XtraEditors.TextEdit() Me.dateDocDateTo = New DevExpress.XtraEditors.DateEdit() + Me.comboDocumentType = New DevExpress.XtraEditors.GridLookUpEdit() + Me.GridView3 = New DevExpress.XtraGrid.Views.Grid.GridView() Me.Root = New DevExpress.XtraLayout.LayoutControlGroup() Me.LayoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem() Me.EmptySpaceItem1 = New DevExpress.XtraLayout.EmptySpaceItem() @@ -86,8 +88,6 @@ Partial Class frmExportMain Me.colName2 = New DevExpress.XtraGrid.Columns.GridColumn() Me.colId2 = New DevExpress.XtraGrid.Columns.GridColumn() Me.SplashScreenManager = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.MultiTool.Form.frmWaitForm), True, True) - Me.comboDocumentType = New DevExpress.XtraEditors.GridLookUpEdit() - Me.GridView3 = New DevExpress.XtraGrid.Views.Grid.GridView() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridControlDocuments, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridViewDocuments, System.ComponentModel.ISupportInitialize).BeginInit() @@ -116,6 +116,8 @@ Partial Class frmExportMain CType(Me.txtDocumentTo.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.dateDocDateTo.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.dateDocDateTo.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.comboDocumentType.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridView3, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -127,8 +129,6 @@ Partial Class frmExportMain CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem9, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.comboDocumentType.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.GridView3, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'RibbonControl1 @@ -147,7 +147,7 @@ Partial Class frmExportMain ' 'BarButtonItem1 ' - Me.BarButtonItem1.Caption = "Daten laden" + Me.BarButtonItem1.Caption = "Daten laden (F5)" Me.BarButtonItem1.Id = 3 Me.BarButtonItem1.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.icon_export Me.BarButtonItem1.Name = "BarButtonItem1" @@ -580,6 +580,26 @@ Partial Class frmExportMain Me.dateDocDateTo.StyleController = Me.LayoutControl1 Me.dateDocDateTo.TabIndex = 12 ' + 'comboDocumentType + ' + Me.comboDocumentType.Location = New System.Drawing.Point(104, 75) + Me.comboDocumentType.MenuManager = Me.RibbonControl1 + Me.comboDocumentType.Name = "comboDocumentType" + Me.comboDocumentType.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo), New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Clear)}) + Me.comboDocumentType.Properties.NullText = "" + Me.comboDocumentType.Properties.PopupSizeable = False + Me.comboDocumentType.Properties.PopupView = Me.GridView3 + Me.comboDocumentType.Size = New System.Drawing.Size(179, 20) + Me.comboDocumentType.StyleController = Me.LayoutControl1 + Me.comboDocumentType.TabIndex = 13 + ' + 'GridView3 + ' + Me.GridView3.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus + Me.GridView3.Name = "GridView3" + Me.GridView3.OptionsSelection.EnableAppearanceFocusedCell = False + Me.GridView3.OptionsView.ShowGroupPanel = False + ' 'Root ' Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] @@ -718,26 +738,6 @@ Partial Class frmExportMain ' Me.SplashScreenManager.ClosingDelay = 500 ' - 'comboDocumentType - ' - Me.comboDocumentType.Location = New System.Drawing.Point(104, 75) - Me.comboDocumentType.MenuManager = Me.RibbonControl1 - Me.comboDocumentType.Name = "comboDocumentType" - Me.comboDocumentType.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo), New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Clear)}) - Me.comboDocumentType.Properties.NullText = "" - Me.comboDocumentType.Properties.PopupSizeable = False - Me.comboDocumentType.Properties.PopupView = Me.GridView3 - Me.comboDocumentType.Size = New System.Drawing.Size(179, 20) - Me.comboDocumentType.StyleController = Me.LayoutControl1 - Me.comboDocumentType.TabIndex = 13 - ' - 'GridView3 - ' - Me.GridView3.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus - Me.GridView3.Name = "GridView3" - Me.GridView3.OptionsSelection.EnableAppearanceFocusedCell = False - Me.GridView3.OptionsView.ShowGroupPanel = False - ' 'frmExportMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -781,6 +781,8 @@ Partial Class frmExportMain CType(Me.txtDocumentTo.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.dateDocDateTo.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.dateDocDateTo.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.comboDocumentType.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridView3, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).EndInit() @@ -792,8 +794,6 @@ Partial Class frmExportMain CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem9, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.comboDocumentType.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.GridView3, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() diff --git a/MultiTool.Form/frmExportMain.resx b/MultiTool.Form/frmExportMain.resx index 2876866..69735f0 100644 --- a/MultiTool.Form/frmExportMain.resx +++ b/MultiTool.Form/frmExportMain.resx @@ -120,6 +120,9 @@ 189, 17 + + 189, 17 + 87 diff --git a/MultiTool.Form/frmExportMain.vb b/MultiTool.Form/frmExportMain.vb index edbd731..2a4fb02 100644 --- a/MultiTool.Form/frmExportMain.vb +++ b/MultiTool.Form/frmExportMain.vb @@ -137,6 +137,12 @@ Public Class frmExportMain SearchDocuments() End Sub + Private Sub frmExportMain_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown + If e.KeyCode = Keys.F5 Then + SearchDocuments() + End If + End Sub + Private Sub WebService_Progress(sender As Object, e As String) SplashScreenManager.SetWaitFormDescription(e) End Sub diff --git a/MultiTool.Form/frmImportMain.Designer.vb b/MultiTool.Form/frmImportMain.Designer.vb index e96bf8b..9fbdca5 100644 --- a/MultiTool.Form/frmImportMain.Designer.vb +++ b/MultiTool.Form/frmImportMain.Designer.vb @@ -618,6 +618,7 @@ Partial Class frmImportMain Me.Controls.Add(Me.RibbonStatusBar) Me.Controls.Add(Me.RibbonControl) Me.IconOptions.SvgImage = CType(resources.GetObject("frmImportMain.IconOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.KeyPreview = True Me.Name = "frmImportMain" Me.Ribbon = Me.RibbonControl Me.StatusBar = Me.RibbonStatusBar diff --git a/MultiTool.Form/frmImportMain.resx b/MultiTool.Form/frmImportMain.resx index 9280066..23cb9c0 100644 --- a/MultiTool.Form/frmImportMain.resx +++ b/MultiTool.Form/frmImportMain.resx @@ -200,7 +200,7 @@ 0 Dateien geladen - Dateien einlesen + Dateien einlesen (F5) Aktuelle Datei übermitteln diff --git a/MultiTool.Form/frmImportMain.vb b/MultiTool.Form/frmImportMain.vb index c0b46cf..0dc767f 100644 --- a/MultiTool.Form/frmImportMain.vb +++ b/MultiTool.Form/frmImportMain.vb @@ -223,37 +223,13 @@ Public Class frmImportMain End Sub Private Sub btnLoadFiles_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnLoadFiles.ItemClick - Try - SplashScreenManager.ShowWaitForm() - SetDocumentButtonsEnabled(False) - GridControlFiles.Enabled = False - btnLoadFiles.Enabled = False - SplitContainerGrids.Enabled = False - - AddHandler DocumentLoader.FileLoadComplete, Sub(_sender As Object, _e As Documents.DocumentLoader.FileLoadInfo) - Dim oMessage = String.Format("Lade Dateien ({0}/{1})", _e.FilesLoaded, _e.FilesTotal) - SplashScreenManager.SetWaitFormDescription(oMessage) - End Sub - - If DocumentLoader.LoadFiles(CurrentTemplate, lookupMandator.EditValue) Then - GridControlFiles.DataSource = Nothing - GridControlFiles.DataSource = DocumentLoader.Files - - txtFilesLoaded.Caption = String.Format(My.Resources.frmImportMainExtra._0__Dateien_geladen, DocumentLoader.Files.Count) - End If - Catch ex As NoMandatorException - MsgBox(My.Resources.frmImportMainExtra.Es_konnte_kein_passender_Mandant_ermittelt_werden, MsgBoxStyle.Information, Text) - - Catch ex As Exception - FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Laden_der_Dokumente) + LoadFiles() + End Sub - Finally - SplitContainerGrids.Enabled = True - btnLoadFiles.Enabled = True - GridControlFiles.Enabled = True - SetDocumentButtonsEnabled(True) - SplashScreenManager.CloseWaitForm() - End Try + Private Sub frmImportMain_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown + If e.KeyCode = Keys.F5 Then + LoadFiles() + End If End Sub Private Sub btnReloadFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnReloadFile.ItemClick @@ -633,4 +609,38 @@ Public Class frmImportMain ' Export it to pdf oReport.ExportToPdf(oFilePath) End Sub + + Private Sub LoadFiles() + Try + SplashScreenManager.ShowWaitForm() + SetDocumentButtonsEnabled(False) + GridControlFiles.Enabled = False + btnLoadFiles.Enabled = False + SplitContainerGrids.Enabled = False + + AddHandler DocumentLoader.FileLoadComplete, Sub(_sender As Object, _e As Documents.DocumentLoader.FileLoadInfo) + Dim oMessage = String.Format("Lade Dateien ({0}/{1})", _e.FilesLoaded, _e.FilesTotal) + SplashScreenManager.SetWaitFormDescription(oMessage) + End Sub + + If DocumentLoader.LoadFiles(CurrentTemplate, lookupMandator.EditValue) Then + GridControlFiles.DataSource = Nothing + GridControlFiles.DataSource = DocumentLoader.Files + + txtFilesLoaded.Caption = String.Format(My.Resources.frmImportMainExtra._0__Dateien_geladen, DocumentLoader.Files.Count) + End If + Catch ex As NoMandatorException + MsgBox(My.Resources.frmImportMainExtra.Es_konnte_kein_passender_Mandant_ermittelt_werden, MsgBoxStyle.Information, Text) + + Catch ex As Exception + FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Laden_der_Dokumente) + + Finally + SplitContainerGrids.Enabled = True + btnLoadFiles.Enabled = True + GridControlFiles.Enabled = True + SetDocumentButtonsEnabled(True) + SplashScreenManager.CloseWaitForm() + End Try + End Sub End Class \ No newline at end of file diff --git a/MultiTool.Form/frmMain.Designer.vb b/MultiTool.Form/frmMain.Designer.vb index 5e7cab4..54ace01 100644 --- a/MultiTool.Form/frmMain.Designer.vb +++ b/MultiTool.Form/frmMain.Designer.vb @@ -29,14 +29,13 @@ Partial Class frmMain Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem() Me.txtVersion = New DevExpress.XtraBars.BarStaticItem() Me.txtCulture = New DevExpress.XtraBars.BarStaticItem() - Me.btnOpenInputDirectory = New DevExpress.XtraBars.BarButtonItem() - Me.btnOpenOutputDirectory = New DevExpress.XtraBars.BarButtonItem() Me.btnOpenSchemaDirectory = New DevExpress.XtraBars.BarButtonItem() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPage3 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RibbonPageGroup4 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.SvgImageCollection1 = New DevExpress.Utils.SvgImageCollection(Me.components) @@ -55,7 +54,7 @@ Partial Class frmMain 'RibbonControl1 ' Me.RibbonControl1.ExpandCollapseItem.Id = 0 - Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.btnOpenImportExportForm, Me.BarButtonItem1, Me.BarButtonItem4, Me.BarButtonItem2, Me.BarButtonItem3, Me.txtVersion, Me.txtCulture, Me.btnOpenInputDirectory, Me.btnOpenOutputDirectory, Me.btnOpenSchemaDirectory}) + Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.btnOpenImportExportForm, Me.BarButtonItem1, Me.BarButtonItem4, Me.BarButtonItem2, Me.BarButtonItem3, Me.txtVersion, Me.txtCulture, Me.btnOpenSchemaDirectory}) Me.RibbonControl1.Location = New System.Drawing.Point(0, 0) Me.RibbonControl1.MaxItemId = 13 Me.RibbonControl1.Name = "RibbonControl1" @@ -68,7 +67,7 @@ Partial Class frmMain ' 'btnOpenImportExportForm ' - Me.btnOpenImportExportForm.Caption = "Vorlage öffnen" + Me.btnOpenImportExportForm.Caption = "Vorlage öffnen (F5)" Me.btnOpenImportExportForm.Id = 1 Me.btnOpenImportExportForm.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.actions_checkcircled1 Me.btnOpenImportExportForm.Name = "btnOpenImportExportForm" @@ -117,20 +116,6 @@ Partial Class frmMain Me.txtCulture.Name = "txtCulture" Me.txtCulture.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph ' - 'btnOpenInputDirectory - ' - Me.btnOpenInputDirectory.Caption = "Eingangsverzeichnis öffnen" - Me.btnOpenInputDirectory.Id = 10 - Me.btnOpenInputDirectory.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.open24 - Me.btnOpenInputDirectory.Name = "btnOpenInputDirectory" - ' - 'btnOpenOutputDirectory - ' - Me.btnOpenOutputDirectory.Caption = "Ausgangsverzeichnis öffnen" - Me.btnOpenOutputDirectory.Id = 11 - Me.btnOpenOutputDirectory.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.open25 - Me.btnOpenOutputDirectory.Name = "btnOpenOutputDirectory" - ' 'btnOpenSchemaDirectory ' Me.btnOpenSchemaDirectory.Caption = "Vorlagenverzeichnis öffnen" @@ -159,21 +144,25 @@ Partial Class frmMain ' 'RibbonPage3 ' - Me.RibbonPage3.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup2}) + Me.RibbonPage3.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup2, Me.RibbonPageGroup4}) Me.RibbonPage3.Name = "RibbonPage3" Me.RibbonPage3.Text = "Erweitert" ' 'RibbonPageGroup2 ' Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem2) - Me.RibbonPageGroup2.ItemLinks.Add(Me.btnOpenInputDirectory) - Me.RibbonPageGroup2.ItemLinks.Add(Me.btnOpenOutputDirectory) Me.RibbonPageGroup2.ItemLinks.Add(Me.btnOpenSchemaDirectory) - Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem4) Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem3) Me.RibbonPageGroup2.Name = "RibbonPageGroup2" Me.RibbonPageGroup2.Text = "Verzeichnisse" ' + 'RibbonPageGroup4 + ' + Me.RibbonPageGroup4.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far + Me.RibbonPageGroup4.ItemLinks.Add(Me.BarButtonItem4) + Me.RibbonPageGroup4.Name = "RibbonPageGroup4" + Me.RibbonPageGroup4.Text = "Konfiguration" + ' 'RibbonStatusBar1 ' Me.RibbonStatusBar1.ItemLinks.Add(Me.txtVersion) @@ -247,6 +236,7 @@ Partial Class frmMain Me.Controls.Add(Me.RibbonStatusBar1) Me.Controls.Add(Me.RibbonControl1) Me.IconOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.squarified + Me.KeyPreview = True Me.Name = "frmMain" Me.Ribbon = Me.RibbonControl1 Me.StatusBar = Me.RibbonStatusBar1 @@ -281,7 +271,6 @@ Partial Class frmMain Friend WithEvents SplashScreenManager As DevExpress.XtraSplashScreen.SplashScreenManager Friend WithEvents txtVersion As DevExpress.XtraBars.BarStaticItem Friend WithEvents txtCulture As DevExpress.XtraBars.BarStaticItem - Friend WithEvents btnOpenInputDirectory As DevExpress.XtraBars.BarButtonItem - Friend WithEvents btnOpenOutputDirectory As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnOpenSchemaDirectory As DevExpress.XtraBars.BarButtonItem + Friend WithEvents RibbonPageGroup4 As DevExpress.XtraBars.Ribbon.RibbonPageGroup End Class diff --git a/MultiTool.Form/frmMain.vb b/MultiTool.Form/frmMain.vb index 82a801e..ba2418e 100644 --- a/MultiTool.Form/frmMain.vb +++ b/MultiTool.Form/frmMain.vb @@ -133,6 +133,13 @@ Public Class frmMain OpenImportExportForm(oTemplate) End Sub + Private Sub frmMain_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown + If e.KeyCode = Keys.F5 Then + Dim oTemplate As Template = GridViewTemplates.GetRow(GridViewTemplates.FocusedRowHandle) + OpenImportExportForm(oTemplate) + End If + End Sub + Private Function TryCreateTemplateDirectories(pDirectories As List(Of String)) As Boolean For Each oDirectory In pDirectories If Directory.Exists(oDirectory) = False Then