From 6ed8db99ff5936720f0640c5f72bf72efacc5ea4 Mon Sep 17 00:00:00 2001 From: Developer01 Date: Fri, 14 Mar 2025 14:42:37 +0100 Subject: [PATCH] MS documentViewer --- .../My Project/AssemblyInfo.vb | 6 ++--- GUIs.Common/My Project/AssemblyInfo.vb | 6 ++--- GUIs.Common/SQLEditor/frmSQLEditor.vb | 27 +++++++++++++------ 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/Controls.DocumentViewer/My Project/AssemblyInfo.vb b/Controls.DocumentViewer/My Project/AssemblyInfo.vb index e2b71e14..cc822b89 100644 --- a/Controls.DocumentViewer/My Project/AssemblyInfo.vb +++ b/Controls.DocumentViewer/My Project/AssemblyInfo.vb @@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/GUIs.Common/My Project/AssemblyInfo.vb b/GUIs.Common/My Project/AssemblyInfo.vb index af045448..e91f2bf6 100644 --- a/GUIs.Common/My Project/AssemblyInfo.vb +++ b/GUIs.Common/My Project/AssemblyInfo.vb @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/GUIs.Common/SQLEditor/frmSQLEditor.vb b/GUIs.Common/SQLEditor/frmSQLEditor.vb index 918d5cd5..7c7231c3 100644 --- a/GUIs.Common/SQLEditor/frmSQLEditor.vb +++ b/GUIs.Common/SQLEditor/frmSQLEditor.vb @@ -80,19 +80,30 @@ Public Class frmSQLEditor Dim oConnectionGroup = LoadConnections() Dim oSelectedItem = Nothing - + Dim oConnectionisZero As Boolean = False ' Missing/Negative connection will always result in default (DD_ECM) connection If SQLConnection <= 0 Then + oConnectionisZero = True SQLConnection = 1 End If - ' Select the supplied connection in the ribbon gallery - For Each oItem As GalleryItem In oConnectionGroup.Items - Dim oConnection = oItem.Tag - If SQLConnection = oConnection.id Then - oSelectedItem = oItem - End If - Next + If oConnectionisZero = True Then + For Each oItem As GalleryItem In oConnectionGroup.Items + Dim oConnection = oItem.Tag + If oConnection.NAME = "DD_ECM" Then + oSelectedItem = oItem + End If + Next + Else + For Each oItem As GalleryItem In oConnectionGroup.Items + Dim oConnection = oItem.Tag + If oConnection.Id = SQLConnection Then + oSelectedItem = oItem + End If + Next + End If + + GalleryConnection.Gallery.Groups.Add(oConnectionGroup)