prevent window and control assignment if no process/window is available in profile
This commit is contained in:
parent
22a02c03fe
commit
a73e1bf443
@ -423,11 +423,31 @@ Public Class frmAdministration
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem7_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem7.ItemClick
|
||||
Dim oProcesses As Integer = CtrlApplicationAssignment1.ProcessTable.Select($"PROFILE_ID = {PROFILE_IDTextBox.Text}").Length
|
||||
|
||||
If oProcesses > 0 Then
|
||||
If CtrlApplicationAssignment1.Window_CreateAssignment(PROFILE_IDTextBox.Text) = False Then
|
||||
MsgBox("Error while assigning window!", MsgBoxStyle.Critical, "Clipboard Watcher")
|
||||
MsgBox("Error while assigning window!", MsgBoxStyle.Critical, Text)
|
||||
Else
|
||||
Status_Changed("Fenster zugeordnet")
|
||||
End If
|
||||
Else
|
||||
MsgBox($"Es wurden diesem Profi noch keine Prozesse zugeordnet!{vbNewLine}{vbNewLine}Bitte weisen Sie zuerst mind. einen Prozess zu, bevor Sie ein Fenster zuordnen.", MsgBoxStyle.Exclamation, Text)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem23_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem23.ItemClick
|
||||
Dim oWindows As Integer = CtrlApplicationAssignment1.WindowTable.Select($"PROCESS_ID = {CtrlApplicationAssignment1.SelectedProcessId}").Length
|
||||
|
||||
If oWindows > 0 Then
|
||||
If CtrlApplicationAssignment1.Control_CreateAssignment() = False Then
|
||||
MsgBox("Error while creating control", MsgBoxStyle.Critical, Text)
|
||||
Else
|
||||
Status_Changed("Feld-Zuordnung angelegt")
|
||||
End If
|
||||
Else
|
||||
MsgBox($"Es wurden diesem Profi noch keine Prozesse/Fenster zugeordnet!{vbNewLine}{vbNewLine}Bitte weisen Sie zuerst mind. einen Prozess und mind. ein Fenster zu, bevor Sie ein Felder zuordnen.", MsgBoxStyle.Exclamation, Text)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem8_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem8.ItemClick
|
||||
@ -596,14 +616,6 @@ Public Class frmAdministration
|
||||
ClassInit.Refresh_Profile_Links()
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem23_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem23.ItemClick
|
||||
If CtrlApplicationAssignment1.Control_CreateAssignment() = False Then
|
||||
MsgBox("Error while creating control", MsgBoxStyle.Critical, Text)
|
||||
Else
|
||||
Status_Changed("Feld-Zuordnung angelegt")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem24_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem24.ItemClick
|
||||
If CtrlApplicationAssignment1.SelectedControlId = 0 Then
|
||||
Exit Sub
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user