Add RegexEditor, Improve Database Add Language
This commit is contained in:
@@ -1,35 +1,3 @@
|
||||
Public Class ClassUtils
|
||||
''' <summary>
|
||||
''' Generates a random short (8 characters) guid
|
||||
''' </summary>
|
||||
''' <returns>The generated guid as a String</returns>
|
||||
Public Shared Function ShortGUID() As String
|
||||
Return Guid.NewGuid().ToString().GetHashCode().ToString("x")
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Converts a String value to the given Enum
|
||||
''' </summary>
|
||||
''' <typeparam name="T">The Enum Type</typeparam>
|
||||
''' <param name="value">The string value to convert</param>
|
||||
Public Shared Function ToEnum(Of T)(value As String) As T
|
||||
Return [Enum].Parse(GetType(T), value)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Checks a value for three different `null` values,
|
||||
''' Nothing, Empty String, DBNull
|
||||
'''
|
||||
''' Returns the original value if the value is not null, or `defaultValue`
|
||||
''' </summary>
|
||||
''' <typeparam name="T">The type of the value</typeparam>
|
||||
''' <param name="value">The value</param>
|
||||
''' <param name="defaultValue">The default Value</param>
|
||||
Public Function NotNull(Of T)(ByVal value As T, ByVal defaultValue As T) As T
|
||||
If IsNothing(value) OrElse String.IsNullOrEmpty(value.ToString) OrElse IsDBNull(value) Then
|
||||
Return defaultValue
|
||||
Else
|
||||
Return value
|
||||
End If
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -504,6 +504,10 @@
|
||||
<Project>{44982f9b-6116-44e2-85d0-f39650b1ef99}</Project>
|
||||
<Name>Config</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Modules.Language\Language.vbproj">
|
||||
<Project>{d3c8cfed-d6f6-43a8-9bdf-454145d0352f}</Project>
|
||||
<Name>Language</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Modules.License\License.vbproj">
|
||||
<Project>{5ebacbfa-f11a-4bbf-8d02-91461f2293ed}</Project>
|
||||
<Name>License</Name>
|
||||
|
||||
@@ -8,6 +8,7 @@ Imports DigitalData.Controls.LookupGrid
|
||||
Imports DigitalData.GUIs.ClientSuite.Controls
|
||||
Imports DigitalData.GUIs.ClientSuite.Controls.Properties
|
||||
Imports DigitalData.GUIs.ClientSuite.Controls.Editors
|
||||
Imports DigitalData.Modules.Language
|
||||
|
||||
Public Class frmFormDesigner
|
||||
Private _FormId As Int64
|
||||
@@ -47,7 +48,7 @@ Public Class frmFormDesigner
|
||||
Dim oPosition As Point = LayoutControlMain.PointToClient(MousePosition)
|
||||
Dim oHitInfo As BaseLayoutItemHitInfo = LayoutControlMain.CalcHitInfo(oPosition)
|
||||
Dim oLayoutControl As LayoutControlItem = DirectCast(_DragItem, LayoutControlItem)
|
||||
Dim oControlName As String = oLayoutControl.Tag & ClassUtils.ShortGUID()
|
||||
Dim oControlName As String = oLayoutControl.Tag & Utils.ShortGUID()
|
||||
Dim oControl As Control = _ControlLoader.CreateLayoutControl(oLayoutControl.Tag, oControlName, 0)
|
||||
|
||||
If oLayoutControl IsNot Nothing Then
|
||||
|
||||
Reference in New Issue
Block a user