Compare commits

...

3 Commits

Author SHA1 Message Date
OlgunR
c3c214dfed Properly logout windream session on form close
Added System.ComponentModel import. Enhanced frmStart's FormClosing handler to log out of any active windream session with appropriate logging and error handling, ensuring clean session termination on application exit.
2026-04-13 16:34:00 +02:00
OlgunR
db6b5b9c0b Update interop DLL references and project content
Updated interop DLL reference paths in ToolCollection.vbproj from P: to M: drive locations. Set EmbedInteropTypes=True for Interop.WINDREAMLib and restructured its reference. Added Interop.Scripting.dll as a content file. Removed the binary Interop.WINDREAMLib.dll from the repository.
2026-04-13 16:33:32 +02:00
OlgunR
ad1e6e88ac Change oRelProperties type to Object in two methods
Changed oRelProperties from WMObjectRelationClass to Object in two methods of ClassWindream_allgemein, affecting both object type and folder type handling. No other logic was modified.
2026-04-13 16:32:30 +02:00
4 changed files with 24 additions and 11 deletions

View File

@@ -361,7 +361,7 @@ Public Class ClassWindream_allgemein
Dim oIndexAttributes As WMObjectRelation
Dim oIndexAttribute As WMObject
Dim oIndex As WMObject
Dim oRelProperties As WMObjectRelationClass
Dim oRelProperties As Object
' den Objekttyp laden
oObjectType = Me.oWMSession.GetWMObjectByName(WMEntityObjectType, name)
@@ -419,7 +419,7 @@ Public Class ClassWindream_allgemein
Dim oIndexAttributes As WMObjectRelation
Dim oIndexAttribute As WMObject
Dim oIndex As WMObject
Dim oRelProperties As WMObjectRelationClass
Dim oRelProperties As Object
For Each OrdnerType In Me.oOrdnerTypen
If OrdnerType.aName = Ordnertyp Then
oOrdnerType = OrdnerType

View File

@@ -116,24 +116,23 @@
<HintPath>packages\EntityFramework.6.0.2\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Interop.Scripting">
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.Scripting.dll</HintPath>
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.Scripting.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Interop.WINDREAMLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WINDREAMLib.dll</HintPath>
<Reference Include="Interop.WINDREAMLib">
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WINDREAMLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Interop.WMOBRWSLib">
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOBRWSLib.dll</HintPath>
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WMOBRWSLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Interop.WMOSRCHLib">
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOSRCHLib.dll</HintPath>
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WMOSRCHLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Interop.WMOTOOLLib">
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOTOOLLib.dll</HintPath>
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WMOTOOLLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.CSharp" />
@@ -141,7 +140,7 @@
<HintPath>..\packages\NLog.5.0.2\lib\net46\NLog.dll</HintPath>
</Reference>
<Reference Include="Oracle.ManagedDataAccess">
<HintPath>P:\Projekte DIGITAL DATA\DIGITAL DATA - Entwicklung\DLL_Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>
<HintPath>M:\App&amp;Service\0 Partner Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
@@ -825,6 +824,7 @@
<None Include="Resources\database_refresh.png" />
<None Include="Resources\arrow_up.png" />
<None Include="Resources\bullet_arrow_down1.png" />
<Content Include="Interop.Scripting.dll" />
<Content Include="Interop.WINDREAMLib.dll" />
<None Include="Resources\action_add_16xMD.png" />
<None Include="Resources\folder_Closed_16xMD.png" />

View File

@@ -5,6 +5,7 @@ Imports DigitalData.Modules.Logging
Imports System.IO
Imports DigitalData.Modules.Database
Imports System.Text.RegularExpressions
Imports System.ComponentModel
Public Class frmStart
Private _MyLogger As LogConfig
@@ -127,6 +128,18 @@ Public Class frmStart
Dim result As MsgBoxResult = MsgBox("Sind Sie sicher, dass sie " & Application.ProductName & " wirklich schließen wollen?" & vbNewLine & "Alle Vorgänge/Module werden gestoppt und nicht mehr ausgeführt!", MsgBoxStyle.YesNo, "Bestätigung erforderlich:")
If result = MsgBoxResult.No Then
e.Cancel = True
Return ' ← wichtig: hier sofort raus, kein Logout
End If
If Not IsNothing(CURRENToWMSession) Then
_Logger.Debug("Closing frmStart - Now logging out of windream session...")
Try
CURRENToWMSession.Logout()
_Logger.Debug("windream session logged out successfully.")
Catch ex As Exception
_Logger.Warn("Error while logging out windream session: " & ex.Message)
_Logger.Error(ex)
End Try
End If
End Sub