ms
This commit is contained in:
parent
a7ab84cc3f
commit
4fbf33d5ab
@ -123,6 +123,7 @@ Partial Class frmConstructor_Main
|
||||
Me.BindingNavigatorMoveNextItem = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BindingNavigatorMoveLastItem = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BindingNavigatorSeparator2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.tsbtnPos_Refresh = New System.Windows.Forms.ToolStripButton()
|
||||
Me.BindingNavigatorDeleteItem = New System.Windows.Forms.ToolStripButton()
|
||||
Me.tsbtnWork = New System.Windows.Forms.ToolStripButton()
|
||||
Me.tslblPoslocked = New System.Windows.Forms.ToolStripLabel()
|
||||
@ -225,7 +226,6 @@ Partial Class frmConstructor_Main
|
||||
Me.ToolTipController = New DevExpress.Utils.ToolTipController(Me.components)
|
||||
Me.TBPMO_RECORD_VARIANTTableAdapter = New DD_Record_Organizer.DD_DMSDataSetTableAdapters.TBPMO_RECORD_VARIANTTableAdapter()
|
||||
Me.TimerClearResultfiles = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.tsbtnPos_Refresh = New System.Windows.Forms.ToolStripButton()
|
||||
CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerMain.SuspendLayout()
|
||||
CType(Me.SplitContainerTop, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@ -309,6 +309,7 @@ Partial Class frmConstructor_Main
|
||||
Me.TreeViewMain.FullRowSelect = True
|
||||
Me.TreeViewMain.Name = "TreeViewMain"
|
||||
Me.TreeViewMain.ShowLines = False
|
||||
Me.TreeViewMain.TabStop = False
|
||||
'
|
||||
'cmsTreeView
|
||||
'
|
||||
@ -425,6 +426,7 @@ Partial Class frmConstructor_Main
|
||||
Me.GridControlMain.LevelTree.Nodes.AddRange(New DevExpress.XtraGrid.GridLevelNode() {GridLevelNode1, GridLevelNode2, GridLevelNode3})
|
||||
Me.GridControlMain.MainView = Me.grvwTiles
|
||||
Me.GridControlMain.Name = "GridControlMain"
|
||||
Me.GridControlMain.TabStop = False
|
||||
Me.GridControlMain.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.grvwGrid, Me.grvwCarousel, Me.grvwTiles})
|
||||
'
|
||||
'ContextMenuGrid
|
||||
@ -669,6 +671,7 @@ Partial Class frmConstructor_Main
|
||||
Me.TCDetails.Name = "TCDetails"
|
||||
Me.TCDetails.SelectedTabPage = Me.TabDetails
|
||||
Me.TCDetails.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.TabDetails, Me.TabPos, Me.TabWindream, Me.TabFollowUp, Me.TabPageVariant})
|
||||
Me.TCDetails.TabStop = False
|
||||
'
|
||||
'TabDetails
|
||||
'
|
||||
@ -701,6 +704,7 @@ Partial Class frmConstructor_Main
|
||||
Me.pnlDetails.AllowDrop = True
|
||||
resources.ApplyResources(Me.pnlDetails, "pnlDetails")
|
||||
Me.pnlDetails.Name = "pnlDetails"
|
||||
Me.pnlDetails.TabStop = True
|
||||
'
|
||||
'pnlDocFill
|
||||
'
|
||||
@ -823,6 +827,7 @@ Partial Class frmConstructor_Main
|
||||
resources.ApplyResources(Me.GridControlPos, "GridControlPos")
|
||||
Me.GridControlPos.MainView = Me.grvwGridPos
|
||||
Me.GridControlPos.Name = "GridControlPos"
|
||||
Me.GridControlPos.TabStop = False
|
||||
Me.GridControlPos.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.grvwGridPos})
|
||||
'
|
||||
'grvwGridPos
|
||||
@ -903,6 +908,12 @@ Partial Class frmConstructor_Main
|
||||
Me.BindingNavigatorSeparator2.Name = "BindingNavigatorSeparator2"
|
||||
resources.ApplyResources(Me.BindingNavigatorSeparator2, "BindingNavigatorSeparator2")
|
||||
'
|
||||
'tsbtnPos_Refresh
|
||||
'
|
||||
Me.tsbtnPos_Refresh.Image = Global.DD_Record_Organizer.My.Resources.Resources.refresh_16xLG
|
||||
resources.ApplyResources(Me.tsbtnPos_Refresh, "tsbtnPos_Refresh")
|
||||
Me.tsbtnPos_Refresh.Name = "tsbtnPos_Refresh"
|
||||
'
|
||||
'BindingNavigatorDeleteItem
|
||||
'
|
||||
resources.ApplyResources(Me.BindingNavigatorDeleteItem, "BindingNavigatorDeleteItem")
|
||||
@ -933,6 +944,7 @@ Partial Class frmConstructor_Main
|
||||
resources.ApplyResources(Me.GridControlDocSearch, "GridControlDocSearch")
|
||||
Me.GridControlDocSearch.MainView = Me.GridViewDoc_Search
|
||||
Me.GridControlDocSearch.Name = "GridControlDocSearch"
|
||||
Me.GridControlDocSearch.TabStop = False
|
||||
Me.GridControlDocSearch.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridViewDoc_Search})
|
||||
'
|
||||
'cmsResultFilesBasic
|
||||
@ -1144,6 +1156,7 @@ Partial Class frmConstructor_Main
|
||||
Me.GridControl1.MainView = Me.GridViewVariants
|
||||
Me.GridControl1.Name = "GridControl1"
|
||||
Me.GridControl1.ShowOnlyPredefinedDetails = True
|
||||
Me.GridControl1.TabStop = False
|
||||
Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridViewVariants})
|
||||
'
|
||||
'TBPMO_RECORD_VARIANTBindingSource
|
||||
@ -1576,12 +1589,6 @@ Partial Class frmConstructor_Main
|
||||
'
|
||||
Me.TimerClearResultfiles.Interval = 3000
|
||||
'
|
||||
'tsbtnPos_Refresh
|
||||
'
|
||||
Me.tsbtnPos_Refresh.Image = Global.DD_Record_Organizer.My.Resources.Resources.refresh_16xLG
|
||||
resources.ApplyResources(Me.tsbtnPos_Refresh, "tsbtnPos_Refresh")
|
||||
Me.tsbtnPos_Refresh.Name = "tsbtnPos_Refresh"
|
||||
'
|
||||
'frmConstructor_Main
|
||||
'
|
||||
resources.ApplyResources(Me, "$this")
|
||||
@ -1589,6 +1596,7 @@ Partial Class frmConstructor_Main
|
||||
Me.Controls.Add(Me.SplitContainerFORM)
|
||||
Me.Controls.Add(Me.StatusStrip_Main)
|
||||
Me.Controls.Add(Me.NavPane)
|
||||
Me.KeyPreview = True
|
||||
Me.Name = "frmConstructor_Main"
|
||||
CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainerMain.ResumeLayout(False)
|
||||
|
||||
@ -525,7 +525,7 @@
|
||||
<value>0, 25</value>
|
||||
</data>
|
||||
<data name="GridControlMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1067, 212</value>
|
||||
<value>1074, 212</value>
|
||||
</data>
|
||||
<data name="GridControlMain.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@ -665,7 +665,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="ToolStripRecords.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1067, 25</value>
|
||||
<value>1074, 25</value>
|
||||
</data>
|
||||
<data name="ToolStripRecords.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@ -749,7 +749,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="pnlDetails.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>786, 336</value>
|
||||
<value>786, 343</value>
|
||||
</data>
|
||||
<data name="pnlDetails.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@ -779,7 +779,7 @@
|
||||
<value>0, 26</value>
|
||||
</data>
|
||||
<data name="pnlDocFill.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>554, 286</value>
|
||||
<value>561, 293</value>
|
||||
</data>
|
||||
<data name="pnlDocFill.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@ -826,10 +826,10 @@
|
||||
<value>Ansicht eingeschränkt - Klick Bearbeiten für Entsperren</value>
|
||||
</data>
|
||||
<data name="statStripDoc.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 312</value>
|
||||
<value>0, 319</value>
|
||||
</data>
|
||||
<data name="statStripDoc.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>554, 24</value>
|
||||
<value>561, 24</value>
|
||||
</data>
|
||||
<data name="statStripDoc.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@ -856,7 +856,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="pnlDocToolStrip.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>554, 26</value>
|
||||
<value>561, 26</value>
|
||||
</data>
|
||||
<data name="pnlDocToolStrip.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@ -877,7 +877,7 @@
|
||||
<value>Panel2</value>
|
||||
</data>
|
||||
<data name="SplitContainerDetails.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1356, 340</value>
|
||||
<value>1356, 347</value>
|
||||
</data>
|
||||
<data name="SplitContainerDetails.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@ -1050,7 +1050,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="TabDetails.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1356, 365</value>
|
||||
<value>1356, 372</value>
|
||||
</data>
|
||||
<data name="TabDetails.Text" xml:space="preserve">
|
||||
<value>Detailansicht</value>
|
||||
@ -1068,7 +1068,7 @@
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="TCDetails.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1362, 396</value>
|
||||
<value>1362, 403</value>
|
||||
</data>
|
||||
<data name="TCDetails.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@ -1083,7 +1083,7 @@
|
||||
<value>Cyan</value>
|
||||
</data>
|
||||
<data name="GridControlPos.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1356, 340</value>
|
||||
<value>1356, 347</value>
|
||||
</data>
|
||||
<data name="GridControlPos.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@ -1107,7 +1107,7 @@
|
||||
<value>0, 25</value>
|
||||
</data>
|
||||
<data name="Panel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1356, 340</value>
|
||||
<value>1356, 347</value>
|
||||
</data>
|
||||
<data name="Panel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
@ -1361,7 +1361,7 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="TabPos.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1356, 365</value>
|
||||
<value>1356, 372</value>
|
||||
</data>
|
||||
<data name="TabPos.Text" xml:space="preserve">
|
||||
<value>Positionen</value>
|
||||
@ -1423,7 +1423,7 @@
|
||||
<value>Aqua</value>
|
||||
</data>
|
||||
<data name="GridControlDocSearch.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1356, 340</value>
|
||||
<value>1356, 347</value>
|
||||
</data>
|
||||
<data name="GridControlDocSearch.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
@ -1525,7 +1525,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="TabWindream.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1356, 365</value>
|
||||
<value>1356, 372</value>
|
||||
</data>
|
||||
<data name="TabWindream.Text" xml:space="preserve">
|
||||
<value>Dateien</value>
|
||||
@ -1956,7 +1956,7 @@
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="TabFollowUp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1356, 365</value>
|
||||
<value>1356, 372</value>
|
||||
</data>
|
||||
<data name="TabFollowUp.Text" xml:space="preserve">
|
||||
<value>Wiedervorlage</value>
|
||||
@ -2010,7 +2010,7 @@
|
||||
<value>39</value>
|
||||
</data>
|
||||
<data name="colREASON_CODE.Caption" xml:space="preserve">
|
||||
<value>Reason for Variant</value>
|
||||
<value>Grund für Variantenerstellung</value>
|
||||
</data>
|
||||
<data name="colREASON_CODE.Visible" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -2022,7 +2022,7 @@
|
||||
<value>229</value>
|
||||
</data>
|
||||
<data name="colCOMMENT.Caption" xml:space="preserve">
|
||||
<value>Comment</value>
|
||||
<value>Kommentar</value>
|
||||
</data>
|
||||
<data name="colCOMMENT.Visible" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -2034,7 +2034,7 @@
|
||||
<value>438</value>
|
||||
</data>
|
||||
<data name="colADDED_WHO.Caption" xml:space="preserve">
|
||||
<value>Added who</value>
|
||||
<value>Erstellt wer</value>
|
||||
</data>
|
||||
<data name="colADDED_WHO.Visible" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -2046,7 +2046,7 @@
|
||||
<value>157</value>
|
||||
</data>
|
||||
<data name="colADDED_WHEN.Caption" xml:space="preserve">
|
||||
<value>Added when</value>
|
||||
<value>Erstellt wann</value>
|
||||
</data>
|
||||
<data name="colADDED_WHEN.Visible" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -2067,7 +2067,7 @@
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="GridControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1356, 340</value>
|
||||
<value>1356, 347</value>
|
||||
</data>
|
||||
<data name="GridControl1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>90</value>
|
||||
@ -2139,7 +2139,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="TabPageVariant.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1356, 365</value>
|
||||
<value>1356, 372</value>
|
||||
</data>
|
||||
<data name="TabPageVariant.Text" xml:space="preserve">
|
||||
<value>Vorgängervarianten</value>
|
||||
@ -3561,6 +3561,12 @@
|
||||
<data name=">>BindingNavigatorSeparator2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbtnPos_Refresh.Name" xml:space="preserve">
|
||||
<value>tsbtnPos_Refresh</value>
|
||||
</data>
|
||||
<data name=">>tsbtnPos_Refresh.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>BindingNavigatorDeleteItem.Name" xml:space="preserve">
|
||||
<value>BindingNavigatorDeleteItem</value>
|
||||
</data>
|
||||
@ -4011,12 +4017,6 @@
|
||||
<data name=">>TimerClearResultfiles.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbtnPos_Refresh.Name" xml:space="preserve">
|
||||
<value>tsbtnPos_Refresh</value>
|
||||
</data>
|
||||
<data name=">>tsbtnPos_Refresh.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>frmConstructor_Main</value>
|
||||
</data>
|
||||
|
||||
@ -1705,12 +1705,16 @@ Public Class frmConstructor_Main
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
SAVE_ROUTINE_ACTIVE = True
|
||||
Save_Grid_Layout()
|
||||
Dim RequiredControlsFilled As Boolean = TrySave_RequiredControlsFilled()
|
||||
If RequiredControlsFilled = False Then
|
||||
Return False
|
||||
End If
|
||||
If CtrlCommandUI.IsInsert Then
|
||||
EDIT_STATE = EditState.Insert
|
||||
Else
|
||||
EDIT_STATE = EditState.Update
|
||||
NEW_RECORD_ID = 0
|
||||
If Not RECORD_CHANGED Then
|
||||
If RECORD_CHANGED = False Then
|
||||
Update_Status_Label(True, "NO CHANGES in Record.")
|
||||
ActivateAllTabs()
|
||||
DisableEditMode()
|
||||
@ -5171,14 +5175,17 @@ Public Class frmConstructor_Main
|
||||
Try
|
||||
'EDIT_STATE = EditState.None
|
||||
'Update_Status_Label(False)
|
||||
Dim RequiredControlsFilled As Boolean = TrySave_RequiredControlsFilled()
|
||||
|
||||
If RECORD_CHANGED = False Then
|
||||
If RECORD_CHANGED = False And RequiredControlsFilled = True Then
|
||||
' Datensatz wurde nicht verändert
|
||||
Return True
|
||||
Else
|
||||
If RequiredControlsFilled = False Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim RequiredControlsFilled As Boolean = TrySave_RequiredControlsFilled()
|
||||
|
||||
If RequiredControlsFilled = True Then
|
||||
TrySave_DoSave()
|
||||
|
||||
@ -5809,7 +5816,7 @@ Public Class frmConstructor_Main
|
||||
Dim DT_DOCS As DataTable = ClassDatabase.Return_Datatable(sql, True)
|
||||
For Each doc As DataRow In DT_DOCS.Rows
|
||||
Dim DT_INDICES As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBPMO_WD_OBJECTTYPE WHERE OBJECT_TYPE = '" & doc.Item("OBJECTTYPE") & "'", True)
|
||||
clsWD_SET.REMOVE_VEKTOR_LINK(doc.Item("DOC_PATH"), DT_INDICES.Rows(0).Item("IDXNAME_ENTITYID"), ENTITY_ID)
|
||||
clsWD_SET.REMOVE_VEKTOR_LINK(doc.Item("FULL_FILENAME"), DT_INDICES.Rows(0).Item("IDXNAME_ENTITYID"), ENTITY_ID)
|
||||
Next
|
||||
|
||||
sql = String.Format("select ORIGIN_CTRL_ID,LINKED_CTRL_ID from TBPMO_CONTROL_ENTITY_LINK where ORIGIN_CTRL_ID in (SELECT GUID FROM TBPMO_CONTROL where FORM_ID = {0}) " & _
|
||||
@ -6188,10 +6195,12 @@ Public Class frmConstructor_Main
|
||||
' Rename file.
|
||||
My.Computer.FileSystem.RenameFile(OldName, NewName)
|
||||
Cursor = Cursors.WaitCursor
|
||||
If LICENSE_SITE_PROXY = True And DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED Then
|
||||
Dim upd = String.Format("UPDATE TBPMO_DOCRESULT_LIST SET Filename = '{0}', FULL_FILENAME = '{1}', CHANGED_WHO = '{2}', CHANGED_WHEN = GETDATE() WHERE DocID = {3}", _
|
||||
OnlyFilename, NewName, USER_USERNAME, ClassWindreamDocGrid.SELECTED_DOC_ID)
|
||||
ClassDatabase.Execute_non_Query(upd, True)
|
||||
Dim upd = String.Format("UPDATE TBPMO_DOCRESULT_LIST SET Filename = '{0}', FULL_FILENAME = '{1}', CHANGED_WHO = '{2}', CHANGED_WHEN = GETDATE() WHERE DocID = {3}", _
|
||||
OnlyFilename, NewName, USER_USERNAME, ClassWindreamDocGrid.SELECTED_DOC_ID)
|
||||
If DD_LIB_Standards.clsDatabase.Execute_non_Query(upd) Then
|
||||
If LICENSE_SITE_PROXY = True And DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED Then
|
||||
ClassDatabase.Execute_non_Query(upd, True)
|
||||
End If
|
||||
End If
|
||||
Cursor = Cursors.Default
|
||||
RUN_WDSEARCH_GRID()
|
||||
@ -6576,4 +6585,13 @@ Public Class frmConstructor_Main
|
||||
Private Sub tsbtnPos_Refresh_Click(sender As Object, e As EventArgs) Handles tsbtnPos_Refresh.Click
|
||||
Load_Pos_Data()
|
||||
End Sub
|
||||
|
||||
Private Sub frmConstructor_Main_KeyUp(sender As Object, e As KeyEventArgs) Handles MyBase.KeyUp
|
||||
If e.KeyCode = Keys.Tab Then
|
||||
If pnlDetails.Focused Then
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@ -32,7 +32,9 @@ Public Class ClassInit
|
||||
Public Sub InitBasics()
|
||||
Try
|
||||
Dim UPDATE_ID As Integer
|
||||
InitInstallPath()
|
||||
If InitInstallPath() = False Then
|
||||
|
||||
End If
|
||||
Dim sql = String.Format("SELECT * FROM TBDD_MODULES WHERE UPPER(NAME) = UPPER('Record-Organizer')")
|
||||
Dim KONFIG_DT As DataTable = clsDatabase.Return_Datatable(sql, False)
|
||||
If KONFIG_DT.Rows.Count = 1 Then
|
||||
@ -82,10 +84,10 @@ Public Class ClassInit
|
||||
Else
|
||||
MyServer_UpdatePath = String.Empty
|
||||
End If
|
||||
sql = String.Format("SELECT CASE VERSION_CLIENT WHEN '' THEN '1.0.0.0' ELSE VERSION_CLIENT END AS VERSION_CLIENT FROM VWDD_LOGIN_USER_HISTORY WHERE GUID = (select MAX(GUID) from VWDD_LOGIN_USER_HISTORY where USER_ID = {0} AND VERSION_CLIENT <> '' AND UPPER(MACHINE_NAME) = UPPER('{1}') AND UPPER(MODULE) = UPPER('{2}'))", USER_GUID, Environment.MachineName, "Record-Organizer")
|
||||
sql = String.Format("SELECT CASE VERSION_CLIENT WHEN '' THEN '{3}' ELSE VERSION_CLIENT END AS VERSION_CLIENT FROM VWDD_LOGIN_USER_HISTORY WHERE GUID = (select MAX(GUID) from VWDD_LOGIN_USER_HISTORY where USER_ID = {0} AND VERSION_CLIENT <> '' AND UPPER(MACHINE_NAME) = UPPER('{1}') AND UPPER(MODULE) = UPPER('{2}'))", USER_GUID, Environment.MachineName, "Record-Organizer", VERSION_SERVER)
|
||||
VERSION_USER = clsDatabase.Execute_Scalar(sql)
|
||||
If IsNothing(VERSION_USER) Then
|
||||
sql = String.Format("SELECT CASE VERSION_CLIENT WHEN '' THEN '1.0.0.0' ELSE VERSION_CLIENT END AS VERSION_CLIENT FROM VWDD_LOGIN_USER_HISTORY WHERE GUID = (select MAX(GUID) from VWDD_LOGIN_USER_HISTORY where USER_ID = {0} AND VERSION_CLIENT <> '' AND UPPER(MODULE) = UPPER('{1}'))", USER_GUID, "Record-Organizer")
|
||||
sql = String.Format("SELECT CASE VERSION_CLIENT WHEN '' THEN '{2}' ELSE VERSION_CLIENT END AS VERSION_CLIENT FROM VWDD_LOGIN_USER_HISTORY WHERE GUID = (select MAX(GUID) from VWDD_LOGIN_USER_HISTORY where USER_ID = {0} AND VERSION_CLIENT <> '' AND UPPER(MODULE) = UPPER('{1}'))", USER_GUID, "Record-Organizer", VERSION_SERVER)
|
||||
VERSION_USER = clsDatabase.Execute_Scalar(sql)
|
||||
If IsNothing(VERSION_USER) Then
|
||||
VERSION_USER = "1.0.0.0"
|
||||
@ -99,17 +101,49 @@ Public Class ClassInit
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Public Sub InitInstallPath()
|
||||
Dim RecExe_found As Boolean = False
|
||||
Public Function InitInstallPath()
|
||||
Try
|
||||
Dim readValue = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\Digital Data\Record Organizer", "Path", Nothing)
|
||||
If Not IsNothing(readValue) Then
|
||||
MY_INSTALL_PATH = readValue
|
||||
Return True
|
||||
Else
|
||||
MY_INSTALL_PATH = readValue = ""
|
||||
MY_INSTALL_PATH = ""
|
||||
For Each s In Directory.GetLogicalDrives()
|
||||
If RecExe_found = False Then
|
||||
DirSearch(s)
|
||||
End If
|
||||
Next
|
||||
If RecExe_found = False Then
|
||||
MsgBox("Could not find the path for RecordOrganizer - Please check your installation!", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error in InitInstallPath: " & ex.Message, True)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Sub DirSearch(ByVal sDir As String)
|
||||
Dim d As String
|
||||
Dim f As String
|
||||
Try
|
||||
For Each d In Directory.GetDirectories(sDir)
|
||||
If RecExe_found = False Then
|
||||
For Each f In Directory.GetFiles(d, "DD-Record-Organizer.exe")
|
||||
RecExe_found = True
|
||||
MY_INSTALL_PATH = Path.GetDirectoryName(f)
|
||||
Exit Sub
|
||||
Next
|
||||
End If
|
||||
If RecExe_found = False Then
|
||||
DirSearch(d)
|
||||
End If
|
||||
Next
|
||||
Catch excpt As System.Exception
|
||||
ClassLogger.Add("Unexpected Error in DirSearch: " & excpt.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
Public Shared Function InsertEssential_Log(REFERENCE_KEY As Integer, REFERENCE_STRING As String, COMMENT As String)
|
||||
|
||||
18
app/VERSION_CHECKER/frmVersionCheck.Designer.vb
generated
18
app/VERSION_CHECKER/frmVersionCheck.Designer.vb
generated
@ -27,6 +27,7 @@ Partial Class frmVersionCheck
|
||||
Me.pbStatus = New System.Windows.Forms.ProgressBar()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
@ -66,6 +67,7 @@ Partial Class frmVersionCheck
|
||||
'
|
||||
'PictureBox2
|
||||
'
|
||||
Me.PictureBox2.BackColor = System.Drawing.Color.Transparent
|
||||
Me.PictureBox2.Image = CType(resources.GetObject("PictureBox2.Image"), System.Drawing.Image)
|
||||
Me.PictureBox2.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.PictureBox2.Location = New System.Drawing.Point(27, 36)
|
||||
@ -75,6 +77,18 @@ Partial Class frmVersionCheck
|
||||
Me.PictureBox2.TabIndex = 5
|
||||
Me.PictureBox2.TabStop = False
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.BackColor = System.Drawing.Color.Transparent
|
||||
Me.Label2.Font = New System.Drawing.Font("Impact", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label2.ForeColor = System.Drawing.Color.Yellow
|
||||
Me.Label2.Location = New System.Drawing.Point(97, 153)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(134, 43)
|
||||
Me.Label2.TabIndex = 7
|
||||
Me.Label2.Text = "Updater"
|
||||
'
|
||||
'frmVersionCheck
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@ -82,8 +96,9 @@ Partial Class frmVersionCheck
|
||||
Me.BackColor = System.Drawing.Color.DodgerBlue
|
||||
Me.ClientSize = New System.Drawing.Size(551, 229)
|
||||
Me.ControlBox = False
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.PictureBox2)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.lblStatus)
|
||||
Me.Controls.Add(Me.pbStatus)
|
||||
Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
@ -103,5 +118,6 @@ Partial Class frmVersionCheck
|
||||
Friend WithEvents pbStatus As System.Windows.Forms.ProgressBar
|
||||
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||
Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox
|
||||
Friend WithEvents Label2 As System.Windows.Forms.Label
|
||||
|
||||
End Class
|
||||
|
||||
@ -23,107 +23,109 @@ Public Class frmVersionCheck
|
||||
Return _step * (100 / InitSteps)
|
||||
End Function
|
||||
Private Sub bw_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs)
|
||||
Dim JUMP_UPDATE As Boolean = False
|
||||
'Try
|
||||
Dim Init = New ClassInit()
|
||||
bw.ReportProgress(CalcProgress(1), "Initializing Logger")
|
||||
Init.InitLogger()
|
||||
System.Threading.Thread.Sleep(200)
|
||||
bw.ReportProgress(CalcProgress(3), "Initializing MySettings")
|
||||
MySettings_Load()
|
||||
System.Threading.Thread.Sleep(200)
|
||||
bw.ReportProgress(CalcProgress(2), "Initializing Database")
|
||||
If Init.InitDatabase() = True Then
|
||||
Try
|
||||
Dim JUMP_UPDATE As Boolean = False
|
||||
'Try
|
||||
Dim Init = New ClassInit()
|
||||
bw.ReportProgress(CalcProgress(1), "Initializing Logger")
|
||||
Init.InitLogger()
|
||||
System.Threading.Thread.Sleep(200)
|
||||
bw.ReportProgress(CalcProgress(3), "Initializing Basic-Configuration")
|
||||
Init.InitBasics()
|
||||
bw.ReportProgress(CalcProgress(3), "Initializing MySettings")
|
||||
MySettings_Load()
|
||||
System.Threading.Thread.Sleep(200)
|
||||
bw.ReportProgress(CalcProgress(4), "Initializing User-Configuration")
|
||||
If ClassInit.InitUser = False Then
|
||||
Exit Sub
|
||||
Else
|
||||
VERSION_USER = CInt(VERSION_USER.ToString.Replace(".", ""))
|
||||
VERSION_SERVER = CInt(VERSION_SERVER.ToString.Replace(".", ""))
|
||||
If VERSION_USER = VERSION_SERVER Then
|
||||
bw.ReportProgress(CalcProgress(2), "Initializing Database")
|
||||
If Init.InitDatabase() = True Then
|
||||
System.Threading.Thread.Sleep(200)
|
||||
bw.ReportProgress(CalcProgress(3), "Initializing Basic-Configuration")
|
||||
Init.InitBasics()
|
||||
System.Threading.Thread.Sleep(200)
|
||||
bw.ReportProgress(CalcProgress(4), "Initializing User-Configuration")
|
||||
If ClassInit.InitUser = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
UPDATE_NECESSARY = True
|
||||
If FORCE_UPDATE = False Then
|
||||
If VERSIONS_FOR_FORCE_UPDATE.Contains(VERSION_USER) Then
|
||||
ClassInit.InsertEssential_Log(USER_GUID, "USER-ID", String.Format("VersionChecker: ForceUpdate for User as Version '{0}' is used!", VERSION_USER))
|
||||
FORCE_UPDATE = True
|
||||
End If
|
||||
End If
|
||||
If FORCE_UPDATE = False Then
|
||||
Dim msg = "Auf dem Server liegt ein Update für ADDI bereit!" & vbNewLine & "Wollen Sie das Update nun durchführen? Die Dauer ist abhängig von Ihrer Netzwerkverbindung!"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "There is a new release available for ADDI!" & vbNewLine & "Would You like to install the update now? This might take some minutes!"
|
||||
End If
|
||||
Dim result As MsgBoxResult
|
||||
result = MessageBox.Show(msg, "Confirmation:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.No Then
|
||||
UPDATE_CANCELLED = True
|
||||
Else
|
||||
VERSION_USER = CInt(VERSION_USER.ToString.Replace(".", ""))
|
||||
VERSION_SERVER = CInt(VERSION_SERVER.ToString.Replace(".", ""))
|
||||
If VERSION_USER = VERSION_SERVER Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
UPDATE_NECESSARY = True
|
||||
If FORCE_UPDATE = False Then
|
||||
If VERSIONS_FOR_FORCE_UPDATE.Contains(VERSION_USER) Then
|
||||
ClassInit.InsertEssential_Log(USER_GUID, "USER-ID", String.Format("VersionChecker: ForceUpdate for User as Version '{0}' is used!", VERSION_USER))
|
||||
FORCE_UPDATE = True
|
||||
End If
|
||||
End If
|
||||
If FORCE_UPDATE = False Then
|
||||
Dim msg = "Auf dem Server liegt ein Update für ADDI bereit!" & vbNewLine & "Wollen Sie das Update nun durchführen? Die Dauer ist abhängig von Ihrer Netzwerkverbindung!"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "There is a new release available for ADDI!" & vbNewLine & "Would You like to install the update now? This might take some minutes!"
|
||||
End If
|
||||
Dim result As MsgBoxResult
|
||||
result = MessageBox.Show(msg, "Confirmation:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.No Then
|
||||
UPDATE_CANCELLED = True
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If MyServer_UpdatePath <> String.Empty Then
|
||||
If Directory.Exists(MyServer_UpdatePath) Then
|
||||
GetTempFolderGuid()
|
||||
If FOLDER_TEMP <> String.Empty Then
|
||||
bw.ReportProgress(CalcProgress(5), "Copying files to tempfolder")
|
||||
' Make a reference to a directory.
|
||||
Dim di As New DirectoryInfo(MyServer_UpdatePath)
|
||||
' Get a reference to each file in that directory.
|
||||
Dim fiArr As FileInfo() = di.GetFiles()
|
||||
' Display the names of the files.
|
||||
'Dim fri As FileInfo
|
||||
Dim error_while_copying = False
|
||||
For Each Upd_item As DataRow In DT_UPDATE_ITEMS.Rows
|
||||
If error_while_copying = True Then
|
||||
Exit For
|
||||
End If
|
||||
Dim updatefile2copy = Path.Combine(MyServer_UpdatePath, Upd_item.Item("ITEM_INFO"))
|
||||
Dim tempfilename = Path.Combine(FOLDER_TEMP, Upd_item.Item("ITEM_INFO"))
|
||||
If File.Exists(updatefile2copy) Then
|
||||
Try
|
||||
System.IO.File.Copy(updatefile2copy, tempfilename)
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(String.Format("Error while copying file {0} to {1}: " & ex.Message, updatefile2copy, tempfilename))
|
||||
error_while_copying = True
|
||||
End Try
|
||||
Else
|
||||
ClassLogger.Add(String.Format("UpdateFile {0} is not existing or accessible", updatefile2copy))
|
||||
End If
|
||||
Next
|
||||
If MyServer_UpdatePath <> String.Empty Then
|
||||
If Directory.Exists(MyServer_UpdatePath) Then
|
||||
GetTempFolderGuid()
|
||||
If FOLDER_TEMP <> String.Empty Then
|
||||
bw.ReportProgress(CalcProgress(5), "Copying files to tempfolder")
|
||||
' Make a reference to a directory.
|
||||
Dim di As New DirectoryInfo(MyServer_UpdatePath)
|
||||
' Get a reference to each file in that directory.
|
||||
Dim fiArr As FileInfo() = di.GetFiles()
|
||||
' Display the names of the files.
|
||||
'Dim fri As FileInfo
|
||||
Dim error_while_copying = False
|
||||
For Each Upd_item As DataRow In DT_UPDATE_ITEMS.Rows
|
||||
If error_while_copying = True Then
|
||||
Exit For
|
||||
End If
|
||||
Dim updatefile2copy = Path.Combine(MyServer_UpdatePath, Upd_item.Item("ITEM_INFO"))
|
||||
Dim tempfilename = Path.Combine(FOLDER_TEMP, Upd_item.Item("ITEM_INFO"))
|
||||
If File.Exists(updatefile2copy) Then
|
||||
Try
|
||||
System.IO.File.Copy(updatefile2copy, tempfilename)
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(String.Format("Error while copying file {0} to {1}: " & ex.Message, updatefile2copy, tempfilename))
|
||||
error_while_copying = True
|
||||
End Try
|
||||
Else
|
||||
ClassLogger.Add(String.Format("UpdateFile {0} is not existing or accessible", updatefile2copy))
|
||||
End If
|
||||
Next
|
||||
|
||||
If error_while_copying = False Then
|
||||
Replace_Files()
|
||||
If error_while_copying = False Then
|
||||
Replace_Files()
|
||||
End If
|
||||
|
||||
Try
|
||||
'Delete the tempfolder and all data
|
||||
System.IO.Directory.Delete(FOLDER_TEMP, True)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
Else
|
||||
ClassLogger.Add(String.Format("The temporaryFolder could not be created!"))
|
||||
End If
|
||||
|
||||
Try
|
||||
'Delete the tempfolder and all data
|
||||
System.IO.Directory.Delete(FOLDER_TEMP, True)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
Else
|
||||
ClassLogger.Add(String.Format("The temporaryFolder could not be created!"))
|
||||
ClassLogger.Add(String.Format("The Updatepath '{0}'is not accessible or does not exist", MyServer_UpdatePath))
|
||||
End If
|
||||
Else
|
||||
ClassLogger.Add(String.Format("The Updatepath '{0}'is not accessible or does not exist", MyServer_UpdatePath))
|
||||
ClassLogger.Add(String.Format("NO ACTION: the Updatepath is empty"))
|
||||
End If
|
||||
Else
|
||||
ClassLogger.Add(String.Format("NO ACTION: the Updatepath is empty"))
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
ClassLogger.Add(String.Format(">> Database was not intialized!"), False)
|
||||
End If
|
||||
'Catch ex As Exception
|
||||
' MsgBox("Unexpected Error in Init Classes: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
'End Try
|
||||
Else
|
||||
ClassLogger.Add(String.Format(">> Database was not intialized!"), False)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(String.Format(">> Unexpected Error in bwDoWork: " & ex.Message))
|
||||
ClassLogger.Add(ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
Sub Replace_Files()
|
||||
Try
|
||||
@ -314,13 +316,6 @@ Public Class frmVersionCheck
|
||||
End Sub
|
||||
|
||||
Private Sub bw_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs)
|
||||
' Bei Fehler MsgBox anzeigen und Programm beenden
|
||||
If e.Error IsNot Nothing Then
|
||||
MsgBox(e.Error.Message, MsgBoxStyle.Critical, "Unexpected Error in frmSplash")
|
||||
Application.Exit()
|
||||
End If
|
||||
|
||||
' Wenn kein Fehler, Splashscreen schließen
|
||||
Me.Close()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user