diff --git a/app/DD-Record-Organizer/ClassControlBuilder.vb b/app/DD-Record-Organizer/ClassControlBuilder.vb index 208f0d8..621248e 100644 --- a/app/DD-Record-Organizer/ClassControlBuilder.vb +++ b/app/DD-Record-Organizer/ClassControlBuilder.vb @@ -1513,6 +1513,8 @@ Public Class ClassControlBuilder .Name = name } line.Name = name + line.AutoSize = False + line.BackColor = IntToColor(color) If _new Then line.Location = GetCursorPosition() @@ -1525,6 +1527,8 @@ Public Class ClassControlBuilder CurrentControl = line line.Parent = _master_panel + + SetEventHandlers(line) AddToPanel(line) End Sub diff --git a/app/DD-Record-Organizer/ClassControlCommands.vb b/app/DD-Record-Organizer/ClassControlCommands.vb index 59c9839..159a0ea 100644 --- a/app/DD-Record-Organizer/ClassControlCommands.vb +++ b/app/DD-Record-Organizer/ClassControlCommands.vb @@ -10,6 +10,8 @@ Dim CurrentType As String = control.GetType.ToString.ToUpper Select Case True + Case CurrentType.Contains("LineLabel".ToUpper) + Return 15 Case CurrentType.Contains("Label".ToUpper) Return 1 Case CurrentType.Contains("TextBox".ToUpper) @@ -42,8 +44,7 @@ Return 12 Case CurrentType.Contains("ListBoxControl".ToUpper) Return 13 - Case CurrentType.Contains("LineLabel") - Return 14 + ' Id 14 ist DataGridView Checkable - nicht verwendet Case Else Return -1 End Select @@ -103,12 +104,7 @@ ' SQL Befehl für CONTROL TABELLE ' SQL_COMMAND_1 auf leeren String setzen - SQL = $""" - INSERT INTO TBPMO_CONTROL - (FORM_ID, CONTROL_TYPE_ID, DEFAULT_VALUE, NAME, COL_NAME, PARENT_CONTROL_ID, SQL_COMMAND_1) - VALUES - ({CURRENT_ENTITY_ID}, {CONTROL_TYPE_ID}, '', '{NAME}', '{NAME}', {PARENT_CONTROL_ID}, '') - """ + SQL = $"INSERT INTO TBPMO_CONTROL (FORM_ID, CONTROL_TYPE_ID, DEFAULT_VALUE, NAME, COL_NAME, PARENT_CONTROL_ID, SQL_COMMAND_1) VALUES ({CURRENT_ENTITY_ID}, {CONTROL_TYPE_ID}, '', '{NAME}', '{NAME}', {PARENT_CONTROL_ID}, '')" 'If LogErrorsOnly = False Then ClassLogger.Add(SQL, True) If ClassDatabase.Execute_non_Query(SQL) = True Then diff --git a/app/DD-Record-Organizer/ClassControlCommandsUI.vb b/app/DD-Record-Organizer/ClassControlCommandsUI.vb index 6b7a393..27c8c6b 100644 --- a/app/DD-Record-Organizer/ClassControlCommandsUI.vb +++ b/app/DD-Record-Organizer/ClassControlCommandsUI.vb @@ -306,6 +306,19 @@ Public Class ClassControlCommandsUI dr.Item("CONTROL_COL_NAME"), parent) control = "DataGridViewCheckable - " & dr.Item("CONTROL_ID") + Case 15 ' Line + _CtrlBuilder.AddLine(dr.Item("CONTROL_ID"), + dr.Item("CONTROL_NAME"), + dr.Item("CTRLSCR_X_LOC"), + dr.Item("CTRLSCR_Y_LOC"), + dr.Item("CTRLSCR_FONT_COLOR"), + dr.Item("CTRLSCR_WIDTH"), + dr.Item("CTRLSCR_HEIGHT"), + False, + parent) + + control = "Line - " & dr.Item("CONTROL_ID") + End Select diff --git a/app/DD-Record-Organizer/ClassControlProperties.vb b/app/DD-Record-Organizer/ClassControlProperties.vb index e799d07..7c4c657 100644 --- a/app/DD-Record-Organizer/ClassControlProperties.vb +++ b/app/DD-Record-Organizer/ClassControlProperties.vb @@ -328,6 +328,34 @@ Module ClassControlProperties End Property End Class + Public Class LineProperties + Inherits CommonProperties + + + + + Public Overloads Property ColumnTitle() As String + Get + Return "" + End Get + Set(value As String) + '_column_title = value + End Set + End Property + + + + + Public Overloads Property TreeView() As Boolean + Get + Return False + End Get + Set(value As Boolean) + '_tree_view = value + End Set + End Property + End Class + Public Class TextBoxProperties Inherits InputControlProperties @@ -631,7 +659,7 @@ Module ClassControlProperties ' +++++ FUNCTION CLASSES +++++ - Public Class FunctionAddAppointment + Public Class FunctionAddAppointmentProperties Inherits BaseProperties Private _caption As String @@ -722,7 +750,7 @@ Module ClassControlProperties End Property End Class - Public Class FunctionAddFormData + Public Class FunctionAddFormDataProperties Inherits BaseProperties Private _caption As String diff --git a/app/DD-Record-Organizer/frmLevel_Designer.Designer.vb b/app/DD-Record-Organizer/frmLevel_Designer.Designer.vb index 218f662..6687df8 100644 --- a/app/DD-Record-Organizer/frmLevel_Designer.Designer.vb +++ b/app/DD-Record-Organizer/frmLevel_Designer.Designer.vb @@ -25,6 +25,7 @@ Partial Class frmLevel_Designer Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmLevel_Designer)) Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() + Me.pnlDesigner = New DD_Record_Organizer.ClassSnapPanel() Me.ToolStrip1 = New System.Windows.Forms.ToolStrip() Me.lblFormName = New System.Windows.Forms.ToolStripLabel() Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton() @@ -57,7 +58,7 @@ Partial Class frmLevel_Designer Me.btnlabel = New System.Windows.Forms.Button() Me.OFDWindreamsuche = New System.Windows.Forms.OpenFileDialog() Me.ttTooltip = New System.Windows.Forms.ToolTip(Me.components) - Me.pnlDesigner = New ClassSnapPanel() + Me.btnLine = New System.Windows.Forms.Button() CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainer1.Panel1.SuspendLayout() Me.SplitContainer1.Panel2.SuspendLayout() @@ -88,6 +89,16 @@ Partial Class frmLevel_Designer ' Me.SplitContainer1.Panel2.Controls.Add(Me.TabControl1) ' + 'pnlDesigner + ' + Me.pnlDesigner.AllowDrop = True + Me.pnlDesigner.BackColor = System.Drawing.SystemColors.ControlLight + Me.pnlDesigner.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + resources.ApplyResources(Me.pnlDesigner, "pnlDesigner") + Me.pnlDesigner.GridSize = 8 + Me.pnlDesigner.Name = "pnlDesigner" + Me.pnlDesigner.ShowGrid = True + ' 'ToolStrip1 ' Me.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden @@ -209,6 +220,7 @@ Partial Class frmLevel_Designer 'GroupBox1 ' Me.GroupBox1.Controls.Add(Me.btnTableCheckable) + Me.GroupBox1.Controls.Add(Me.btnLine) Me.GroupBox1.Controls.Add(Me.btnListBox) Me.GroupBox1.Controls.Add(Me.btnListBoxCheckable) Me.GroupBox1.Controls.Add(Me.btnRadioButton) @@ -334,15 +346,12 @@ Partial Class frmLevel_Designer resources.ApplyResources(Me.OFDWindreamsuche, "OFDWindreamsuche") Me.OFDWindreamsuche.RestoreDirectory = True ' - 'pnlDesigner + 'btnLine ' - Me.pnlDesigner.AllowDrop = True - Me.pnlDesigner.BackColor = System.Drawing.SystemColors.ControlLight - Me.pnlDesigner.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - resources.ApplyResources(Me.pnlDesigner, "pnlDesigner") - Me.pnlDesigner.GridSize = 8 - Me.pnlDesigner.Name = "pnlDesigner" - Me.pnlDesigner.ShowGrid = True + resources.ApplyResources(Me.btnLine, "btnLine") + Me.btnLine.Name = "btnLine" + Me.btnLine.Tag = "line" + Me.btnLine.UseVisualStyleBackColor = True ' 'frmLevel_Designer ' @@ -406,4 +415,5 @@ Partial Class frmLevel_Designer Friend WithEvents pgControlProperties As System.Windows.Forms.PropertyGrid Friend WithEvents pnlDesigner As ClassSnapPanel Friend WithEvents btnTableCheckable As System.Windows.Forms.Button + Friend WithEvents btnLine As Button End Class diff --git a/app/DD-Record-Organizer/frmLevel_Designer.resx b/app/DD-Record-Organizer/frmLevel_Designer.resx index d15e05d..6e9ac15 100644 --- a/app/DD-Record-Organizer/frmLevel_Designer.resx +++ b/app/DD-Record-Organizer/frmLevel_Designer.resx @@ -142,7 +142,7 @@ pnlDesigner - SnapPanelControl.SnapPanel, SnapPanelControl, Version=1.0.5989.19477, Culture=neutral, PublicKeyToken=null + DD_Record_Organizer.ClassSnapPanel, DD-Record-Organizer, Version=2.4.9.7, Culture=neutral, PublicKeyToken=null SplitContainer1.Panel1 @@ -196,7 +196,7 @@ 17, 17 - 137, 17 + 136, 17 ToolStripStatusLabel1 @@ -448,7 +448,7 @@ Segoe UI, 9.75pt, style=Bold - 6, 249 + 6, 296 274, 71 @@ -507,6 +507,50 @@ 0 + + Segoe UI, 8.25pt, style=Bold + + + + iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAA0SURBVEhLYxgF + o2AUEAe8gDiICpgbiFHACyD+TwWsCMQoIA2IC6iA+YF4FIyCUTAAgIEBAJUPH6VVzyeQAAAAAElFTkSu + QmCC + + + + MiddleLeft + + + NoControl + + + 12, 237 + + + 122, 31 + + + 10 + + + Linie + + + MiddleRight + + + btnLine + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GroupBox1 + + + 1 + Segoe UI, 8.25pt, style=Bold @@ -541,7 +585,7 @@ GroupBox1 - 1 + 2 Segoe UI, 8.25pt, style=Bold @@ -577,7 +621,7 @@ GroupBox1 - 2 + 3 Segoe UI, 8.25pt, style=Bold @@ -613,7 +657,7 @@ GroupBox1 - 3 + 4 Segoe UI, 8.25pt, style=Bold @@ -649,7 +693,7 @@ GroupBox1 - 4 + 5 Segoe UI, 8.25pt, style=Bold @@ -685,7 +729,7 @@ GroupBox1 - 5 + 6 Segoe UI, 8.25pt, style=Bold @@ -721,7 +765,7 @@ GroupBox1 - 6 + 7 Segoe UI, 8.25pt, style=Bold @@ -757,7 +801,7 @@ GroupBox1 - 7 + 8 Segoe UI, 8.25pt, style=Bold @@ -793,7 +837,7 @@ GroupBox1 - 8 + 9 Segoe UI, 8.25pt, style=Bold @@ -829,7 +873,7 @@ GroupBox1 - 9 + 10 Segoe UI, 8.25pt, style=Bold @@ -865,7 +909,7 @@ GroupBox1 - 10 + 11 Segoe UI, 8.25pt, style=Bold @@ -901,7 +945,7 @@ GroupBox1 - 11 + 12 Segoe UI, 9.75pt, style=Bold @@ -910,7 +954,7 @@ 6, 6 - 274, 237 + 274, 284 4 @@ -1041,9 +1085,6 @@ Segoe UI, 8.25pt - - NoControl - frmLevel_Designer diff --git a/app/DD-Record-Organizer/frmLevel_Designer.vb b/app/DD-Record-Organizer/frmLevel_Designer.vb index 1114164..b4da61e 100644 --- a/app/DD-Record-Organizer/frmLevel_Designer.vb +++ b/app/DD-Record-Organizer/frmLevel_Designer.vb @@ -27,7 +27,7 @@ Public Sub ControlDragDrop(type As String, Parent As GroupBox) Try - Dim r As New System.Random() + Dim r As New Random() Dim def_font_family As String = DefaultFont.Name Dim def_font_color As Integer = DefaultForeColor.ToArgb Dim def_font_style As Integer = 0 @@ -50,6 +50,10 @@ DesignerCtrlBuilder.AddLabel(0, "lbl" & random, defaultCaption, 0, 0, def_font_family, def_font_color, def_font_size, def_font_style, "", True, Parent) ' Aktuelles Control in die Datenbank speichern ClassControlCommands.InsertControl(DesignerCtrlBuilder.CurrentControl) + Case "line" + DesignerCtrlBuilder.AddLine(0, "line" & random, 0, 0, 0, 0, 0, True, Nothing, True) + ' Aktuelles Control in die Datenbank speichern + ClassControlCommands.InsertControl(DesignerCtrlBuilder.CurrentControl) Case "txt" DesignerCtrlBuilder.AddTextBox(0, "txt" & random, 0, 0, def_font_family, def_font_color, def_font_size, def_font_style, 0, True, 0, 0, False, False, False, "String", False, True, Parent) ' Aktuelles Control in die Datenbank speichern @@ -478,6 +482,19 @@ dr.Item("CONTROL_COL_NAME"), parent, True) + Case 15 ' Line + DesignerCtrlBuilder.AddLine( + dr.Item("CONTROL_ID"), + dr.Item("CONTROL_NAME"), + dr.Item("CTRLSCR_X_LOC"), + dr.Item("CTRLSCR_Y_LOC"), + dr.Item("CTRLSCR_FONT_COLOR"), + dr.Item("CTRLSCR_WIDTH"), + dr.Item("CTRLSCR_HEIGHT"), + False, + parent, + True + ) End Select Next End Sub @@ -497,11 +514,8 @@ CURRENT_CONTROL_ID = ClassControlCommands.GetControlGuid(DesignerCtrlBuilder.CurrentControl.Name) ' Control Eigenschaften laden - 'frmTool_ControlProperties.Instance.pgControlProperties.Enabled = True pgControlProperties.Enabled = True - 'frmTool_ControlProperties.Instance.LoadControlProperties(CtrlBuilder.CurrentControl) - 'frmTool_ControlProperties.Instance.LoadControlPropertiesNeu(CtrlBuilder.CurrentControl) LoadControlPropertiesNeu(DesignerCtrlBuilder.CurrentControl) End Sub @@ -530,7 +544,7 @@ btnRadioButton.MouseDown, btnListBoxCheckable.MouseDown, btnListBox.MouseDown, - btnTableCheckable.MouseDown + btnTableCheckable.MouseDown, btnLine.MouseDown Mouse_Down = True End Sub @@ -546,7 +560,7 @@ btnRadioButton.MouseMove, btnListBoxCheckable.MouseMove, btnListBox.MouseMove, - btnTableCheckable.MouseMove + btnTableCheckable.MouseMove, btnLine.MouseMove If Mouse_Down Then Dim ctrl As Button = DirectCast(sender, Button) @@ -705,8 +719,9 @@ Case "ListBox" : props = New ComboBoxProperties() Case "CheckedListBox" : props = New ComboBoxProperties() Case "DatagridviewCheckable" : props = New ComboBoxProperties() - Case "F_AddAppointment" : props = New FunctionAddAppointment() - Case "F_AddFormData" : props = New FunctionAddFormData() + Case "F_AddAppointment" : props = New FunctionAddAppointmentProperties() + Case "F_AddFormData" : props = New FunctionAddFormDataProperties() + Case "Line" : props = New LineProperties() End Select 'Generische Properties laden @@ -738,6 +753,13 @@ props.SQLCommand = New SQLValue(NotNull(r.Item("CONTROL_SQLCOMMAND_1"), "")) props.TreeView = CBool(r.Item("CONTROL_TREE_VIEW")) + + Case "Line" + props.ControlType = "Line" + props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR")) + props.SQLCommand = New SQLValue(NotNull(r.Item("CONTROL_SQLCOMMAND_1"), "")) + props.TreeView = CBool(r.Item("CONTROL_TREE_VIEW")) + Case "Textbox" props.ControlType = "TextBox" props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR")) @@ -1056,7 +1078,11 @@ Case "Font" ctrl.Font = newValue Case "FontColor" - ctrl.ForeColor = newValue + If TypeOf ctrl Is ClassControlBuilder.LineLabel Then + ctrl.BackColor = newValue + Else + ctrl.ForeColor = newValue + End If Case "BackColor" ctrl.BackColor = newValue End Select