jj: add line in designer and constructor

This commit is contained in:
Jonathan Jenne
2018-04-04 14:14:07 +02:00
parent fd2dc4bf99
commit 6755ce60ea
7 changed files with 164 additions and 46 deletions

View File

@@ -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