From 6eef02e0ec1d03ef6bbfa272e63c48ae0d1fc66d Mon Sep 17 00:00:00 2001 From: OlgunR Date: Thu, 2 Oct 2025 13:30:14 +0200 Subject: [PATCH] =?UTF-8?q?Ok-Button,=20Abbrechen-Button,=20=C3=9Cbernehme?= =?UTF-8?q?n-Button,=20frmNIVerknuepfungen,=20frmNIVerknuepfungen.Designer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frmNIVerknuepfungen.Designer.vb | 28 +++++++------ ToolCollection/frmNIVerknuepfungen.vb | 40 +++++++++++++------ 2 files changed, 43 insertions(+), 25 deletions(-) diff --git a/ToolCollection/frmNIVerknuepfungen.Designer.vb b/ToolCollection/frmNIVerknuepfungen.Designer.vb index 96b1132..d2ce9bc 100644 --- a/ToolCollection/frmNIVerknuepfungen.Designer.vb +++ b/ToolCollection/frmNIVerknuepfungen.Designer.vb @@ -168,7 +168,7 @@ Partial Class frmNIVerknuepfungen Me.rbvkt_overwrite = New System.Windows.Forms.RadioButton() Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() Me.pnlFooter = New System.Windows.Forms.Panel() - Me.btnCancelAndClose = New System.Windows.Forms.Button() + Me.btnCancelAllAndClose = New System.Windows.Forms.Button() Me.btnSaveAll = New System.Windows.Forms.Button() Me.btnSaveAllAndClose = New System.Windows.Forms.Button() Me.StatusStrip1.SuspendLayout() @@ -1911,7 +1911,7 @@ Partial Class frmNIVerknuepfungen ' Me.pnlFooter.BackColor = System.Drawing.Color.Transparent Me.pnlFooter.Controls.Add(Me.btnSaveAllAndClose) - Me.pnlFooter.Controls.Add(Me.btnCancelAndClose) + Me.pnlFooter.Controls.Add(Me.btnCancelAllAndClose) Me.pnlFooter.Controls.Add(Me.btnSaveAll) Me.pnlFooter.Dock = System.Windows.Forms.DockStyle.Fill Me.pnlFooter.Location = New System.Drawing.Point(0, 250) @@ -1919,17 +1919,18 @@ Partial Class frmNIVerknuepfungen Me.pnlFooter.Size = New System.Drawing.Size(1265, 44) Me.pnlFooter.TabIndex = 53 ' - 'btnCancelAndClose + 'btnCancelAllAndClose ' - Me.btnCancelAndClose.Anchor = System.Windows.Forms.AnchorStyles.Top - Me.btnCancelAndClose.BackColor = System.Drawing.SystemColors.ControlLightLight - Me.btnCancelAndClose.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.btnCancelAndClose.Location = New System.Drawing.Point(1009, 6) - Me.btnCancelAndClose.Name = "btnCancelAndClose" - Me.btnCancelAndClose.Size = New System.Drawing.Size(120, 30) - Me.btnCancelAndClose.TabIndex = 1 - Me.btnCancelAndClose.Text = "Abbrechen" - Me.btnCancelAndClose.UseVisualStyleBackColor = False + Me.btnCancelAllAndClose.Anchor = System.Windows.Forms.AnchorStyles.Top + Me.btnCancelAllAndClose.BackColor = System.Drawing.SystemColors.ControlLightLight + Me.btnCancelAllAndClose.DialogResult = System.Windows.Forms.DialogResult.Cancel + Me.btnCancelAllAndClose.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.btnCancelAllAndClose.Location = New System.Drawing.Point(1009, 6) + Me.btnCancelAllAndClose.Name = "btnCancelAllAndClose" + Me.btnCancelAllAndClose.Size = New System.Drawing.Size(120, 30) + Me.btnCancelAllAndClose.TabIndex = 1 + Me.btnCancelAllAndClose.Text = "Abbrechen" + Me.btnCancelAllAndClose.UseVisualStyleBackColor = False ' 'btnSaveAll ' @@ -1947,6 +1948,7 @@ Partial Class frmNIVerknuepfungen 'btnSaveAllAndClose ' Me.btnSaveAllAndClose.BackColor = System.Drawing.SystemColors.ControlLightLight + Me.btnSaveAllAndClose.DialogResult = System.Windows.Forms.DialogResult.OK Me.btnSaveAllAndClose.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnSaveAllAndClose.Location = New System.Drawing.Point(883, 6) Me.btnSaveAllAndClose.Name = "btnSaveAllAndClose" @@ -2152,6 +2154,6 @@ Partial Class frmNIVerknuepfungen Friend WithEvents Label2 As Label Friend WithEvents pnlFooter As Panel Friend WithEvents btnSaveAll As Button - Friend WithEvents btnCancelAndClose As Button + Friend WithEvents btnCancelAllAndClose As Button Friend WithEvents btnSaveAllAndClose As Button End Class diff --git a/ToolCollection/frmNIVerknuepfungen.vb b/ToolCollection/frmNIVerknuepfungen.vb index 19d5832..dc3652b 100644 --- a/ToolCollection/frmNIVerknuepfungen.vb +++ b/ToolCollection/frmNIVerknuepfungen.vb @@ -2312,23 +2312,31 @@ Public Class frmNIVerknuepfungen End If End If - ' If Not Me._selectedProfil.IsSaved Or Not Me._selectedProfil._links.IsSaved Then - If Not Me._selectedProfil.IsSaved Then + Select Case Me.DialogResult + Case DialogResult.OK + If Not Me._selectedProfil.IsSaved Then SaveProfile() + If Not Me._selectedProfil._links.IsLinksSaved Then SaveLinks() + Case DialogResult.Cancel + 'nichts + Case Else + ' If Not Me._selectedProfil.IsSaved Or Not Me._selectedProfil._links.IsSaved Then + If Not Me._selectedProfil.IsSaved Then - Dim msgResult As MsgBoxResult = MsgBox("Möchten Sie die Änderungen speichern?", MsgBoxStyle.YesNoCancel, "Änderungen übernehmen?") - If msgResult = MsgBoxResult.Yes Then + Dim msgResult As MsgBoxResult = MsgBox("Möchten Sie die Änderungen speichern?", MsgBoxStyle.YesNoCancel, "Änderungen übernehmen?") + If msgResult = MsgBoxResult.Yes Then - If Not Me._selectedProfil.IsSaved Then - SaveProfile() - End If + If Not Me._selectedProfil.IsSaved Then + SaveProfile() + End If - If Not Me._selectedProfil._links.IsSaved Then - SaveLinks() - End If + If Not Me._selectedProfil._links.IsSaved Then + SaveLinks() + End If - End If + End If - End If + End If + End Select End If End Sub @@ -3696,4 +3704,12 @@ Public Class frmNIVerknuepfungen SaveProfile() SaveScript() End Sub + + Private Sub btnSaveAllAndClose_Click(sender As Object, e As EventArgs) Handles btnSaveAllAndClose.Click + Me.Close() + End Sub + + Private Sub btnCancelAllAndClose_Click(sender As Object, e As EventArgs) Handles btnCancelAllAndClose.Click + Me.Close() + End Sub End Class \ No newline at end of file