From ecd5797c1ded5d3a609ee1f17e003a59a69b6690 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 16 Dec 2020 15:53:11 +0100 Subject: [PATCH] fix errors in admin, update commons.dll --- .../frmAdministration.vb | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/app/DD_Clipboard_Searcher/frmAdministration.vb b/app/DD_Clipboard_Searcher/frmAdministration.vb index 2abd81f..cfb4508 100644 --- a/app/DD_Clipboard_Searcher/frmAdministration.vb +++ b/app/DD_Clipboard_Searcher/frmAdministration.vb @@ -1,5 +1,6 @@ Imports System.Text.RegularExpressions Imports DigitalData.Modules.Database +Imports DigitalData.Modules.Language Public Class frmAdministration Private _SelectedProcessName As String Private _DragDrop As ClassDragDrop @@ -318,6 +319,8 @@ Public Class frmAdministration End Sub Private Sub frmAdministration_Shown(sender As Object, e As EventArgs) Handles Me.Shown + XtraTabControl1.SelectedTabPage = TabPageGeneralSettings + If PROFILE_IDTextBox.Text = "" Then Refresh_Free_Users(0) Refresh_Free_Groups(0) @@ -372,7 +375,7 @@ Public Class frmAdministration End Sub Private Sub BarButtonItem3_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem3.ItemClick - If txtProfileName.EditValue <> String.Empty Then + If Utils.NotNull(txtProfileName.EditValue, String.Empty) <> String.Empty Then Save_Profile() Else MsgBox("Profil kann nicht ohne Profil-Name gespeichert werden!", MsgBoxStyle.Exclamation, Text) @@ -575,7 +578,7 @@ Public Class frmAdministration End If Catch ex As Exception Logger.Error(ex) - MsgBox("Unexpected Error while saving Data Search: " & vbNewLine & ex.Message, MsgBoxStyle.Critical) + MsgBox("Unexpected Error while saving Data Search: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, Text) End Try End Sub @@ -588,12 +591,16 @@ Public Class frmAdministration End Sub Private Sub BarButtonItem20_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem20.ItemClick - If TBCW_PROF_DATA_SEARCHBindingSource.Count = MAX_DATA_SEARCHES Then - MsgBox($"Es können nicht mehr als {MAX_DATA_SEARCHES} Daten-Suchen angelegt werden!", MsgBoxStyle.Exclamation, Text) - Exit Sub - End If + Try + If TBCW_PROF_DATA_SEARCHBindingSource.Count = MAX_DATA_SEARCHES Then + MsgBox($"Es können nicht mehr als {MAX_DATA_SEARCHES} Daten-Suchen angelegt werden!", MsgBoxStyle.Exclamation, Text) + Exit Sub + End If - TBCW_PROF_DATA_SEARCHBindingSource.AddNew() + TBCW_PROF_DATA_SEARCHBindingSource.AddNew() + Catch ex As Exception + MsgBox("Unexpected Error while creating DataSearch: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, Text) + End Try End Sub Private Sub BarButtonItem18_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem18.ItemClick