From 86cebc8ae661a3e40b4b3143dbd29ded7f49bbe4 Mon Sep 17 00:00:00 2001 From: OlgunR Date: Thu, 18 Sep 2025 16:11:06 +0200 Subject: [PATCH] =?UTF-8?q?Bei=20Verkn=C3=BCpdung=20verwalten=20aus=20Prof?= =?UTF-8?q?ileigenschaften=20heraus=20->=20Laden=20des=20akutellen=20NI=20?= =?UTF-8?q?Profils=20-=20ClassNIProfile,=20frmNIProfileigenschaften,=20frm?= =?UTF-8?q?NIVerkn=C3=BCpfungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ToolCollection/ClassNIProfile.vb | 2 ++ ToolCollection/frmNIProfileigenschaften.vb | 4 ++++ ToolCollection/frmNIVerknuepfungen.vb | 22 ++++++++++++++++++++-- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ToolCollection/ClassNIProfile.vb b/ToolCollection/ClassNIProfile.vb index 64e76ff..3e1097d 100644 --- a/ToolCollection/ClassNIProfile.vb +++ b/ToolCollection/ClassNIProfile.vb @@ -4,6 +4,8 @@ Public Class ClassNIProfile Private Shared _profiles() As ClassNIProfil Public Shared _windream As New ClassWindream_allgemein(CURR_LogConfig) Public Shared xmlConfigFile As String + Public Shared aktivesProfil As ClassNIProfil + Public Shared aktivesProfilAusProfileigenschaften As Boolean = False Public Shared Sub Init() Dim oConfigPath As String = My.Application.Info.DirectoryPath & "\" & My.Settings.vNIConfigDatei diff --git a/ToolCollection/frmNIProfileigenschaften.vb b/ToolCollection/frmNIProfileigenschaften.vb index eae978d..8b96550 100644 --- a/ToolCollection/frmNIProfileigenschaften.vb +++ b/ToolCollection/frmNIProfileigenschaften.vb @@ -814,11 +814,15 @@ Public Class frmNIProfileigenschaften End Sub Private Sub btnVerknüpfungen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnVerknüpfungen.Click + + ClassNIProfile.aktivesProfil = Me._selectedProfile + ClassNIProfile.aktivesProfilAusProfileigenschaften = True Cursor = Cursors.WaitCursor Dim frm As New frmNIVerknuepfungen frm = frmNIVerknuepfungen.Instance frm.MdiParent = frmStart frm.Show() + frm.BringToFront() Cursor = Cursors.Default End Sub diff --git a/ToolCollection/frmNIVerknuepfungen.vb b/ToolCollection/frmNIVerknuepfungen.vb index 6c18cde..db58d29 100644 --- a/ToolCollection/frmNIVerknuepfungen.vb +++ b/ToolCollection/frmNIVerknuepfungen.vb @@ -478,6 +478,8 @@ Public Class frmNIVerknuepfungen ''' ''' Private Sub cmbProfilauswahl_DropDownItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles cmbProfilauswahl.DropDownItemClicked + ClassNIProfile.aktivesProfil = ClassNIProfile.getProfilByName(e.ClickedItem.Text) + Me._selectedProfil = ClassNIProfile.aktivesProfil Try 'wenn noch kein Profil geladen wurde soll das ausgewählte auf jeden Fall geladen werden If Me._selectedProfil Is Nothing Then @@ -2291,8 +2293,24 @@ Public Class frmNIVerknuepfungen Private Sub frmNIVerknuepfungen_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Me.LoadProfilesInCombobox() - Me._selectedProfil = Nothing - Me.pnlZielQuelle.Visible = False + + If ClassNIProfile.aktivesProfilAusProfileigenschaften And ClassNIProfile.aktivesProfil Is Nothing = False Then + Me._selectedProfil = ClassNIProfile.aktivesProfil + Me.lblProfil.Text = "(" & Me._selectedProfil.Profilname & ")" + Me.lblProfil.Visible = True + 'Me.pnlZielQuelle.Visible = False + + Me.LoadSelectedProfile(Me._selectedProfil.Profilname) + + ClassNIProfile.aktivesProfilAusProfileigenschaften = False + + If Me._selectedProfil.Dokumenttyp Is Nothing Then + Me.lblProfil.Enabled = False + Else + Me.lblProfil.Enabled = True + End If + End If + End Sub Private Sub btnEindIndex_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEindIndex.Click Dim text As String = Me.txteindeutigerIndex.Text