ZooFlow: Add wait form for frmIndex, move init logic of frmIndex into FormShown

This commit is contained in:
Jonathan Jenne 2021-12-14 16:26:13 +01:00
parent 55ef1c016d
commit b4181e3e0b
6 changed files with 265 additions and 26 deletions

View File

@ -59,6 +59,7 @@ Partial Class frmGlobix_Index
Me.cmbDocType = New DevExpress.XtraEditors.ComboBoxEdit()
Me.DocumentViewer1 = New DigitalData.Controls.DocumentViewer.DocumentViewer()
Me.GlobixDataset = New DigitalData.GUIs.ZooFlow.GlobixDataset()
Me.SplashScreenManager = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.DigitalData.GUIs.ZooFlow.frmWaitForm), True, True)
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerControl1.SuspendLayout()
@ -326,6 +327,10 @@ Partial Class frmGlobix_Index
Me.GlobixDataset.DataSetName = "GlobixDataset"
Me.GlobixDataset.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
'
'SplashScreenManager
'
Me.SplashScreenManager.ClosingDelay = 500
'
'frmGlobix_Index
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@ -381,4 +386,5 @@ Partial Class frmGlobix_Index
Friend WithEvents GlobixDataset As GlobixDataset
Friend WithEvents cmbDocType As DevExpress.XtraEditors.ComboBoxEdit
Friend WithEvents SimpleButton1 As SimpleButton
Friend WithEvents SplashScreenManager As DevExpress.XtraSplashScreen.SplashScreenManager
End Class

View File

@ -61,14 +61,28 @@ Public Class frmGlobix_Index
End Sub
Private Sub frmGlobix_Index_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ColorizeInactiveIcon = False
ColorizeInactiveIcon = DevExpress.Utils.DefaultBoolean.True
' Abbruchzähler zurücksetzen
CancelAttempts = 0
My.Application.Globix.INDEXING_ACTIVE = True
End Sub
Private Sub frmGlobix_Index_Shown(sender As Object, e As EventArgs) Handles Me.Shown
Cursor = Cursors.Default
SplashScreenManager.ShowWaitForm()
checkItemTopMost.Checked = My.UIConfig.Globix.TopMost
TopMost = My.UIConfig.Globix.TopMost
BringToFront()
Focus()
Try
Refresh_Dokart()
pnlIndex.Controls.Clear()
My.Application.Globix.CURRENT_ISATTACHMENT = False
Dim oSql = $"SELECT HANDLE_TYPE FROM TBGI_FILES_USER WHERE GUID = {My.Application.Globix.CurrentWorkfile.Id}"
DropType = My.DatabaseECM.GetScalarValue(oSql)
@ -115,27 +129,6 @@ Public Class frmGlobix_Index
End If
Catch ex As Exception
Logger.Warn(" - Unexpected error in Öffnen des Formulares - Fehler: " & vbNewLine & ex.Message)
Logger.Error(ex.Message)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Öffnen des Formulares:")
End Try
End Sub
Private Sub frmGlobix_Index_Shown(sender As Object, e As EventArgs) Handles Me.Shown
BringToFront()
Focus()
Cursor = Cursors.Default
Refresh_Dokart()
pnlIndex.Controls.Clear()
checkItemTopMost.Checked = My.UIConfig.Globix.TopMost
TopMost = My.UIConfig.Globix.TopMost
BringToFront()
FormLoaded = True
Try
' Letzte Auswahl merken überschreibt die automatische selektion
If My.UIConfig.Globix.ProfilePreselection Then
checkItemPreselection.Checked = True
@ -152,7 +145,7 @@ Public Class frmGlobix_Index
End If
Else
Dim oSQL As String = "SELECT DISTINCT T1.DOCTYPE as DocType, T.* FROM TBGI_REGEX_DOCTYPE T, VWGI_DOCTYPE_USER T1 WHERE T.DOCTYPE_ID = T1.DOCTYPE_ID"
oSql = "SELECT DISTINCT T1.DOCTYPE as DocType, T.* FROM TBGI_REGEX_DOCTYPE T, VWGI_DOCTYPE_USER T1 WHERE T.DOCTYPE_ID = T1.DOCTYPE_ID"
Dim oRegexDoctypeTable = Database.GetDatatable("DTTBGI_REGEX_DOCTYPE", oSQL, ECM)
For Each oRoW As DataRow In oRegexDoctypeTable.Rows
@ -173,9 +166,13 @@ Public Class frmGlobix_Index
End If
Next
End If
Catch ex As Exception
Logger.Warn("Unexpected error DTTBGI_REGEX_DOCTYPE - ErrorMessage: " & vbNewLine & ex.Message)
Finally
SplashScreenManager.CloseWaitForm()
FormLoaded = True
End Try
End Sub
@ -348,9 +345,9 @@ Public Class frmGlobix_Index
T.DOK_ID = {dokartid}
ORDER BY T.SEQUENCE"
Dim oFilter = "DOK_ID = " & dokartid
Dim oTable = My.Database.GetDatatable("VWDDINDEX_MAN", oSql, ECM,
pSortByColumn:="SEQUENCE")
pSortByColumn:="SEQUENCE",
pFilterExpression:=$"DOK_ID = {dokartid}")
Dim oManualIndexes As New List(Of ManualIndex)

View File

@ -247,6 +247,12 @@
<Compile Include="Globix\Models\DocumentType.vb" />
<Compile Include="Globix\Models\ManualIndex.vb" />
<Compile Include="Globix\Models\WorkFile.vb" />
<Compile Include="frmWaitForm.Designer.vb">
<DependentUpon>frmWaitForm.vb</DependentUpon>
</Compile>
<Compile Include="frmWaitForm.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="modCurrent.vb" />
<Compile Include="MyDataset.Designer.vb">
<AutoGen>True</AutoGen>
@ -423,6 +429,9 @@
<EmbeddedResource Include="Globix\frmGlobixNameconvention.resx">
<DependentUpon>frmGlobixNameconvention.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmWaitForm.resx">
<DependentUpon>frmWaitForm.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Search\frmFlowSearch.resx">
<DependentUpon>frmFlowSearch.vb</DependentUpon>
</EmbeddedResource>

83
GUIs.ZooFlow/frmWaitForm.Designer.vb generated Normal file
View File

@ -0,0 +1,83 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmWaitForm
Inherits DevExpress.XtraWaitForm.WaitForm
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
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.progressPanel1 = New DevExpress.XtraWaitForm.ProgressPanel()
Me.tableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
Me.tableLayoutPanel1.SuspendLayout()
Me.SuspendLayout()
'
'progressPanel1
'
Me.progressPanel1.Appearance.BackColor = System.Drawing.Color.Transparent
Me.progressPanel1.Appearance.Options.UseBackColor = True
Me.progressPanel1.AppearanceCaption.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.progressPanel1.AppearanceCaption.Options.UseFont = True
Me.progressPanel1.AppearanceDescription.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.progressPanel1.AppearanceDescription.Options.UseFont = True
Me.progressPanel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.progressPanel1.ImageHorzOffset = 20
Me.progressPanel1.Location = New System.Drawing.Point(0, 17)
Me.progressPanel1.Margin = New System.Windows.Forms.Padding(0, 3, 0, 3)
Me.progressPanel1.Name = "progressPanel1"
Me.progressPanel1.Size = New System.Drawing.Size(246, 39)
Me.progressPanel1.TabIndex = 0
Me.progressPanel1.Text = "progressPanel1"
'
'tableLayoutPanel1
'
Me.tableLayoutPanel1.AutoSize = True
Me.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent
Me.tableLayoutPanel1.ColumnCount = 1
Me.tableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.tableLayoutPanel1.Controls.Add(Me.progressPanel1, 0, 0)
Me.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.tableLayoutPanel1.Location = New System.Drawing.Point(0, 0)
Me.tableLayoutPanel1.Name = "tableLayoutPanel1"
Me.tableLayoutPanel1.Padding = New System.Windows.Forms.Padding(0, 14, 0, 14)
Me.tableLayoutPanel1.RowCount = 1
Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.tableLayoutPanel1.Size = New System.Drawing.Size(246, 73)
Me.tableLayoutPanel1.TabIndex = 1
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.AutoSize = True
Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.ClientSize = New System.Drawing.Size(246, 73)
Me.Controls.Add(Me.tableLayoutPanel1)
Me.DoubleBuffered = True
Me.Name = "Form1"
Me.StartPosition = FormStartPosition.Manual
Me.Text = "Form1"
Me.tableLayoutPanel1.ResumeLayout(false)
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Private WithEvents progressPanel1 As DevExpress.XtraWaitForm.ProgressPanel
Private WithEvents tableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
End Class

View 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:import>
<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:element>
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string"></xsd:attribute>
<xsd:attribute name="type" type="xsd:string"></xsd:attribute>
<xsd:attribute name="mimetype" type="xsd:string"></xsd:attribute>
<xsd:attribute ref="xml:space"></xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string"></xsd:attribute>
<xsd:attribute name="name" type="xsd:string"></xsd:attribute>
</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>
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"></xsd:element>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"></xsd:attribute>
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"></xsd:attribute>
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"></xsd:attribute>
<xsd:attribute ref="xml:space"></xsd:attribute>
</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:element>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,24 @@
Public Class frmWaitForm
Sub New
InitializeComponent()
Me.progressPanel1.AutoHeight = True
End Sub
Public Overrides Sub SetCaption(ByVal caption As String)
MyBase.SetCaption(caption)
Me.progressPanel1.Caption = caption
End Sub
Public Overrides Sub SetDescription(ByVal description As String)
MyBase.SetDescription(description)
Me.progressPanel1.Description = description
End Sub
Public Overrides Sub ProcessCommand(ByVal cmd As System.Enum, ByVal arg As Object)
MyBase.ProcessCommand(cmd, arg)
End Sub
Public Enum WaitFormCommand
SomeCommandId
End Enum
End Class