jj_02_02_16
This commit is contained in:
parent
666c9d039f
commit
57d073fe88
@ -12,13 +12,30 @@
|
||||
End Enum
|
||||
|
||||
Public Function NotNull(Of T)(ByVal value As T, ByVal defaultValue As T) As T
|
||||
If value Is Nothing OrElse String.IsNullOrEmpty(value.ToString) OrElse IsDBNull(value) Then
|
||||
If IsNothing(value) OrElse String.IsNullOrEmpty(value.ToString) OrElse IsDBNull(value) Then
|
||||
Return defaultValue
|
||||
Else
|
||||
Return value
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function NotNull(ByVal value As Integer, ByVal defaultValue As Integer) As Integer
|
||||
If IsNothing(value) OrElse IsDBNull(value) OrElse value = 0 Then
|
||||
Return defaultValue
|
||||
Else
|
||||
Return value
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function NotNull(ByVal value As String, ByVal defaultValue As String) As String
|
||||
If IsNothing(value) OrElse IsDBNull(value) OrElse String.IsNullOrEmpty(value) Then
|
||||
Return defaultValue
|
||||
Else
|
||||
Return value
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
Public Function BoolToInt(bool As Boolean) As Integer
|
||||
' Wandelt einen Boolean Wert in einen Int um
|
||||
Return IIf(bool, 1, 0)
|
||||
|
||||
@ -621,44 +621,6 @@
|
||||
m_Moving = False
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
'Try
|
||||
' 'If akt_ctrl Is Nothing Then
|
||||
' If CtrlBuilder.CurrentControl Is Nothing Then
|
||||
' Exit Sub
|
||||
' End If
|
||||
' 'Check which mode we're in. If we're supposed to be moving
|
||||
' 'our control
|
||||
' If m_Moving = True Then
|
||||
' Me.Cursor = Cursors.Hand
|
||||
' Me.Refresh()
|
||||
' Dim LastCursor As Point
|
||||
|
||||
' ' ADDED 18.11
|
||||
' Dim control As Control = DirectCast(sender, Control)
|
||||
' ' get the screen position of the mouse pointer and map it
|
||||
' ' to the position relative to the top-left corner of our
|
||||
' ' parent container
|
||||
' Dim NowCursor As Point = New Point(Cursor.Position.X,
|
||||
' Cursor.Position.Y)
|
||||
' Dim clientPosition As Point = CtrlBuilder.GetCursorPosition()
|
||||
|
||||
' If Point.op_Inequality(NowCursor, LastCursor) Then
|
||||
' Console.WriteLine("MOUSE: " & clientPosition.X & " " & clientPosition.Y)
|
||||
' Console.WriteLine("CNTRL: " & clientPosition.X - CtrlBuilder.BeginLocation.X & " " & clientPosition.Y - CtrlBuilder.BeginLocation.Y)
|
||||
|
||||
' control.Location = New Point(clientPosition.X - CtrlBuilder.BeginLocation.X,
|
||||
' clientPosition.Y - CtrlBuilder.BeginLocation.Y)
|
||||
|
||||
' End If
|
||||
' End If
|
||||
|
||||
'Catch ex As Exception
|
||||
' MsgBox(ex.Message, MsgBoxStyle.Exclamation, "MovableLabel_MouseMove")
|
||||
' m_Moving = False
|
||||
'End Try
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@ -27,7 +27,6 @@ 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()
|
||||
@ -41,7 +40,7 @@ Partial Class frmTool_ControlProperties
|
||||
'
|
||||
'ToolStrip1
|
||||
'
|
||||
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.btnSaveControl, Me.ToolStripButton1, Me.tslControlName})
|
||||
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.btnSaveControl, Me.ToolStripButton1})
|
||||
resources.ApplyResources(Me.ToolStrip1, "ToolStrip1")
|
||||
Me.ToolStrip1.Name = "ToolStrip1"
|
||||
'
|
||||
@ -57,12 +56,6 @@ 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})
|
||||
@ -99,5 +92,4 @@ 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,15 +168,6 @@
|
||||
<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>
|
||||
@ -204,6 +195,15 @@
|
||||
<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,15 +228,6 @@
|
||||
<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>
|
||||
@ -264,12 +255,6 @@
|
||||
<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>
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
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.ShowColumn = NotNull(CBool(r.Item("CONTROL_SHOW_COLUMN")), True)
|
||||
props.Multiline = r.Item("CONTROL_MULTILINE")
|
||||
props.SQLCommand = New SQLValue(NotNull(r.Item("CONTROL_SQLCOMMAND_1"), ""))
|
||||
|
||||
@ -102,7 +102,7 @@
|
||||
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.ShowColumn = NotNull(CBool(r.Item("CONTROL_SHOW_COLUMN")), True)
|
||||
props.SQLCommand = New SQLValue(NotNull(r.Item("CONTROL_SQLCOMMAND_1"), ""))
|
||||
|
||||
Case "Checkbox"
|
||||
@ -115,7 +115,7 @@
|
||||
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.ShowColumn = NotNull(CBool(r.Item("CONTROL_SHOW_COLUMN")), True)
|
||||
props.TabStop = r.Item("CTRLSCR_TAB_STOP")
|
||||
props.TabIndex = r.Item("CTRLSCR_TAB_INDEX")
|
||||
|
||||
@ -135,7 +135,7 @@
|
||||
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.ShowColumn = NotNull(CBool(r.Item("CONTROL_SHOW_COLUMN")), True)
|
||||
props.TabStop = r.Item("CTRLSCR_TAB_STOP")
|
||||
props.TabIndex = r.Item("CTRLSCR_TAB_INDEX")
|
||||
|
||||
@ -225,18 +225,10 @@
|
||||
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
|
||||
props.FormID = NotNull(FormId, 0)
|
||||
|
||||
Dim ScreenId = f.Item("INTEGER2")
|
||||
If IsDBNull(ScreenId) OrElse ScreenId = 0 Then
|
||||
props.ScreenID = 0
|
||||
Else
|
||||
props.ScreenID = ScreenId
|
||||
End If
|
||||
props.ScreenID = NotNull(ScreenId, 0)
|
||||
|
||||
End Select
|
||||
|
||||
@ -245,8 +237,6 @@
|
||||
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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user