prevent window and control assignment if no process/window is available in profile
This commit is contained in:
parent
22a02c03fe
commit
a73e1bf443
@ -423,10 +423,30 @@ Public Class frmAdministration
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub BarButtonItem7_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem7.ItemClick
|
Private Sub BarButtonItem7_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem7.ItemClick
|
||||||
If CtrlApplicationAssignment1.Window_CreateAssignment(PROFILE_IDTextBox.Text) = False Then
|
Dim oProcesses As Integer = CtrlApplicationAssignment1.ProcessTable.Select($"PROFILE_ID = {PROFILE_IDTextBox.Text}").Length
|
||||||
MsgBox("Error while assigning window!", MsgBoxStyle.Critical, "Clipboard Watcher")
|
|
||||||
|
If oProcesses > 0 Then
|
||||||
|
If CtrlApplicationAssignment1.Window_CreateAssignment(PROFILE_IDTextBox.Text) = False Then
|
||||||
|
MsgBox("Error while assigning window!", MsgBoxStyle.Critical, Text)
|
||||||
|
Else
|
||||||
|
Status_Changed("Fenster zugeordnet")
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Status_Changed("Fenster zugeordnet")
|
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 If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@ -596,14 +616,6 @@ Public Class frmAdministration
|
|||||||
ClassInit.Refresh_Profile_Links()
|
ClassInit.Refresh_Profile_Links()
|
||||||
End Sub
|
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
|
Private Sub BarButtonItem24_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem24.ItemClick
|
||||||
If CtrlApplicationAssignment1.SelectedControlId = 0 Then
|
If CtrlApplicationAssignment1.SelectedControlId = 0 Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user