jj_01_02_16
This commit is contained in:
parent
6f416f75a0
commit
666c9d039f
@ -487,6 +487,7 @@ Public Class ClassControlBuilder
|
||||
|
||||
Dim metadata As New ClassControlMetadata()
|
||||
metadata.Id = id
|
||||
metadata.Name = name
|
||||
control.Tag = metadata
|
||||
|
||||
control.Name = name
|
||||
@ -567,6 +568,7 @@ Public Class ClassControlBuilder
|
||||
|
||||
Dim metadata As New ClassControlMetadata()
|
||||
metadata.Id = id
|
||||
metadata.Name = name
|
||||
metadata.Required = required
|
||||
control.Tag = metadata
|
||||
|
||||
@ -651,6 +653,7 @@ Public Class ClassControlBuilder
|
||||
|
||||
Dim metadata As New ClassControlMetadata()
|
||||
metadata.Id = id
|
||||
metadata.Name = name
|
||||
metadata.Required = required
|
||||
control.Tag = metadata
|
||||
|
||||
@ -725,6 +728,7 @@ Public Class ClassControlBuilder
|
||||
|
||||
Dim metadata As New ClassControlMetadata()
|
||||
metadata.Id = id
|
||||
metadata.Name = name
|
||||
metadata.Required = required
|
||||
control.Tag = metadata
|
||||
|
||||
@ -798,6 +802,7 @@ Public Class ClassControlBuilder
|
||||
|
||||
Dim metadata As New ClassControlMetadata()
|
||||
metadata.Id = id
|
||||
metadata.Name = name
|
||||
metadata.Required = required
|
||||
control.Tag = metadata
|
||||
|
||||
@ -925,6 +930,7 @@ Public Class ClassControlBuilder
|
||||
|
||||
Dim metadata As New ClassControlMetadata()
|
||||
metadata.Id = id
|
||||
metadata.Name = name
|
||||
metadata.Required = required
|
||||
control.Tag = metadata
|
||||
|
||||
@ -989,6 +995,7 @@ Public Class ClassControlBuilder
|
||||
|
||||
Dim metadata As New ClassControlMetadata()
|
||||
metadata.Id = id
|
||||
metadata.Name = name
|
||||
metadata.Required = required
|
||||
control.Tag = metadata
|
||||
|
||||
@ -1070,6 +1077,7 @@ Public Class ClassControlBuilder
|
||||
|
||||
Dim metadata As New ClassControlMetadata()
|
||||
metadata.Id = id
|
||||
metadata.Name = name
|
||||
metadata.Required = required
|
||||
control.Tag = metadata
|
||||
|
||||
@ -1128,6 +1136,7 @@ Public Class ClassControlBuilder
|
||||
|
||||
Dim metadata As New ClassControlMetadata()
|
||||
metadata.Id = id
|
||||
metadata.Name = name
|
||||
control.Tag = metadata
|
||||
|
||||
control.Name = name
|
||||
@ -1183,6 +1192,7 @@ Public Class ClassControlBuilder
|
||||
|
||||
Dim metadata As New ClassControlMetadata()
|
||||
metadata.Id = id
|
||||
metadata.Name = name
|
||||
control.Tag = metadata
|
||||
|
||||
control.Name = name
|
||||
@ -1241,6 +1251,7 @@ Public Class ClassControlBuilder
|
||||
|
||||
Dim metadata As New ClassControlMetadata()
|
||||
metadata.Id = id
|
||||
metadata.Name = name
|
||||
control.Tag = metadata
|
||||
|
||||
control.Name = name
|
||||
@ -1308,6 +1319,7 @@ Public Class ClassControlBuilder
|
||||
' control.CheckStyle = DevExpress.XtraEditors.Controls.CheckStyles.Style3
|
||||
Dim metadata As New ClassControlMetadata()
|
||||
metadata.Id = id
|
||||
metadata.Name = name
|
||||
metadata.Required = required
|
||||
control.Tag = metadata
|
||||
|
||||
@ -1416,6 +1428,7 @@ Public Class ClassControlBuilder
|
||||
|
||||
Dim metadata As New ClassControlMetadata()
|
||||
metadata.Id = id
|
||||
metadata.Name = name
|
||||
metadata.Required = required
|
||||
control.Tag = metadata
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ Public Class ClassControlCommandsUI
|
||||
|
||||
Dim parent As GroupBox = Nothing
|
||||
If (dr.Item("CONTROL_PARENT_ID") <> 0) Then
|
||||
Dim parentname As String = GetName_for_ControlID(dr.Item("CONTROL_PARENT_ID"), FormId)
|
||||
Dim parentname As String = Get_Name_for_ControlID(dr.Item("CONTROL_PARENT_ID"), FormId)
|
||||
parent = _CtrlBuilder.GetControlByName(parentname)
|
||||
End If
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
Public Structure ClassControlMetadata
|
||||
Public Property Id As Integer
|
||||
Public Property Name As String
|
||||
Public Property Required As Boolean
|
||||
End Structure
|
||||
|
||||
@ -114,6 +114,40 @@ Public Class ClassDatabase
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'TODO: Asynchrone Abfrage möglich machen
|
||||
Public Shared Sub Execute_non_Query_Async(ExecuteCMD As String, Optional Userinput As Boolean = False)
|
||||
Dim SQLconnect As New SqlClient.SqlConnection
|
||||
Dim SQLcommand As SqlClient.SqlCommand
|
||||
Dim callback As New AsyncCallback(AddressOf Execute_non_Query_Async_Callback)
|
||||
|
||||
Try
|
||||
SQLconnect.ConnectionString = connectionString
|
||||
SQLconnect.Open()
|
||||
SQLcommand = SQLconnect.CreateCommand()
|
||||
'Update Last Created Record in Foo
|
||||
SQLcommand.CommandText = ExecuteCMD
|
||||
|
||||
SQLcommand.BeginExecuteNonQuery(callback, SQLcommand)
|
||||
Catch ex As Exception
|
||||
If Userinput = True Then
|
||||
MsgBox("Fehler bei Execute_non_Query_Async: " & ex.Message & vbNewLine & vbNewLine & ExecuteCMD, MsgBoxStyle.Critical)
|
||||
End If
|
||||
ClassLogger.Add("Fehler bei Execute_non_Query_Async: " & ex.Message, True)
|
||||
ClassLogger.Add("SQL: " & ExecuteCMD, False)
|
||||
Finally
|
||||
SQLcommand.Dispose()
|
||||
SQLconnect.Close()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Shared Sub Execute_non_Query_Async_Callback(ByVal result As IAsyncResult)
|
||||
Dim command As SqlClient.SqlCommand = CType(result.AsyncState, SqlClient.SqlCommand)
|
||||
Dim res = command.EndExecuteNonQuery(result)
|
||||
|
||||
ClassLogger.Add(String.Format("Finished executing Async database operation: {0}", command.CommandText), False)
|
||||
End Sub
|
||||
|
||||
Public Shared Function Execute_Scalar(cmdscalar As String, Optional Userinput As Boolean = False)
|
||||
Dim result
|
||||
Try
|
||||
|
||||
@ -128,7 +128,7 @@ Public Class ClassFunctionCommandsUI
|
||||
|
||||
If Not IsDBNull(FromDateID) Then
|
||||
If FromDateID <> 0 Then
|
||||
FromDateName = GetName_for_ControlID(FromDateID, FormID)
|
||||
FromDateName = Get_Name_for_ControlID(FromDateID, FormID)
|
||||
FromDateValue = Date.Parse(FindControlValue(FromDateName, PanelControls))
|
||||
apt.Start = FromDateValue
|
||||
Else
|
||||
@ -140,7 +140,7 @@ Public Class ClassFunctionCommandsUI
|
||||
|
||||
If Not IsDBNull(ToDateID) Then
|
||||
If ToDateID <> 0 Then
|
||||
ToDateName = GetName_for_ControlID(ToDateID, FormID)
|
||||
ToDateName = Get_Name_for_ControlID(ToDateID, FormID)
|
||||
ToDateValue = Date.Parse(FindControlValue(ToDateName, PanelControls))
|
||||
apt.End = ToDateValue
|
||||
Else
|
||||
|
||||
@ -148,7 +148,7 @@
|
||||
''' <param name="Id">ControlID</param>
|
||||
''' <param name="formid">Current Form ID</param>
|
||||
''' <returns>Control Name</returns>
|
||||
Public Function GetName_for_ControlID(Id As Integer, formid As Integer) As String
|
||||
Public Function Get_Name_for_ControlID(Id As Integer, formid As Integer) As String
|
||||
Try
|
||||
Dim SQL = "SELECT NAME FROM TBPMO_CONTROL WHERE FORM_ID = " & formid & " AND GUID = " & Id
|
||||
Dim Name = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
648
app/DD-Record-Organiser/dlaccljf.x0i
Normal file
648
app/DD-Record-Organiser/dlaccljf.x0i
Normal file
@ -0,0 +1,648 @@
|
||||
Public Class frmTool_ControlProperties
|
||||
Private Shared _Instance As frmTool_ControlProperties = Nothing
|
||||
Private CurrentProperties As Object = Nothing
|
||||
|
||||
Public Shared Function Instance() As frmTool_ControlProperties
|
||||
If _Instance Is Nothing OrElse _Instance.IsDisposed = True Then
|
||||
_Instance = New frmTool_ControlProperties
|
||||
End If
|
||||
_Instance.BringToFront()
|
||||
Return _Instance
|
||||
End Function
|
||||
|
||||
Private Sub frmTool_ControlProperties_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
ClassWindowLocation.LoadFormLocationSize(Me, 1, CURRENT_SCREEN_ID, "frmTool_ControlProperties")
|
||||
End Sub
|
||||
|
||||
Private Sub frmTool_ControlProperties_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
Try
|
||||
ClassWindowLocation.SaveFormLocationSize(Me, 1, CURRENT_SCREEN_ID, "frmTool_ControlProperties")
|
||||
My.Settings.Save()
|
||||
Catch ex As Exception
|
||||
MsgBox("Settings could not be saved.\n" & ex.ToString)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub LoadControlPropertiesNeu(ctrl As Control)
|
||||
Try
|
||||
'TODO: LoadControlProperties Neuschreiben!!!
|
||||
Dim sql As String = String.Format("SELECT * FROM VWPMO_CONTROL_SCREEN WHERE CONTROL_ID = {0}", DirectCast(ctrl.Tag, ClassControlMetadata).Id)
|
||||
Dim dt As DataTable = ClassDatabase.Return_Datatable(sql)
|
||||
Dim props As Object = Nothing
|
||||
Dim r As DataRow = Nothing
|
||||
Dim type As String = Nothing
|
||||
|
||||
If dt.Rows.Count <> 1 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
r = dt.Rows(0)
|
||||
type = r.Item("CTRLTYPE_NAME")
|
||||
|
||||
Select Case type
|
||||
Case "Label"
|
||||
props = New LabelProperties()
|
||||
' Default Values
|
||||
props.ID = r.Item("CONTROL_ID")
|
||||
props.Name = r.Item("CONTROL_NAME")
|
||||
props.Size = New Size(r.Item("CTRLSCR_WIDTH"), r.Item("CTRLSCR_HEIGHT"))
|
||||
props.Location = New Point(r.Item("CTRLSCR_X_LOC"), r.Item("CTRLSCR_Y_LOC"))
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
props.ColumnTitle = r.Item("CONTROL_COL_NAME")
|
||||
|
||||
props.Caption = r.Item("CTRLSCR_CAPTION")
|
||||
props.SQLCommand = New SQLValue(NotNull(r.Item("CONTROL_SQLCOMMAND_1"), ""))
|
||||
|
||||
Case "Textbox"
|
||||
props = New TextBoxProperties()
|
||||
' Default Values
|
||||
props.ID = r.Item("CONTROL_ID")
|
||||
props.Name = r.Item("CONTROL_NAME")
|
||||
props.Size = New Size(r.Item("CTRLSCR_WIDTH"), r.Item("CTRLSCR_HEIGHT"))
|
||||
props.Location = New Point(r.Item("CTRLSCR_X_LOC"), r.Item("CTRLSCR_Y_LOC"))
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
props.ColumnTitle = r.Item("CONTROL_COL_NAME")
|
||||
|
||||
props.DefaultValue = ClassConverter.ToStringOrDefault(r.Item("CONTROL_DEF_VALUE"))
|
||||
props.Format = NotNull([Enum].Parse(GetType(EnumFormatOptions), r.Item("CONTROL_FORMAT_TYPE")), EnumFormatOptions.String)
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
props.TabStop = r.Item("CTRLSCR_TAB_STOP")
|
||||
props.TabIndex = r.Item("CTRLSCR_TAB_INDEX")
|
||||
props.ShowColumn = NotNull(r.Item("CONTROL_SHOW_COLUMN"), True)
|
||||
props.Multiline = r.Item("CONTROL_MULTILINE")
|
||||
props.SQLCommand = New SQLValue(NotNull(r.Item("CONTROL_SQLCOMMAND_1"), ""))
|
||||
|
||||
Case "Combobox"
|
||||
props = New ComboBoxProperties()
|
||||
' Default Values
|
||||
props.ID = r.Item("CONTROL_ID")
|
||||
props.Name = r.Item("CONTROL_NAME")
|
||||
props.Size = New Size(r.Item("CTRLSCR_WIDTH"), r.Item("CTRLSCR_HEIGHT"))
|
||||
props.Location = New Point(r.Item("CTRLSCR_X_LOC"), r.Item("CTRLSCR_Y_LOC"))
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
props.ColumnTitle = r.Item("CONTROL_COL_NAME")
|
||||
|
||||
props.DefaultValue = ClassConverter.ToStringOrDefault(r.Item("CONTROL_DEF_VALUE"))
|
||||
props.MasterDataId = r.Item("CTRLSCR_MASTER_DATA_ID")
|
||||
props.Format = NotNull([Enum].Parse(GetType(EnumFormatOptions), r.Item("CONTROL_FORMAT_TYPE")), EnumFormatOptions.String)
|
||||
props.StaticList = NotNull(r.Item("CONTROL_STATIC_LIST"), "")
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
props.TabStop = r.Item("CTRLSCR_TAB_STOP")
|
||||
props.TabIndex = r.Item("CTRLSCR_TAB_INDEX")
|
||||
props.ShowColumn = NotNull(r.Item("CONTROL_SHOW_COLUMN"), True)
|
||||
props.SQLCommand = New SQLValue(NotNull(r.Item("CONTROL_SQLCOMMAND_1"), ""))
|
||||
|
||||
Case "Checkbox"
|
||||
props = New CheckBoxProperties()
|
||||
' Default Values
|
||||
props.ID = r.Item("CONTROL_ID")
|
||||
props.Name = r.Item("CONTROL_NAME")
|
||||
props.Size = New Size(r.Item("CTRLSCR_WIDTH"), r.Item("CTRLSCR_HEIGHT"))
|
||||
props.Location = New Point(r.Item("CTRLSCR_X_LOC"), r.Item("CTRLSCR_Y_LOC"))
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
props.ColumnTitle = r.Item("CONTROL_COL_NAME")
|
||||
|
||||
props.Caption = r.Item("CTRLSCR_CAPTION")
|
||||
props.DefaultValue = ClassConverter.ToBooleanOrDefault(r.Item("CONTROL_DEF_VALUE"))
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
props.ShowColumn = NotNull(r.Item("CONTROL_SHOW_COLUMN"), True)
|
||||
props.TabStop = r.Item("CTRLSCR_TAB_STOP")
|
||||
props.TabIndex = r.Item("CTRLSCR_TAB_INDEX")
|
||||
|
||||
Case "RadioButton"
|
||||
props = New RadioButtonProperties()
|
||||
props.Caption = r.Item("CTRLSCR_CAPTION")
|
||||
props.ID = r.Item("CONTROL_ID")
|
||||
props.Name = r.Item("CONTROL_NAME")
|
||||
props.Size = New Size(r.Item("CTRLSCR_WIDTH"), r.Item("CTRLSCR_HEIGHT"))
|
||||
props.Location = New Point(r.Item("CTRLSCR_X_LOC"), r.Item("CTRLSCR_Y_LOC"))
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
|
||||
Case "Datepicker"
|
||||
props = New DateTimePickerProperties()
|
||||
' Default Values
|
||||
props.ID = r.Item("CONTROL_ID")
|
||||
props.Name = r.Item("CONTROL_NAME")
|
||||
props.Size = New Size(r.Item("CTRLSCR_WIDTH"), r.Item("CTRLSCR_HEIGHT"))
|
||||
props.Location = New Point(r.Item("CTRLSCR_X_LOC"), r.Item("CTRLSCR_Y_LOC"))
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
props.ColumnTitle = r.Item("CONTROL_COL_NAME")
|
||||
|
||||
props.DefaultValue = NotNull(r.Item("CONTROL_DEF_VALUE"), EnumDateTimePickerDefaultValueOptions.Empty)
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
props.ShowColumn = NotNull(r.Item("CONTROL_SHOW_COLUMN"), True)
|
||||
props.TabStop = r.Item("CTRLSCR_TAB_STOP")
|
||||
props.TabIndex = r.Item("CTRLSCR_TAB_INDEX")
|
||||
|
||||
Case "Datagridview"
|
||||
props = New DataGridViewProperties()
|
||||
' Default Values
|
||||
props.ID = r.Item("CONTROL_ID")
|
||||
props.Name = r.Item("CONTROL_NAME")
|
||||
props.Size = New Size(r.Item("CTRLSCR_WIDTH"), r.Item("CTRLSCR_HEIGHT"))
|
||||
props.Location = New Point(r.Item("CTRLSCR_X_LOC"), r.Item("CTRLSCR_Y_LOC"))
|
||||
|
||||
Case "Groupbox"
|
||||
props = New GroupBoxProperties()
|
||||
' Default Values
|
||||
props.ID = r.Item("CONTROL_ID")
|
||||
props.Name = r.Item("CONTROL_NAME")
|
||||
props.Size = New Size(r.Item("CTRLSCR_WIDTH"), r.Item("CTRLSCR_HEIGHT"))
|
||||
props.Location = New Point(r.Item("CTRLSCR_X_LOC"), r.Item("CTRLSCR_Y_LOC"))
|
||||
|
||||
props.Caption = r.Item("CTRLSCR_CAPTION")
|
||||
props.BackColor = IntToColor(r.Item("CTRLSCR_BACK_COLOR"))
|
||||
|
||||
Case "Picturebox"
|
||||
props = New PictureBoxProperties()
|
||||
' Default Values
|
||||
props.ID = r.Item("CONTROL_ID")
|
||||
props.Name = r.Item("CONTROL_NAME")
|
||||
props.Size = New Size(r.Item("CTRLSCR_WIDTH"), r.Item("CTRLSCR_HEIGHT"))
|
||||
props.Location = New Point(r.Item("CTRLSCR_X_LOC"), r.Item("CTRLSCR_Y_LOC"))
|
||||
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
|
||||
Case "ListBox"
|
||||
props = New ComboBoxProperties()
|
||||
' Default Values
|
||||
props.ID = r.Item("CONTROL_ID")
|
||||
props.Name = r.Item("CONTROL_NAME")
|
||||
props.Size = New Size(r.Item("CTRLSCR_WIDTH"), r.Item("CTRLSCR_HEIGHT"))
|
||||
props.Location = New Point(r.Item("CTRLSCR_X_LOC"), r.Item("CTRLSCR_Y_LOC"))
|
||||
|
||||
props.StaticList = ClassConverter.ToStringOrDefault(r.Item("CONTROL_STATIC_LIST"))
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
|
||||
Case "CheckedListBox"
|
||||
props = New ComboBoxProperties()
|
||||
' Default Values
|
||||
props.ID = r.Item("CONTROL_ID")
|
||||
props.Name = r.Item("CONTROL_NAME")
|
||||
props.Size = New Size(r.Item("CTRLSCR_WIDTH"), r.Item("CTRLSCR_HEIGHT"))
|
||||
props.Location = New Point(r.Item("CTRLSCR_X_LOC"), r.Item("CTRLSCR_Y_LOC"))
|
||||
|
||||
props.StaticList = ClassConverter.ToStringOrDefault(r.Item("CONTROL_STATIC_LIST"))
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
|
||||
Case "F_AddAppointment"
|
||||
props = New FunctionAddAppointment()
|
||||
props.Caption() = r.Item("CTRLSCR_CAPTION")
|
||||
|
||||
Dim controlId = DirectCast(ctrl.Tag, ClassControlMetadata).Id
|
||||
Dim f = ClassFunctionCommands.LoadFunction(controlId)
|
||||
Dim FromDateId, ToDateId, SubjectString, Subject2String, PlaceString, DescString
|
||||
|
||||
FromDateId = f.Item("INTEGER1")
|
||||
If IsDBNull(FromDateId) OrElse FromDateId = 0 Then
|
||||
props.FromDate = ""
|
||||
Else
|
||||
props.FromDate = GetName_for_ControlID(FromDateId, CURRENT_FORM_ID)
|
||||
End If
|
||||
|
||||
ToDateId = f.Item("INTEGER2")
|
||||
If IsDBNull(ToDateId) OrElse ToDateId = 0 Then
|
||||
props.ToDate = ""
|
||||
Else
|
||||
props.ToDate = GetName_for_ControlID(ToDateId, CURRENT_FORM_ID)
|
||||
End If
|
||||
|
||||
SubjectString = f.Item("STRING1")
|
||||
If IsDBNull(SubjectString) OrElse String.IsNullOrEmpty(SubjectString) Then
|
||||
props.Subject = ""
|
||||
Else
|
||||
props.Subject = SubjectString
|
||||
End If
|
||||
|
||||
Subject2String = f.Item("STRING2")
|
||||
If IsDBNull(Subject2String) OrElse String.IsNullOrEmpty(Subject2String) Then
|
||||
props.Subject2 = ""
|
||||
Else
|
||||
props.Subject2 = Subject2String
|
||||
End If
|
||||
|
||||
PlaceString = f.Item("STRING3")
|
||||
If IsDBNull(PlaceString) OrElse String.IsNullOrEmpty(PlaceString) Then
|
||||
props.Place = ""
|
||||
Else
|
||||
props.Place = PlaceString
|
||||
End If
|
||||
|
||||
DescString = f.Item("STRING4")
|
||||
If IsDBNull(DescString) OrElse String.IsNullOrEmpty(DescString) Then
|
||||
props.Description = ""
|
||||
Else
|
||||
props.Description = DescString
|
||||
End If
|
||||
|
||||
|
||||
Case "F_AddFormData"
|
||||
props = New FunctionAddFormData()
|
||||
props.Caption = r.Item("CTRLSCR_CAPTION")
|
||||
|
||||
Dim controlId = DirectCast(ctrl.Tag, ClassControlMetadata).Id
|
||||
Dim f = ClassFunctionCommands.LoadFunction(controlId)
|
||||
|
||||
Dim FormId = f.Item("INTEGER1")
|
||||
If IsDBNull(FormId) OrElse FormId = 0 Then
|
||||
props.FormID = 0
|
||||
Else
|
||||
props.FormID = FormId
|
||||
End If
|
||||
|
||||
Dim ScreenId = f.Item("INTEGER2")
|
||||
If IsDBNull(ScreenId) OrElse ScreenId = 0 Then
|
||||
props.ScreenID = 0
|
||||
Else
|
||||
props.ScreenID = ScreenId
|
||||
End If
|
||||
|
||||
End Select
|
||||
|
||||
CURRENT_CONTROL_ID = r.Item("CONTROL_ID")
|
||||
' Aktuelle Control Eigenschaften anzeigen
|
||||
Me.pgControlProperties.SelectedObject = props
|
||||
' Fenster Titel aktualisieren
|
||||
Me.Text = String.Format("Eigenschaften von {0}({1})", type, props.ID.ToString())
|
||||
' Control Name akutalisieren
|
||||
Me.tslControlName.Text = r.Item("CONTROL_NAME")
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in LoadControlProperties" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
' ADDED 25.11
|
||||
' Lade Control Eigenschaften und zeige diese an
|
||||
' Wird von frmLevelDesigner aufgerufen
|
||||
Public Sub LoadControlProperties(ctrl As Control)
|
||||
Try
|
||||
Dim sql As String = "SELECT CTRLSCR_ID FROM VWPMO_CONTROL_SCREEN WHERE CONTROL_NAME = '" & ctrl.Name & "' AND FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID
|
||||
Dim CTRLSCR_ID = ClassDatabase.Execute_Scalar(sql)
|
||||
If CTRLSCR_ID > 0 Then
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM VWPMO_CONTROL_SCREEN WHERE CTRLSCR_ID = " & CTRLSCR_ID)
|
||||
If DT.Rows.Count = 1 Then
|
||||
Dim row As DataRow = DT.Rows(0)
|
||||
Dim type As String = row.Item("CTRLTYPE_NAME")
|
||||
Dim props As Object = Nothing
|
||||
Dim fontcolor As Color
|
||||
Dim fontfamily As String
|
||||
Dim fontstyle As FontStyle
|
||||
Dim fontsize As Single
|
||||
Dim isreadonly As Boolean
|
||||
Dim isrequired As Boolean
|
||||
Dim columntitle As String
|
||||
Dim DefaultValue As String
|
||||
|
||||
|
||||
Select Case type
|
||||
Case "Label"
|
||||
props = New LabelProperties()
|
||||
props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
Case "Textbox"
|
||||
props = New TextBoxProperties()
|
||||
props.DefaultValue = ClassConverter.ToStringOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
|
||||
If Not IsDBNull(row.Item("CONTROL_FORMAT_TYPE")) Then
|
||||
props.Format = DirectCast([Enum].Parse(GetType(EnumFormatOptions), row.Item("CONTROL_FORMAT_TYPE")), Integer)
|
||||
Else
|
||||
props.Format = "String"
|
||||
End If
|
||||
Case "Combobox"
|
||||
props = New ComboBoxProperties()
|
||||
props.MasterDataId = row.Item("CTRLSCR_MASTER_DATA_ID")
|
||||
props.DefaultValue = ClassConverter.ToStringOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
|
||||
If Not IsDBNull(row.Item("CONTROL_FORMAT_TYPE")) Then
|
||||
props.Format = DirectCast([Enum].Parse(GetType(EnumFormatOptions), row.Item("CONTROL_FORMAT_TYPE")), Integer)
|
||||
Else
|
||||
props.Format = "String"
|
||||
End If
|
||||
|
||||
props.StaticList = ClassConverter.ToStringOrDefault(row.Item("CONTROL_STATIC_LIST"))
|
||||
Case "Checkbox"
|
||||
props = New CheckBoxProperties()
|
||||
props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
props.DefaultValue = ClassConverter.ToBooleanOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
Case "Datepicker"
|
||||
props = New DateTimePickerProperties()
|
||||
props.DefaultValue = NotNull(row.Item("CONTROL_DEF_VALUE"), EnumDateTimePickerDefaultValueOptions.Empty)
|
||||
'props.DefaultValue = ClassConverter.ToDateTimePickerOptionsOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
Case "Datagridview"
|
||||
props = New DataGridViewProperties()
|
||||
Case "Groupbox"
|
||||
props = New GroupBoxProperties()
|
||||
props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
props.BackColor = IntToColor(row.Item("CTRLSCR_BACK_COLOR"))
|
||||
Case "Picturebox"
|
||||
props = New PictureBoxProperties()
|
||||
Case "RadioButton"
|
||||
props = New RadioButtonProperties()
|
||||
props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
props.DefaultValue = ClassConverter.ToBooleanOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
props.IsRequired = row.Item("CONTROL_REQUIRED")
|
||||
Case "F_AddAppointment"
|
||||
props = New FunctionAddAppointment()
|
||||
Case "F_AddFormData"
|
||||
props = New FunctionAddFormData()
|
||||
Case "CheckedListBox"
|
||||
props = New ComboBoxProperties()
|
||||
props.StaticList = ClassConverter.ToStringOrDefault(row.Item("CONTROL_STATIC_LIST"))
|
||||
Case "ListBox"
|
||||
props = New ComboBoxProperties()
|
||||
props.StaticList = ClassConverter.ToStringOrDefault(row.Item("CONTROL_STATIC_LIST"))
|
||||
Case Else
|
||||
MsgBox("Unknown control type " & type, MsgBoxStyle.Exclamation, "Error in LoadControlProperties:")
|
||||
End Select
|
||||
|
||||
' Generic Properties
|
||||
props.ID = row.Item("CONTROL_ID")
|
||||
props.Name = row.Item("CONTROL_NAME")
|
||||
props.Size = New Size(row.Item("CTRLSCR_WIDTH"), row.Item("CTRLSCR_HEIGHT"))
|
||||
|
||||
'TODO: calc location
|
||||
'If row.Item("CONTROL_PARENT_ID") <> 0 Then
|
||||
' Dim parentSQL = "SELECT CTRLSCR_X_LOC, CTRLSCR_Y_LOC FROM VWPMO_VALUES WHERE = CONTROL_ID = " & row.Item("CONTROL_PARENT_ID")
|
||||
'End If
|
||||
|
||||
|
||||
props.Location = New Point(row.Item("CTRLSCR_X_LOC"), row.Item("CTRLSCR_Y_LOC"))
|
||||
|
||||
Me.Text = "Eigenschaften Control-ID: " & props.ID
|
||||
|
||||
If type = "F_AddAppointment" Then
|
||||
Dim ControlId = GetControlID_for_Name(ctrl.Name, CURRENT_FORM_ID)
|
||||
Dim dr = ClassFunctionCommands.LoadFunction(ControlId)
|
||||
|
||||
Dim FromDateId, ToDateId, SubjectString, Subject2String, PlaceString, DescString
|
||||
|
||||
FromDateId = dr.Item("INTEGER1")
|
||||
ToDateId = dr.Item("INTEGER2")
|
||||
SubjectString = dr.Item("STRING1")
|
||||
Subject2String = dr.Item("STRING2")
|
||||
PlaceString = dr.Item("STRING3")
|
||||
DescString = dr.Item("STRING4")
|
||||
|
||||
|
||||
If IsDBNull(FromDateId) OrElse FromDateId = 0 Then
|
||||
props.FromDate = ""
|
||||
Else
|
||||
props.FromDate = GetName_for_ControlID(FromDateId, CURRENT_FORM_ID)
|
||||
End If
|
||||
|
||||
If IsDBNull(ToDateId) OrElse ToDateId = 0 Then
|
||||
props.ToDate = ""
|
||||
Else
|
||||
props.ToDate = GetName_for_ControlID(ToDateId, CURRENT_FORM_ID)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If IsDBNull(SubjectString) OrElse String.IsNullOrEmpty(SubjectString) Then
|
||||
props.Subject = ""
|
||||
Else
|
||||
props.Subject = SubjectString
|
||||
End If
|
||||
|
||||
If IsDBNull(Subject2String) OrElse String.IsNullOrEmpty(Subject2String) Then
|
||||
props.Subject2 = ""
|
||||
Else
|
||||
props.Subject2 = Subject2String
|
||||
End If
|
||||
|
||||
If IsDBNull(PlaceString) OrElse String.IsNullOrEmpty(PlaceString) Then
|
||||
props.Place = ""
|
||||
Else
|
||||
props.Place = PlaceString
|
||||
End If
|
||||
|
||||
If IsDBNull(DescString) OrElse String.IsNullOrEmpty(DescString) Then
|
||||
props.Description = ""
|
||||
Else
|
||||
props.Description = DescString
|
||||
End If
|
||||
|
||||
props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
ElseIf type = "F_AddFormData" Then
|
||||
' TODO
|
||||
Dim ControlId = GetControlID_for_Name(ctrl.Name, CURRENT_FORM_ID)
|
||||
Dim dr = ClassFunctionCommands.LoadFunction(ControlId)
|
||||
|
||||
Dim FormId, ScreenId
|
||||
|
||||
FormId = dr.Item("INTEGER1")
|
||||
ScreenId = dr.Item("INTEGER2")
|
||||
|
||||
If IsDBNull(FormId) OrElse FormId = 0 Then
|
||||
props.FormID = 0
|
||||
Else
|
||||
props.FormID = FormId
|
||||
End If
|
||||
|
||||
If IsDBNull(ScreenId) OrElse ScreenId = 0 Then
|
||||
props.ScreenID = 0
|
||||
Else
|
||||
props.ScreenID = ScreenId
|
||||
End If
|
||||
|
||||
props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
End If
|
||||
|
||||
' Control Properties
|
||||
If Not type.Contains("F_") Then
|
||||
' PreSave and Convert Properties
|
||||
fontcolor = IntToColor(row.Item("CTRLSCR_FONT_COLOR"))
|
||||
fontfamily = row.Item("CTRLSCR_FONT_FAMILY")
|
||||
fontstyle = CType(row.Item("CTRLSCR_FONT_STYLE"), FontStyle)
|
||||
fontsize = CType(row.Item("CTRLSCR_FONT_SIZE"), Single)
|
||||
isreadonly = row.Item("CONTROL_READ_ONLY")
|
||||
isrequired = row.Item("CONTROL_REQUIRED")
|
||||
columntitle = row.Item("CONTROL_COL_NAME")
|
||||
|
||||
' Assign Properties to Class
|
||||
props.FontColor = fontcolor
|
||||
props.Font = New Font(fontfamily, fontsize, fontstyle)
|
||||
props.ColumnTitle = columntitle
|
||||
|
||||
'ReadOnly
|
||||
If type = "Textbox" Or type = "Datepicker" Or type = "Combobox" Or type = "Picturebox" Or type = "RadioButton" Or type = "Checkbox" Or type = "CheckedListBox" _
|
||||
Or type = "ListBox" Then
|
||||
props.IsReadOnly = row.Item("CONTROL_READ_ONLY")
|
||||
End If
|
||||
|
||||
' Nicht verfügbar für label
|
||||
If type = "Textbox" Or type = "Combobox" Or type = "Datepicker" Or type = "Checkbox" Or type = "RadioButton" Or type = "CheckedListBox" _
|
||||
Or type = "ListBox" Then
|
||||
props.TabStop = row.Item("CTRLSCR_TAB_STOP")
|
||||
props.TabIndex = row.Item("CTRLSCR_TAB_INDEX")
|
||||
|
||||
If Not IsDBNull(row.Item("CONTROL_SHOW_COLUMN")) Then
|
||||
props.ShowColumn = row.Item("CONTROL_SHOW_COLUMN")
|
||||
Else
|
||||
props.ShowColumn = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If type = "Textbox" Then
|
||||
props.Multiline = row.Item("CONTROL_MULTILINE")
|
||||
End If
|
||||
|
||||
If type = "Combobox" Or type = "CheckedListBox" Or type = "ListBox" Or type = "Textbox" Then
|
||||
If row.Item("CONTROL_SQLCOMMAND_1").ToString.Length > 1 Then
|
||||
Dim value As New SQLValue(row.Item("CONTROL_SQLCOMMAND_1").ToString)
|
||||
props.SQLCommand = value
|
||||
'props.SQLCommand = row.Item("CONTROL_SQLCOMMAND_1").ToString
|
||||
End If
|
||||
|
||||
'props.ParentFormID = row.Item("PARENT_FORM_ID")
|
||||
props.IsRequired = isrequired
|
||||
props.IsReadOnly = isreadonly
|
||||
End If
|
||||
|
||||
If type = "Label" Then
|
||||
If row.Item("CONTROL_SQLCOMMAND_1").ToString.Length > 1 Then
|
||||
Dim value As New SQLValue(row.Item("CONTROL_SQLCOMMAND_1").ToString)
|
||||
props.SQLCommand = value
|
||||
'props.SQLCommand = row.Item("CONTROL_SQLCOMMAND_1").ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
' Globale Variable setzen
|
||||
CURRENT_CONTROL_ID = row.Item("CONTROL_ID")
|
||||
Me.pgControlProperties.SelectedObject = props
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in loadcontrolproperties" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
' Aktualisiert die Position des akutellen Controls und speichert diese in der Klasse
|
||||
Public Sub UpdateControlLocation(ctrl As Control)
|
||||
CurrentProperties = Me.pgControlProperties.SelectedObject
|
||||
|
||||
If CurrentProperties IsNot Nothing Then
|
||||
CurrentProperties.Location = ctrl.Location
|
||||
Me.pgControlProperties.SelectedObject = CurrentProperties
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function SaveControlProperties(ctrl As Control, properties As Object) As Boolean
|
||||
If ClassControlCommands.UpdateControl(ctrl, properties) Then
|
||||
LoadControlProperties(ctrl)
|
||||
Return True
|
||||
Else
|
||||
MsgBox("Fehler beim Speichern der Elementeigenschaften.", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub btnSaveControl_Click(sender As Object, e As EventArgs) Handles btnSaveControl.Click
|
||||
If SaveControlProperties(CtrlBuilder.CurrentControl, pgControlProperties.SelectedObject) Then
|
||||
lblStatus.Text = "Änderungen gespeichert - " & Now
|
||||
lblStatus.Visible = True
|
||||
Else
|
||||
lblStatus.Visible = False
|
||||
' MsgBox("Änderungen gespeichert!", MsgBoxStyle.Information)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub pgControlProperties_PropertyValueChanged(s As Object, e As PropertyValueChangedEventArgs) Handles pgControlProperties.PropertyValueChanged
|
||||
|
||||
Dim oldValue As Object = e.OldValue
|
||||
Dim newValue As Object = e.ChangedItem.Value
|
||||
Dim currentProperty As String = e.ChangedItem.Label
|
||||
Dim ctrl As Control = CtrlBuilder.CurrentControl
|
||||
|
||||
Select Case currentProperty
|
||||
Case "Location"
|
||||
ctrl.Location = newValue
|
||||
Case "X"
|
||||
ctrl.Location = New Point(newValue, ctrl.Location.Y)
|
||||
Case "Y"
|
||||
ctrl.Location = New Point(ctrl.Location.X, newValue)
|
||||
Case "Size"
|
||||
ctrl.Size = newValue
|
||||
Case "Width"
|
||||
ctrl.Size = New Size(newValue, ctrl.Size.Height)
|
||||
Case "Height"
|
||||
ctrl.Size = New Size(ctrl.Size.Width, newValue)
|
||||
Case "Name"
|
||||
ctrl.Name = newValue
|
||||
Case "Caption"
|
||||
ctrl.Text = newValue
|
||||
Case "Font"
|
||||
ctrl.Font = newValue
|
||||
Case "FontColor"
|
||||
ctrl.ForeColor = newValue
|
||||
Case "BackColor"
|
||||
ctrl.BackColor = newValue
|
||||
End Select
|
||||
|
||||
|
||||
lblStatus.Text = "Ausstehende Änderungen"
|
||||
lblStatus.Visible = True
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click
|
||||
If MsgBox("Wollen Sie das Element wirklich löschen?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If IsGroupBox(CtrlBuilder.CurrentControl) Then
|
||||
Dim parentID As Integer = GetControlID_for_Name(CtrlBuilder.CurrentControl.Name, CURRENT_FORM_ID)
|
||||
Dim SQL = "SELECT GUID FROM TBPMO_CONTROL WHERE PARENT_CONTROL_ID = " & parentID
|
||||
Dim dt As DataTable = ClassDatabase.Return_Datatable(SQL)
|
||||
|
||||
For Each dr As DataRow In dt.Rows
|
||||
Dim id As Integer = dr.Item(0)
|
||||
ClassControlCommands.DeleteControl(id)
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
If ClassControlCommands.DeleteControl() = True Then
|
||||
MsgBox("Element gelöscht, Elemente werden neu geladen.", MsgBoxStyle.Information)
|
||||
CtrlBuilder.ClearControls()
|
||||
frmLevel_Designer.Instance.LoadControls()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub frmTool_ControlProperties_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
If Me.WindowState = FormWindowState.Maximized Then
|
||||
Me.WindowState = FormWindowState.Normal
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@ -208,14 +208,30 @@
|
||||
#Region "+++++ Form Events +++++"
|
||||
Private Sub frmLevel_Designer_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||
Try
|
||||
Dim sw
|
||||
|
||||
sw = Stopwatch.StartNew()
|
||||
ClassWindowLocation.SaveFormLocationSize(Me, 1, CURRENT_SCREEN_ID, "frmLevel_Designer")
|
||||
sw.Stop()
|
||||
Console.WriteLine(String.Format("SaveFormLocationSize took {0}ms", sw.ElapsedMilliseconds))
|
||||
|
||||
sw = Stopwatch.StartNew()
|
||||
My.Settings.Save()
|
||||
sw.Stop()
|
||||
Console.WriteLine(String.Format("My.Settings.Save took {0}ms", sw.ElapsedMilliseconds))
|
||||
|
||||
sw = Stopwatch.StartNew()
|
||||
RebuildView()
|
||||
sw.Stop()
|
||||
Console.WriteLine(String.Format("RebuildView took {0}ms", sw.ElapsedMilliseconds))
|
||||
|
||||
Dim wid As Integer = Me.Width
|
||||
Dim update_sizepnl As String = "UPDATE TBPMO_FORM_VIEW SET HEIGHT = " & pnlDesigner.Height & ",WIDTH = " & wid & " where FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID
|
||||
ClassDatabase.Execute_non_Query(update_sizepnl)
|
||||
frmTool_ControlProperties.Instance.Close()
|
||||
frmTool_ControlDesigner.Instance.Close()
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
@ -274,7 +290,7 @@
|
||||
|
||||
Dim parent As GroupBox = Nothing
|
||||
If (dr.Item("CONTROL_PARENT_ID") <> 0) Then
|
||||
Dim parentname As String = GetName_for_ControlID(dr.Item("CONTROL_PARENT_ID"), CURRENT_FORM_ID)
|
||||
Dim parentname As String = Get_Name_for_ControlID(dr.Item("CONTROL_PARENT_ID"), CURRENT_FORM_ID)
|
||||
parent = CtrlBuilder.GetControlByName(parentname)
|
||||
End If
|
||||
|
||||
@ -526,7 +542,8 @@
|
||||
|
||||
' Control Eigenschaften laden
|
||||
frmTool_ControlProperties.Instance.pgControlProperties.Enabled = True
|
||||
frmTool_ControlProperties.Instance.LoadControlProperties(CtrlBuilder.CurrentControl)
|
||||
'frmTool_ControlProperties.Instance.LoadControlProperties(CtrlBuilder.CurrentControl)
|
||||
frmTool_ControlProperties.Instance.LoadControlPropertiesNeu(CtrlBuilder.CurrentControl)
|
||||
End Sub
|
||||
|
||||
|
||||
@ -651,6 +668,12 @@
|
||||
|
||||
Private Function RebuildView()
|
||||
Try
|
||||
'Dim sql = "EXECUTE PRPMO_CREATE_SQL " & CURRENT_FORM_ID
|
||||
'ClassDatabase.Execute_non_Query_Async(sql)
|
||||
'Dim sql2 = "EXECUTE PRPMO_CREATE_TEMP_VIEWS"
|
||||
'ClassDatabase.Execute_non_Query_Async(sql2)
|
||||
'Return True
|
||||
|
||||
Dim noerror As Boolean = False
|
||||
Dim sql = "EXECUTE PRPMO_CREATE_SQL " & CURRENT_FORM_ID
|
||||
noerror = ClassDatabase.Execute_non_Query(sql)
|
||||
|
||||
18
app/DD-Record-Organiser/frmMain.Designer.vb
generated
18
app/DD-Record-Organiser/frmMain.Designer.vb
generated
@ -135,11 +135,11 @@ Partial Class frmMain
|
||||
'
|
||||
'ribbonMain
|
||||
'
|
||||
resources.ApplyResources(Me.ribbonMain, "ribbonMain")
|
||||
Me.ribbonMain.ApplicationButtonDropDownControl = Me.MainMenu
|
||||
Me.ribbonMain.BackColor = System.Drawing.Color.DarkGray
|
||||
Me.ribbonMain.ExpandCollapseItem.Id = 0
|
||||
Me.ribbonMain.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.ribbonMain.ExpandCollapseItem, Me.LabelMachine, Me.LabelUser, Me.LabelLoggedIn, Me.LabelVersion, Me.itemInfo, Me.itemExit, Me.BarButtonItem1, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarButtonItem5, Me.BarButtonItem6, Me.BarButtonItem7, Me.BarButtonItem8, Me.BarButtonItem9, Me.itemSettings, Me.BarButtonItem2, Me.BarButtonItem10, Me.BarButtonItem12, Me.BarButtonItem13, Me.BarButtonItem14, Me.BarButtonItem15, Me.BarButtonItem16, Me.BarButtonItem17, Me.BarButtonItem18})
|
||||
resources.ApplyResources(Me.ribbonMain, "ribbonMain")
|
||||
Me.ribbonMain.MaxItemId = 32
|
||||
Me.ribbonMain.Name = "ribbonMain"
|
||||
Me.ribbonMain.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.pageHome, Me.pageForms, Me.pageAdmin})
|
||||
@ -152,10 +152,6 @@ Partial Class frmMain
|
||||
Me.MainMenu.ItemLinks.Add(Me.itemInfo)
|
||||
Me.MainMenu.ItemLinks.Add(Me.itemSettings)
|
||||
Me.MainMenu.ItemLinks.Add(Me.itemExit)
|
||||
Me.MainMenu.MenuAppearance.HeaderItemAppearance.FontSizeDelta = CType(resources.GetObject("MainMenu.MenuAppearance.HeaderItemAppearance.FontSizeDelta"), Integer)
|
||||
Me.MainMenu.MenuAppearance.HeaderItemAppearance.FontStyleDelta = CType(resources.GetObject("MainMenu.MenuAppearance.HeaderItemAppearance.FontStyleDelta"), System.Drawing.FontStyle)
|
||||
Me.MainMenu.MenuAppearance.HeaderItemAppearance.GradientMode = CType(resources.GetObject("MainMenu.MenuAppearance.HeaderItemAppearance.GradientMode"), System.Drawing.Drawing2D.LinearGradientMode)
|
||||
Me.MainMenu.MenuAppearance.HeaderItemAppearance.Image = CType(resources.GetObject("MainMenu.MenuAppearance.HeaderItemAppearance.Image"), System.Drawing.Image)
|
||||
Me.MainMenu.Name = "MainMenu"
|
||||
Me.MainMenu.Ribbon = Me.ribbonMain
|
||||
'
|
||||
@ -369,10 +365,6 @@ Partial Class frmMain
|
||||
'pageForms
|
||||
'
|
||||
Me.pageForms.Appearance.BackColor = CType(resources.GetObject("pageForms.Appearance.BackColor"), System.Drawing.Color)
|
||||
Me.pageForms.Appearance.FontSizeDelta = CType(resources.GetObject("pageForms.Appearance.FontSizeDelta"), Integer)
|
||||
Me.pageForms.Appearance.FontStyleDelta = CType(resources.GetObject("pageForms.Appearance.FontStyleDelta"), System.Drawing.FontStyle)
|
||||
Me.pageForms.Appearance.GradientMode = CType(resources.GetObject("pageForms.Appearance.GradientMode"), System.Drawing.Drawing2D.LinearGradientMode)
|
||||
Me.pageForms.Appearance.Image = CType(resources.GetObject("pageForms.Appearance.Image"), System.Drawing.Image)
|
||||
Me.pageForms.Appearance.Options.UseBackColor = True
|
||||
Me.pageForms.Image = Global.DD_Record_Organiser.My.Resources.Resources.application_form
|
||||
Me.pageForms.Name = "pageForms"
|
||||
@ -431,11 +423,11 @@ Partial Class frmMain
|
||||
'
|
||||
'RibbonStatusBar1
|
||||
'
|
||||
resources.ApplyResources(Me.RibbonStatusBar1, "RibbonStatusBar1")
|
||||
Me.RibbonStatusBar1.ItemLinks.Add(Me.LabelMachine)
|
||||
Me.RibbonStatusBar1.ItemLinks.Add(Me.LabelUser)
|
||||
Me.RibbonStatusBar1.ItemLinks.Add(Me.LabelLoggedIn)
|
||||
Me.RibbonStatusBar1.ItemLinks.Add(Me.LabelVersion)
|
||||
resources.ApplyResources(Me.RibbonStatusBar1, "RibbonStatusBar1")
|
||||
Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
|
||||
Me.RibbonStatusBar1.Ribbon = Me.ribbonMain
|
||||
'
|
||||
@ -457,14 +449,10 @@ Partial Class frmMain
|
||||
'
|
||||
'frmMain
|
||||
'
|
||||
resources.ApplyResources(Me, "$this")
|
||||
Me.Appearance.BackColor = CType(resources.GetObject("frmMain.Appearance.BackColor"), System.Drawing.Color)
|
||||
Me.Appearance.FontSizeDelta = CType(resources.GetObject("frmMain.Appearance.FontSizeDelta"), Integer)
|
||||
Me.Appearance.FontStyleDelta = CType(resources.GetObject("frmMain.Appearance.FontStyleDelta"), System.Drawing.FontStyle)
|
||||
Me.Appearance.GradientMode = CType(resources.GetObject("frmMain.Appearance.GradientMode"), System.Drawing.Drawing2D.LinearGradientMode)
|
||||
Me.Appearance.Image = CType(resources.GetObject("frmMain.Appearance.Image"), System.Drawing.Image)
|
||||
Me.Appearance.Options.UseBackColor = True
|
||||
Me.Appearance.Options.UseFont = True
|
||||
resources.ApplyResources(Me, "$this")
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.RibbonStatusBar1)
|
||||
Me.Controls.Add(Me.ribbonMain)
|
||||
|
||||
@ -1765,6 +1765,18 @@
|
||||
<data name="RibbonPageGroup1.Text" xml:space="preserve">
|
||||
<value>SQL Configuration</value>
|
||||
</data>
|
||||
<data name="ribbonMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1522, 150</value>
|
||||
</data>
|
||||
<data name="RibbonStatusBar1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 667</value>
|
||||
</data>
|
||||
<data name="RibbonStatusBar1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1522, 23</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1522, 690</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAgIUAAAEAGAD4zwAAFgAAACgAAACAAAAACgEAAAEAGAAAAAAAAAAAAEgAAABIAAAAAAAAAAAA
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -27,6 +27,7 @@ Partial Class frmTool_ControlProperties
|
||||
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||
Me.btnSaveControl = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.tslControlName = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
||||
Me.lblStatus = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.ToolStrip1.SuspendLayout()
|
||||
@ -40,7 +41,7 @@ Partial Class frmTool_ControlProperties
|
||||
'
|
||||
'ToolStrip1
|
||||
'
|
||||
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.btnSaveControl, Me.ToolStripButton1})
|
||||
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.btnSaveControl, Me.ToolStripButton1, Me.tslControlName})
|
||||
resources.ApplyResources(Me.ToolStrip1, "ToolStrip1")
|
||||
Me.ToolStrip1.Name = "ToolStrip1"
|
||||
'
|
||||
@ -56,6 +57,12 @@ Partial Class frmTool_ControlProperties
|
||||
resources.ApplyResources(Me.ToolStripButton1, "ToolStripButton1")
|
||||
Me.ToolStripButton1.Name = "ToolStripButton1"
|
||||
'
|
||||
'tslControlName
|
||||
'
|
||||
Me.tslControlName.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
|
||||
resources.ApplyResources(Me.tslControlName, "tslControlName")
|
||||
Me.tslControlName.Name = "tslControlName"
|
||||
'
|
||||
'StatusStrip1
|
||||
'
|
||||
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.lblStatus})
|
||||
@ -92,4 +99,5 @@ Partial Class frmTool_ControlProperties
|
||||
Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip
|
||||
Friend WithEvents lblStatus As System.Windows.Forms.ToolStripStatusLabel
|
||||
Friend WithEvents ToolStripButton1 As System.Windows.Forms.ToolStripButton
|
||||
Friend WithEvents tslControlName As System.Windows.Forms.ToolStripLabel
|
||||
End Class
|
||||
|
||||
@ -168,6 +168,15 @@
|
||||
<data name="ToolStripButton1.Text" xml:space="preserve">
|
||||
<value>Löschen</value>
|
||||
</data>
|
||||
<data name="tslControlName.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI Semibold, 9pt, style=Bold</value>
|
||||
</data>
|
||||
<data name="tslControlName.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>78, 22</value>
|
||||
</data>
|
||||
<data name="tslControlName.Text" xml:space="preserve">
|
||||
<value>ControlName</value>
|
||||
</data>
|
||||
<data name="ToolStrip1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
@ -195,15 +204,6 @@
|
||||
<metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>124, 17</value>
|
||||
</metadata>
|
||||
<data name="lblStatus.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 17</value>
|
||||
</data>
|
||||
<data name="lblStatus.Text" xml:space="preserve">
|
||||
<value>erfolgreich</value>
|
||||
</data>
|
||||
<data name="lblStatus.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="StatusStrip1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 353</value>
|
||||
</data>
|
||||
@ -228,6 +228,15 @@
|
||||
<data name=">>StatusStrip1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="lblStatus.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 17</value>
|
||||
</data>
|
||||
<data name="lblStatus.Text" xml:space="preserve">
|
||||
<value>erfolgreich</value>
|
||||
</data>
|
||||
<data name="lblStatus.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@ -255,6 +264,12 @@
|
||||
<data name=">>ToolStripButton1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tslControlName.Name" xml:space="preserve">
|
||||
<value>tslControlName</value>
|
||||
</data>
|
||||
<data name=">>tslControlName.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>lblStatus.Name" xml:space="preserve">
|
||||
<value>lblStatus</value>
|
||||
</data>
|
||||
|
||||
@ -25,275 +25,485 @@
|
||||
|
||||
Public Sub LoadControlPropertiesNeu(ctrl As Control)
|
||||
Try
|
||||
'TODO: LoadControlProperties Neuschreiben!!!
|
||||
Dim sql As String = String.Format("SELECT * FROM VWPMO_CONTROL_SCREEN WHERE CONTROL_ID = {0}", DirectCast(ctrl.Tag, ClassControlMetadata).Id)
|
||||
Dim dt As DataTable = ClassDatabase.Execute_Scalar(sql)
|
||||
Dim dt As DataTable = ClassDatabase.Return_Datatable(sql)
|
||||
Dim props As Object = Nothing
|
||||
Dim row As DataRow = Nothing
|
||||
Dim r As DataRow = Nothing
|
||||
Dim type As String = Nothing
|
||||
|
||||
If dt.Rows.Count <> 1 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
row = dt.Rows(0)
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in loadcontrolproperties" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
' ADDED 25.11
|
||||
' Lade Control Eigenschaften und zeige diese an
|
||||
' Wird von frmLevelDesigner aufgerufen
|
||||
Public Sub LoadControlProperties(ctrl As Control)
|
||||
Try
|
||||
Dim sql As String = "SELECT CTRLSCR_ID FROM VWPMO_CONTROL_SCREEN WHERE CONTROL_NAME = '" & ctrl.Name & "' AND FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID
|
||||
Dim CTRLSCR_ID = ClassDatabase.Execute_Scalar(sql)
|
||||
If CTRLSCR_ID > 0 Then
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM VWPMO_CONTROL_SCREEN WHERE CTRLSCR_ID = " & CTRLSCR_ID)
|
||||
If DT.Rows.Count = 1 Then
|
||||
Dim row As DataRow = DT.Rows(0)
|
||||
Dim type As String = row.Item("CTRLTYPE_NAME")
|
||||
Dim props As Object = Nothing
|
||||
Dim fontcolor As Color
|
||||
Dim fontfamily As String
|
||||
Dim fontstyle As FontStyle
|
||||
Dim fontsize As Single
|
||||
Dim isreadonly As Boolean
|
||||
Dim isrequired As Boolean
|
||||
Dim columntitle As String
|
||||
Dim DefaultValue As String
|
||||
|
||||
r = dt.Rows(0)
|
||||
type = r.Item("CTRLTYPE_NAME")
|
||||
|
||||
'Props Object initialisieren
|
||||
Select Case type
|
||||
Case "Label"
|
||||
props = New LabelProperties()
|
||||
props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
Case "Textbox"
|
||||
props = New TextBoxProperties()
|
||||
props.DefaultValue = ClassConverter.ToStringOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
|
||||
If Not IsDBNull(row.Item("CONTROL_FORMAT_TYPE")) Then
|
||||
props.Format = DirectCast([Enum].Parse(GetType(EnumFormatOptions), row.Item("CONTROL_FORMAT_TYPE")), Integer)
|
||||
Else
|
||||
props.Format = "String"
|
||||
End If
|
||||
Case "Combobox"
|
||||
props = New ComboBoxProperties()
|
||||
props.MasterDataId = row.Item("CTRLSCR_MASTER_DATA_ID")
|
||||
props.DefaultValue = ClassConverter.ToStringOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
|
||||
If Not IsDBNull(row.Item("CONTROL_FORMAT_TYPE")) Then
|
||||
props.Format = DirectCast([Enum].Parse(GetType(EnumFormatOptions), row.Item("CONTROL_FORMAT_TYPE")), Integer)
|
||||
Else
|
||||
props.Format = "String"
|
||||
End If
|
||||
|
||||
props.StaticList = ClassConverter.ToStringOrDefault(row.Item("CONTROL_STATIC_LIST"))
|
||||
Case "Checkbox"
|
||||
props = New CheckBoxProperties()
|
||||
props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
props.DefaultValue = ClassConverter.ToBooleanOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
Case "Datepicker"
|
||||
props = New DateTimePickerProperties()
|
||||
props.DefaultValue = NotNull(row.Item("CONTROL_DEF_VALUE"), EnumDateTimePickerDefaultValueOptions.Empty)
|
||||
'props.DefaultValue = ClassConverter.ToDateTimePickerOptionsOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
Case "Datagridview"
|
||||
props = New DataGridViewProperties()
|
||||
Case "Groupbox"
|
||||
props = New GroupBoxProperties()
|
||||
props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
props.BackColor = IntToColor(row.Item("CTRLSCR_BACK_COLOR"))
|
||||
Case "Picturebox"
|
||||
props = New PictureBoxProperties()
|
||||
Case "RadioButton"
|
||||
props = New RadioButtonProperties()
|
||||
props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
props.DefaultValue = ClassConverter.ToBooleanOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
props.IsRequired = row.Item("CONTROL_REQUIRED")
|
||||
Case "F_AddAppointment"
|
||||
props = New FunctionAddAppointment()
|
||||
Case "F_AddFormData"
|
||||
props = New FunctionAddFormData()
|
||||
Case "CheckedListBox"
|
||||
props = New ComboBoxProperties()
|
||||
props.StaticList = ClassConverter.ToStringOrDefault(row.Item("CONTROL_STATIC_LIST"))
|
||||
Case "ListBox"
|
||||
props = New ComboBoxProperties()
|
||||
props.StaticList = ClassConverter.ToStringOrDefault(row.Item("CONTROL_STATIC_LIST"))
|
||||
Case Else
|
||||
MsgBox("Unknown control type " & type, MsgBoxStyle.Exclamation, "Error in LoadControlProperties:")
|
||||
Case "Label" : props = New LabelProperties()
|
||||
Case "Textbox" : props = New TextBoxProperties()
|
||||
Case "Combobox" : props = New ComboBoxProperties()
|
||||
Case "Checkbox" : props = New CheckBoxProperties()
|
||||
Case "RadioButton" : props = New RadioButtonProperties()
|
||||
Case "Datepicker" : props = New DateTimePickerProperties()
|
||||
Case "Datagridview" : props = New DataGridViewProperties()
|
||||
Case "Groupbox" : props = New GroupBoxProperties()
|
||||
Case "Picturebox" : props = New PictureBoxProperties()
|
||||
Case "ListBox" : props = New ComboBoxProperties()
|
||||
Case "CheckedListBox" : props = New ComboBoxProperties()
|
||||
Case "F_AddAppointment" : props = New FunctionAddAppointment()
|
||||
Case "F_AddFormData" : props = New FunctionAddFormData()
|
||||
End Select
|
||||
|
||||
' Generic Properties
|
||||
props.ID = row.Item("CONTROL_ID")
|
||||
props.Name = row.Item("CONTROL_NAME")
|
||||
props.Size = New Size(row.Item("CTRLSCR_WIDTH"), row.Item("CTRLSCR_HEIGHT"))
|
||||
'Generische Properties laden
|
||||
props.ID = r.Item("CONTROL_ID")
|
||||
props.Name = r.Item("CONTROL_NAME")
|
||||
props.Size = New Size(r.Item("CTRLSCR_WIDTH"), r.Item("CTRLSCR_HEIGHT"))
|
||||
props.Location = New Point(r.Item("CTRLSCR_X_LOC"), r.Item("CTRLSCR_Y_LOC"))
|
||||
|
||||
'TODO: calc location
|
||||
'If row.Item("CONTROL_PARENT_ID") <> 0 Then
|
||||
' Dim parentSQL = "SELECT CTRLSCR_X_LOC, CTRLSCR_Y_LOC FROM VWPMO_VALUES WHERE = CONTROL_ID = " & row.Item("CONTROL_PARENT_ID")
|
||||
'End If
|
||||
'Control-spezifische Properties laden
|
||||
Select Case type
|
||||
Case "Label"
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
props.ColumnTitle = r.Item("CONTROL_COL_NAME")
|
||||
props.Caption = r.Item("CTRLSCR_CAPTION")
|
||||
props.SQLCommand = New SQLValue(NotNull(r.Item("CONTROL_SQLCOMMAND_1"), ""))
|
||||
|
||||
Case "Textbox"
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
props.ColumnTitle = r.Item("CONTROL_COL_NAME")
|
||||
props.DefaultValue = ClassConverter.ToStringOrDefault(r.Item("CONTROL_DEF_VALUE"))
|
||||
props.Format = NotNull([Enum].Parse(GetType(EnumFormatOptions), r.Item("CONTROL_FORMAT_TYPE")), EnumFormatOptions.String)
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
props.TabStop = r.Item("CTRLSCR_TAB_STOP")
|
||||
props.TabIndex = r.Item("CTRLSCR_TAB_INDEX")
|
||||
props.ShowColumn = NotNull(r.Item("CONTROL_SHOW_COLUMN"), True)
|
||||
props.Multiline = r.Item("CONTROL_MULTILINE")
|
||||
props.SQLCommand = New SQLValue(NotNull(r.Item("CONTROL_SQLCOMMAND_1"), ""))
|
||||
|
||||
props.Location = New Point(row.Item("CTRLSCR_X_LOC"), row.Item("CTRLSCR_Y_LOC"))
|
||||
Case "Combobox"
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
props.ColumnTitle = r.Item("CONTROL_COL_NAME")
|
||||
props.DefaultValue = ClassConverter.ToStringOrDefault(r.Item("CONTROL_DEF_VALUE"))
|
||||
props.MasterDataId = r.Item("CTRLSCR_MASTER_DATA_ID")
|
||||
props.Format = NotNull([Enum].Parse(GetType(EnumFormatOptions), r.Item("CONTROL_FORMAT_TYPE")), EnumFormatOptions.String)
|
||||
props.StaticList = NotNull(r.Item("CONTROL_STATIC_LIST"), "")
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
props.TabStop = r.Item("CTRLSCR_TAB_STOP")
|
||||
props.TabIndex = r.Item("CTRLSCR_TAB_INDEX")
|
||||
props.ShowColumn = NotNull(r.Item("CONTROL_SHOW_COLUMN"), True)
|
||||
props.SQLCommand = New SQLValue(NotNull(r.Item("CONTROL_SQLCOMMAND_1"), ""))
|
||||
|
||||
Me.Text = "Eigenschaften Control-ID: " & props.ID
|
||||
Case "Checkbox"
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
props.ColumnTitle = r.Item("CONTROL_COL_NAME")
|
||||
props.Caption = r.Item("CTRLSCR_CAPTION")
|
||||
props.DefaultValue = ClassConverter.ToBooleanOrDefault(r.Item("CONTROL_DEF_VALUE"))
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
props.ShowColumn = NotNull(r.Item("CONTROL_SHOW_COLUMN"), True)
|
||||
props.TabStop = r.Item("CTRLSCR_TAB_STOP")
|
||||
props.TabIndex = r.Item("CTRLSCR_TAB_INDEX")
|
||||
|
||||
If type = "F_AddAppointment" Then
|
||||
Dim ControlId = GetControlID_for_Name(ctrl.Name, CURRENT_FORM_ID)
|
||||
Dim dr = ClassFunctionCommands.LoadFunction(ControlId)
|
||||
Case "RadioButton"
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
|
||||
Case "Datepicker"
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
props.ColumnTitle = r.Item("CONTROL_COL_NAME")
|
||||
|
||||
props.DefaultValue = NotNull(r.Item("CONTROL_DEF_VALUE"), EnumDateTimePickerDefaultValueOptions.Empty)
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
props.ShowColumn = NotNull(r.Item("CONTROL_SHOW_COLUMN"), True)
|
||||
props.TabStop = r.Item("CTRLSCR_TAB_STOP")
|
||||
props.TabIndex = r.Item("CTRLSCR_TAB_INDEX")
|
||||
|
||||
Case "Datagridview"
|
||||
' Keine zusätzliche Properties
|
||||
|
||||
Case "Groupbox"
|
||||
props.Caption = r.Item("CTRLSCR_CAPTION")
|
||||
props.BackColor = IntToColor(r.Item("CTRLSCR_BACK_COLOR"))
|
||||
|
||||
Case "Picturebox"
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
|
||||
Case "ListBox"
|
||||
props.StaticList = ClassConverter.ToStringOrDefault(r.Item("CONTROL_STATIC_LIST"))
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
|
||||
Case "CheckedListBox"
|
||||
props.StaticList = ClassConverter.ToStringOrDefault(r.Item("CONTROL_STATIC_LIST"))
|
||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||
|
||||
Case "F_AddAppointment"
|
||||
props.Caption() = r.Item("CTRLSCR_CAPTION")
|
||||
|
||||
Dim controlId = DirectCast(ctrl.Tag, ClassControlMetadata).Id
|
||||
Dim f = ClassFunctionCommands.LoadFunction(controlId)
|
||||
Dim FromDateId, ToDateId, SubjectString, Subject2String, PlaceString, DescString
|
||||
|
||||
FromDateId = dr.Item("INTEGER1")
|
||||
ToDateId = dr.Item("INTEGER2")
|
||||
SubjectString = dr.Item("STRING1")
|
||||
Subject2String = dr.Item("STRING2")
|
||||
PlaceString = dr.Item("STRING3")
|
||||
DescString = dr.Item("STRING4")
|
||||
|
||||
|
||||
FromDateId = f.Item("INTEGER1")
|
||||
If IsDBNull(FromDateId) OrElse FromDateId = 0 Then
|
||||
props.FromDate = ""
|
||||
Else
|
||||
props.FromDate = GetName_for_ControlID(FromDateId, CURRENT_FORM_ID)
|
||||
props.FromDate = Get_Name_for_ControlID(FromDateId, CURRENT_FORM_ID)
|
||||
End If
|
||||
|
||||
ToDateId = f.Item("INTEGER2")
|
||||
If IsDBNull(ToDateId) OrElse ToDateId = 0 Then
|
||||
props.ToDate = ""
|
||||
Else
|
||||
props.ToDate = GetName_for_ControlID(ToDateId, CURRENT_FORM_ID)
|
||||
props.ToDate = Get_Name_for_ControlID(ToDateId, CURRENT_FORM_ID)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
SubjectString = f.Item("STRING1")
|
||||
If IsDBNull(SubjectString) OrElse String.IsNullOrEmpty(SubjectString) Then
|
||||
props.Subject = ""
|
||||
Else
|
||||
props.Subject = SubjectString
|
||||
End If
|
||||
|
||||
Subject2String = f.Item("STRING2")
|
||||
If IsDBNull(Subject2String) OrElse String.IsNullOrEmpty(Subject2String) Then
|
||||
props.Subject2 = ""
|
||||
Else
|
||||
props.Subject2 = Subject2String
|
||||
End If
|
||||
|
||||
PlaceString = f.Item("STRING3")
|
||||
If IsDBNull(PlaceString) OrElse String.IsNullOrEmpty(PlaceString) Then
|
||||
props.Place = ""
|
||||
Else
|
||||
props.Place = PlaceString
|
||||
End If
|
||||
|
||||
DescString = f.Item("STRING4")
|
||||
If IsDBNull(DescString) OrElse String.IsNullOrEmpty(DescString) Then
|
||||
props.Description = ""
|
||||
Else
|
||||
props.Description = DescString
|
||||
End If
|
||||
|
||||
props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
ElseIf type = "F_AddFormData" Then
|
||||
' TODO
|
||||
Dim ControlId = GetControlID_for_Name(ctrl.Name, CURRENT_FORM_ID)
|
||||
Dim dr = ClassFunctionCommands.LoadFunction(ControlId)
|
||||
|
||||
Dim FormId, ScreenId
|
||||
Case "F_AddFormData"
|
||||
props.Caption = r.Item("CTRLSCR_CAPTION")
|
||||
|
||||
FormId = dr.Item("INTEGER1")
|
||||
ScreenId = dr.Item("INTEGER2")
|
||||
Dim controlId = DirectCast(ctrl.Tag, ClassControlMetadata).Id
|
||||
Dim f = ClassFunctionCommands.LoadFunction(controlId)
|
||||
|
||||
Dim FormId = f.Item("INTEGER1")
|
||||
If IsDBNull(FormId) OrElse FormId = 0 Then
|
||||
props.FormID = 0
|
||||
Else
|
||||
props.FormID = FormId
|
||||
End If
|
||||
|
||||
Dim ScreenId = f.Item("INTEGER2")
|
||||
If IsDBNull(ScreenId) OrElse ScreenId = 0 Then
|
||||
props.ScreenID = 0
|
||||
Else
|
||||
props.ScreenID = ScreenId
|
||||
End If
|
||||
|
||||
props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
End If
|
||||
End Select
|
||||
|
||||
' Control Properties
|
||||
If Not type.Contains("F_") Then
|
||||
' PreSave and Convert Properties
|
||||
fontcolor = IntToColor(row.Item("CTRLSCR_FONT_COLOR"))
|
||||
fontfamily = row.Item("CTRLSCR_FONT_FAMILY")
|
||||
fontstyle = CType(row.Item("CTRLSCR_FONT_STYLE"), FontStyle)
|
||||
fontsize = CType(row.Item("CTRLSCR_FONT_SIZE"), Single)
|
||||
isreadonly = row.Item("CONTROL_READ_ONLY")
|
||||
isrequired = row.Item("CONTROL_REQUIRED")
|
||||
columntitle = row.Item("CONTROL_COL_NAME")
|
||||
|
||||
' Assign Properties to Class
|
||||
props.FontColor = fontcolor
|
||||
props.Font = New Font(fontfamily, fontsize, fontstyle)
|
||||
props.ColumnTitle = columntitle
|
||||
|
||||
'ReadOnly
|
||||
If type = "Textbox" Or type = "Datepicker" Or type = "Combobox" Or type = "Picturebox" Or type = "RadioButton" Or type = "Checkbox" Or type = "CheckedListBox" _
|
||||
Or type = "ListBox" Then
|
||||
props.IsReadOnly = row.Item("CONTROL_READ_ONLY")
|
||||
End If
|
||||
|
||||
' Nicht verfügbar für label
|
||||
If type = "Textbox" Or type = "Combobox" Or type = "Datepicker" Or type = "Checkbox" Or type = "RadioButton" Or type = "CheckedListBox" _
|
||||
Or type = "ListBox" Then
|
||||
props.TabStop = row.Item("CTRLSCR_TAB_STOP")
|
||||
props.TabIndex = row.Item("CTRLSCR_TAB_INDEX")
|
||||
|
||||
If Not IsDBNull(row.Item("CONTROL_SHOW_COLUMN")) Then
|
||||
props.ShowColumn = row.Item("CONTROL_SHOW_COLUMN")
|
||||
Else
|
||||
props.ShowColumn = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If type = "Textbox" Then
|
||||
props.Multiline = row.Item("CONTROL_MULTILINE")
|
||||
End If
|
||||
|
||||
If type = "Combobox" Or type = "CheckedListBox" Or type = "ListBox" Or type = "Textbox" Then
|
||||
If row.Item("CONTROL_SQLCOMMAND_1").ToString.Length > 1 Then
|
||||
Dim value As New SQLValue(row.Item("CONTROL_SQLCOMMAND_1").ToString)
|
||||
props.SQLCommand = value
|
||||
'props.SQLCommand = row.Item("CONTROL_SQLCOMMAND_1").ToString
|
||||
End If
|
||||
|
||||
'props.ParentFormID = row.Item("PARENT_FORM_ID")
|
||||
props.IsRequired = isrequired
|
||||
props.IsReadOnly = isreadonly
|
||||
End If
|
||||
|
||||
If type = "Label" Then
|
||||
If row.Item("CONTROL_SQLCOMMAND_1").ToString.Length > 1 Then
|
||||
Dim value As New SQLValue(row.Item("CONTROL_SQLCOMMAND_1").ToString)
|
||||
props.SQLCommand = value
|
||||
'props.SQLCommand = row.Item("CONTROL_SQLCOMMAND_1").ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
' Globale Variable setzen
|
||||
CURRENT_CONTROL_ID = row.Item("CONTROL_ID")
|
||||
CURRENT_CONTROL_ID = r.Item("CONTROL_ID")
|
||||
' Aktuelle Control Eigenschaften anzeigen
|
||||
Me.pgControlProperties.SelectedObject = props
|
||||
End If
|
||||
End If
|
||||
' Fenster Titel aktualisieren
|
||||
Me.Text = String.Format("Eigenschaften von {0}({1})", type, props.ID.ToString())
|
||||
' Control Name akutalisieren
|
||||
Me.tslControlName.Text = r.Item("CONTROL_NAME")
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in loadcontrolproperties" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
MsgBox("Error in LoadControlProperties" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
' ADDED 25.11
|
||||
' Lade Control Eigenschaften und zeige diese an
|
||||
' Wird von frmLevelDesigner aufgerufen
|
||||
'Public Sub LoadControlProperties(ctrl As Control)
|
||||
' Try
|
||||
' Dim sql As String = "SELECT CTRLSCR_ID FROM VWPMO_CONTROL_SCREEN WHERE CONTROL_NAME = '" & ctrl.Name & "' AND FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID
|
||||
' Dim CTRLSCR_ID = ClassDatabase.Execute_Scalar(sql)
|
||||
' If CTRLSCR_ID > 0 Then
|
||||
' Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM VWPMO_CONTROL_SCREEN WHERE CTRLSCR_ID = " & CTRLSCR_ID)
|
||||
' If DT.Rows.Count = 1 Then
|
||||
' Dim row As DataRow = DT.Rows(0)
|
||||
' Dim type As String = row.Item("CTRLTYPE_NAME")
|
||||
' Dim props As Object = Nothing
|
||||
' Dim fontcolor As Color
|
||||
' Dim fontfamily As String
|
||||
' Dim fontstyle As FontStyle
|
||||
' Dim fontsize As Single
|
||||
' Dim isreadonly As Boolean
|
||||
' Dim isrequired As Boolean
|
||||
' Dim columntitle As String
|
||||
' Dim DefaultValue As String
|
||||
|
||||
|
||||
' Select Case type
|
||||
' Case "Label"
|
||||
' props = New LabelProperties()
|
||||
' props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
' Case "Textbox"
|
||||
' props = New TextBoxProperties()
|
||||
' props.DefaultValue = ClassConverter.ToStringOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
|
||||
' If Not IsDBNull(row.Item("CONTROL_FORMAT_TYPE")) Then
|
||||
' props.Format = DirectCast([Enum].Parse(GetType(EnumFormatOptions), row.Item("CONTROL_FORMAT_TYPE")), Integer)
|
||||
' Else
|
||||
' props.Format = "String"
|
||||
' End If
|
||||
' Case "Combobox"
|
||||
' props = New ComboBoxProperties()
|
||||
' props.MasterDataId = row.Item("CTRLSCR_MASTER_DATA_ID")
|
||||
' props.DefaultValue = ClassConverter.ToStringOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
|
||||
' If Not IsDBNull(row.Item("CONTROL_FORMAT_TYPE")) Then
|
||||
' props.Format = DirectCast([Enum].Parse(GetType(EnumFormatOptions), row.Item("CONTROL_FORMAT_TYPE")), Integer)
|
||||
' Else
|
||||
' props.Format = "String"
|
||||
' End If
|
||||
|
||||
' props.StaticList = ClassConverter.ToStringOrDefault(row.Item("CONTROL_STATIC_LIST"))
|
||||
' Case "Checkbox"
|
||||
' props = New CheckBoxProperties()
|
||||
' props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
' props.DefaultValue = ClassConverter.ToBooleanOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
' Case "Datepicker"
|
||||
' props = New DateTimePickerProperties()
|
||||
' props.DefaultValue = NotNull(row.Item("CONTROL_DEF_VALUE"), EnumDateTimePickerDefaultValueOptions.Empty)
|
||||
' 'props.DefaultValue = ClassConverter.ToDateTimePickerOptionsOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
' Case "Datagridview"
|
||||
' props = New DataGridViewProperties()
|
||||
' Case "Groupbox"
|
||||
' props = New GroupBoxProperties()
|
||||
' props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
' props.BackColor = IntToColor(row.Item("CTRLSCR_BACK_COLOR"))
|
||||
' Case "Picturebox"
|
||||
' props = New PictureBoxProperties()
|
||||
' Case "RadioButton"
|
||||
' props = New RadioButtonProperties()
|
||||
' props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
' props.DefaultValue = ClassConverter.ToBooleanOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
' props.IsRequired = row.Item("CONTROL_REQUIRED")
|
||||
' Case "F_AddAppointment"
|
||||
' props = New FunctionAddAppointment()
|
||||
' Case "F_AddFormData"
|
||||
' props = New FunctionAddFormData()
|
||||
' Case "CheckedListBox"
|
||||
' props = New ComboBoxProperties()
|
||||
' props.StaticList = ClassConverter.ToStringOrDefault(row.Item("CONTROL_STATIC_LIST"))
|
||||
' Case "ListBox"
|
||||
' props = New ComboBoxProperties()
|
||||
' props.StaticList = ClassConverter.ToStringOrDefault(row.Item("CONTROL_STATIC_LIST"))
|
||||
' Case Else
|
||||
' MsgBox("Unknown control type " & type, MsgBoxStyle.Exclamation, "Error in LoadControlProperties:")
|
||||
' End Select
|
||||
|
||||
' ' Generic Properties
|
||||
' props.ID = row.Item("CONTROL_ID")
|
||||
' props.Name = row.Item("CONTROL_NAME")
|
||||
' props.Size = New Size(row.Item("CTRLSCR_WIDTH"), row.Item("CTRLSCR_HEIGHT"))
|
||||
|
||||
' 'TODO: calc location
|
||||
' 'If row.Item("CONTROL_PARENT_ID") <> 0 Then
|
||||
' ' Dim parentSQL = "SELECT CTRLSCR_X_LOC, CTRLSCR_Y_LOC FROM VWPMO_VALUES WHERE = CONTROL_ID = " & row.Item("CONTROL_PARENT_ID")
|
||||
' 'End If
|
||||
|
||||
|
||||
' props.Location = New Point(row.Item("CTRLSCR_X_LOC"), row.Item("CTRLSCR_Y_LOC"))
|
||||
|
||||
' Me.Text = "Eigenschaften Control-ID: " & props.ID
|
||||
|
||||
' If type = "F_AddAppointment" Then
|
||||
' Dim ControlId = GetControlID_for_Name(ctrl.Name, CURRENT_FORM_ID)
|
||||
' Dim dr = ClassFunctionCommands.LoadFunction(ControlId)
|
||||
|
||||
' Dim FromDateId, ToDateId, SubjectString, Subject2String, PlaceString, DescString
|
||||
|
||||
' FromDateId = dr.Item("INTEGER1")
|
||||
' ToDateId = dr.Item("INTEGER2")
|
||||
' SubjectString = dr.Item("STRING1")
|
||||
' Subject2String = dr.Item("STRING2")
|
||||
' PlaceString = dr.Item("STRING3")
|
||||
' DescString = dr.Item("STRING4")
|
||||
|
||||
|
||||
' If IsDBNull(FromDateId) OrElse FromDateId = 0 Then
|
||||
' props.FromDate = ""
|
||||
' Else
|
||||
' props.FromDate = Get_Name_for_ControlID(FromDateId, CURRENT_FORM_ID)
|
||||
' End If
|
||||
|
||||
' If IsDBNull(ToDateId) OrElse ToDateId = 0 Then
|
||||
' props.ToDate = ""
|
||||
' Else
|
||||
' props.ToDate = Get_Name_for_ControlID(ToDateId, CURRENT_FORM_ID)
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
' If IsDBNull(SubjectString) OrElse String.IsNullOrEmpty(SubjectString) Then
|
||||
' props.Subject = ""
|
||||
' Else
|
||||
' props.Subject = SubjectString
|
||||
' End If
|
||||
|
||||
' If IsDBNull(Subject2String) OrElse String.IsNullOrEmpty(Subject2String) Then
|
||||
' props.Subject2 = ""
|
||||
' Else
|
||||
' props.Subject2 = Subject2String
|
||||
' End If
|
||||
|
||||
' If IsDBNull(PlaceString) OrElse String.IsNullOrEmpty(PlaceString) Then
|
||||
' props.Place = ""
|
||||
' Else
|
||||
' props.Place = PlaceString
|
||||
' End If
|
||||
|
||||
' If IsDBNull(DescString) OrElse String.IsNullOrEmpty(DescString) Then
|
||||
' props.Description = ""
|
||||
' Else
|
||||
' props.Description = DescString
|
||||
' End If
|
||||
|
||||
' props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
' ElseIf type = "F_AddFormData" Then
|
||||
' ' TODO
|
||||
' Dim ControlId = GetControlID_for_Name(ctrl.Name, CURRENT_FORM_ID)
|
||||
' Dim dr = ClassFunctionCommands.LoadFunction(ControlId)
|
||||
|
||||
' Dim FormId, ScreenId
|
||||
|
||||
' FormId = dr.Item("INTEGER1")
|
||||
' ScreenId = dr.Item("INTEGER2")
|
||||
|
||||
' If IsDBNull(FormId) OrElse FormId = 0 Then
|
||||
' props.FormID = 0
|
||||
' Else
|
||||
' props.FormID = FormId
|
||||
' End If
|
||||
|
||||
' If IsDBNull(ScreenId) OrElse ScreenId = 0 Then
|
||||
' props.ScreenID = 0
|
||||
' Else
|
||||
' props.ScreenID = ScreenId
|
||||
' End If
|
||||
|
||||
' props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
' End If
|
||||
|
||||
' ' Control Properties
|
||||
' If Not type.Contains("F_") Then
|
||||
' ' PreSave and Convert Properties
|
||||
' fontcolor = IntToColor(row.Item("CTRLSCR_FONT_COLOR"))
|
||||
' fontfamily = row.Item("CTRLSCR_FONT_FAMILY")
|
||||
' fontstyle = CType(row.Item("CTRLSCR_FONT_STYLE"), FontStyle)
|
||||
' fontsize = CType(row.Item("CTRLSCR_FONT_SIZE"), Single)
|
||||
' isreadonly = row.Item("CONTROL_READ_ONLY")
|
||||
' isrequired = row.Item("CONTROL_REQUIRED")
|
||||
' columntitle = row.Item("CONTROL_COL_NAME")
|
||||
|
||||
' ' Assign Properties to Class
|
||||
' props.FontColor = fontcolor
|
||||
' props.Font = New Font(fontfamily, fontsize, fontstyle)
|
||||
' props.ColumnTitle = columntitle
|
||||
|
||||
' 'ReadOnly
|
||||
' If type = "Textbox" Or type = "Datepicker" Or type = "Combobox" Or type = "Picturebox" Or type = "RadioButton" Or type = "Checkbox" Or type = "CheckedListBox" _
|
||||
' Or type = "ListBox" Then
|
||||
' props.IsReadOnly = row.Item("CONTROL_READ_ONLY")
|
||||
' End If
|
||||
|
||||
' ' Nicht verfügbar für label
|
||||
' If type = "Textbox" Or type = "Combobox" Or type = "Datepicker" Or type = "Checkbox" Or type = "RadioButton" Or type = "CheckedListBox" _
|
||||
' Or type = "ListBox" Then
|
||||
' props.TabStop = row.Item("CTRLSCR_TAB_STOP")
|
||||
' props.TabIndex = row.Item("CTRLSCR_TAB_INDEX")
|
||||
|
||||
' If Not IsDBNull(row.Item("CONTROL_SHOW_COLUMN")) Then
|
||||
' props.ShowColumn = row.Item("CONTROL_SHOW_COLUMN")
|
||||
' Else
|
||||
' props.ShowColumn = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If type = "Textbox" Then
|
||||
' props.Multiline = row.Item("CONTROL_MULTILINE")
|
||||
' End If
|
||||
|
||||
' If type = "Combobox" Or type = "CheckedListBox" Or type = "ListBox" Or type = "Textbox" Then
|
||||
' If row.Item("CONTROL_SQLCOMMAND_1").ToString.Length > 1 Then
|
||||
' Dim value As New SQLValue(row.Item("CONTROL_SQLCOMMAND_1").ToString)
|
||||
' props.SQLCommand = value
|
||||
' 'props.SQLCommand = row.Item("CONTROL_SQLCOMMAND_1").ToString
|
||||
' End If
|
||||
|
||||
' 'props.ParentFormID = row.Item("PARENT_FORM_ID")
|
||||
' props.IsRequired = isrequired
|
||||
' props.IsReadOnly = isreadonly
|
||||
' End If
|
||||
|
||||
' If type = "Label" Then
|
||||
' If row.Item("CONTROL_SQLCOMMAND_1").ToString.Length > 1 Then
|
||||
' Dim value As New SQLValue(row.Item("CONTROL_SQLCOMMAND_1").ToString)
|
||||
' props.SQLCommand = value
|
||||
' 'props.SQLCommand = row.Item("CONTROL_SQLCOMMAND_1").ToString
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' End If
|
||||
|
||||
' ' Globale Variable setzen
|
||||
' CURRENT_CONTROL_ID = row.Item("CONTROL_ID")
|
||||
' Me.pgControlProperties.SelectedObject = props
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Error in loadcontrolproperties" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
' End Try
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
' Aktualisiert die Position des akutellen Controls und speichert diese in der Klasse
|
||||
Public Sub UpdateControlLocation(ctrl As Control)
|
||||
CurrentProperties = Me.pgControlProperties.SelectedObject
|
||||
@ -307,7 +517,7 @@
|
||||
|
||||
Public Function SaveControlProperties(ctrl As Control, properties As Object) As Boolean
|
||||
If ClassControlCommands.UpdateControl(ctrl, properties) Then
|
||||
LoadControlProperties(ctrl)
|
||||
LoadControlPropertiesNeu(ctrl)
|
||||
Return True
|
||||
Else
|
||||
MsgBox("Fehler beim Speichern der Elementeigenschaften.", MsgBoxStyle.Critical)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user