Organize Control Classes in Namespaces
This commit is contained in:
parent
d7a4a4441d
commit
0eb1eeb287
@ -1,16 +1,22 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
''' <summary>
|
||||
''' Base Class which supplies a Logger/LogConfig
|
||||
''' </summary>
|
||||
Public Class BaseClass
|
||||
Protected LogConfig As LogConfig
|
||||
Protected Logger As Logger
|
||||
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
Dim oClassName = Me.GetType().Name
|
||||
Namespace Base
|
||||
''' <summary>
|
||||
''' Base Class which supplies a Logger/LogConfig
|
||||
''' </summary>
|
||||
Public Class BaseClass
|
||||
Protected LogConfig As LogConfig
|
||||
Protected Logger As Logger
|
||||
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
Dim oClassName = Me.GetType().Name
|
||||
|
||||
Me.LogConfig = LogConfig
|
||||
Me.Logger = LogConfig.GetLogger(oClassName)
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
|
||||
Me.LogConfig = LogConfig
|
||||
Me.Logger = LogConfig.GetLogger(oClassName)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class ClassControlData
|
||||
Inherits BaseClass
|
||||
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
MyBase.New(LogConfig)
|
||||
End Sub
|
||||
|
||||
Public Sub LoadControlData(ByRef Controls As List(Of BaseEdit), Data As DataTable)
|
||||
Dim oCounter = 0
|
||||
|
||||
For Each oControl As BaseEdit In Controls
|
||||
Dim oBindingSource As New BindingSource(Data, Nothing)
|
||||
|
||||
Select Case oControl.GetType
|
||||
Case GetType(TextEdit)
|
||||
oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged)
|
||||
Case GetType(MemoEdit)
|
||||
oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged)
|
||||
Case GetType(DateEdit)
|
||||
oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged)
|
||||
Case GetType(LookupControl2)
|
||||
oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged)
|
||||
Case Else
|
||||
|
||||
End Select
|
||||
|
||||
oBindingSource.Position = oCounter
|
||||
oCounter += 1
|
||||
Next
|
||||
End Sub
|
||||
End Class
|
||||
@ -1,100 +0,0 @@
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraLayout
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class ClassControlLoader
|
||||
Inherits BaseClass
|
||||
|
||||
Private _LayoutControlGroup As LayoutControlGroup
|
||||
Private _LayoutControls As List(Of BaseEdit)
|
||||
|
||||
Public ReadOnly Property LayoutControls As List(Of BaseEdit)
|
||||
Get
|
||||
If _LayoutControls Is Nothing Then
|
||||
_LayoutControls = New List(Of BaseEdit)
|
||||
End If
|
||||
Return _LayoutControls
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, LayoutControlGroup As LayoutControlGroup)
|
||||
MyBase.New(LogConfig)
|
||||
_LayoutControlGroup = LayoutControlGroup
|
||||
End Sub
|
||||
|
||||
Public Sub AddControl(Name As String, Value As String, LayoutControlGroup As LayoutControlGroup)
|
||||
Dim oTextEdit As New SimpleLabelItem() With {
|
||||
.Name = Name,
|
||||
.Text = Name & " - " & Value
|
||||
}
|
||||
|
||||
LayoutControlGroup.AddItem(oTextEdit)
|
||||
End Sub
|
||||
Public Sub AddControl(Name As String, Value As String)
|
||||
AddControl(Name, Value, _LayoutControlGroup)
|
||||
End Sub
|
||||
|
||||
Public Sub AddSeparator(LayoutControlGroup As LayoutControlGroup)
|
||||
Dim oSeparator = New SimpleSeparator()
|
||||
|
||||
LayoutControlGroup.AddItem(oSeparator)
|
||||
End Sub
|
||||
Public Sub AddSeparator()
|
||||
AddSeparator(_LayoutControlGroup)
|
||||
End Sub
|
||||
|
||||
Public Sub LoadControls(Datatable As DataTable, LayoutControlGroup As LayoutControlGroup)
|
||||
For Each oRow As DataRow In Datatable.Rows
|
||||
Dim oCaption As String = oRow.Item("COLNAME")
|
||||
Dim oControlType As String = oRow.Item("CTRLTYPE")
|
||||
Dim oControlId As Int64 = oRow.Item("RECORD_ID")
|
||||
Dim oEditor As BaseEdit = CreateLayoutControl(oControlType, oControlId, oControlId)
|
||||
|
||||
If oEditor Is Nothing Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
oEditor.Tag = New ClassControlMetadata() With {
|
||||
.Id = oControlId,
|
||||
.Type = oControlType
|
||||
}
|
||||
|
||||
LayoutControls.Add(oEditor)
|
||||
LayoutControlGroup.AddItem(oCaption, oEditor)
|
||||
Next
|
||||
|
||||
LayoutControlGroup.AddItem(New EmptySpaceItem())
|
||||
End Sub
|
||||
Public Sub LoadControls(Datatable As DataTable)
|
||||
LoadControls(Datatable, _LayoutControlGroup)
|
||||
End Sub
|
||||
|
||||
Public Function CreateLayoutControl(Type As String, Name As String, Id As Int64)
|
||||
Dim oEditor As BaseEdit = Nothing
|
||||
|
||||
Logger.Debug("Create new Control of type {0} with name {1}", Type, Name)
|
||||
|
||||
Select Case Type
|
||||
Case ClassConstants.CONTROL_TEXTEDIT
|
||||
Dim oTextEdit As New TextEdit() With {.Name = Name}
|
||||
oEditor = oTextEdit
|
||||
Case ClassConstants.CONTROL_MEMOEDIT
|
||||
Dim oMemoEdit As New MemoEdit() With {.Name = Name}
|
||||
oEditor = oMemoEdit
|
||||
Case ClassConstants.CONTROL_DATEEDIT
|
||||
Dim oDateEdit As New DateEdit() With {.Name = Name}
|
||||
oEditor = oDateEdit
|
||||
Case ClassConstants.CONTROL_CHECKEDIT
|
||||
Dim oCheckEdit As New CheckEdit() With {.Name = Name}
|
||||
oEditor = oCheckEdit
|
||||
Case ClassConstants.CONTROL_COMBOEDIT
|
||||
Dim oComboEdit As New LookupControl2() With {.Name = Name}
|
||||
oEditor = oComboEdit
|
||||
Case Else
|
||||
oEditor = Nothing
|
||||
End Select
|
||||
|
||||
Return oEditor
|
||||
End Function
|
||||
End Class
|
||||
12
EDMI_ClientSuite/ClassControlManager.vb
Normal file
12
EDMI_ClientSuite/ClassControlManager.vb
Normal file
@ -0,0 +1,12 @@
|
||||
Imports DigitalData.GUIs.ClientSuite.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class ClassControlManager
|
||||
Inherits BaseClass
|
||||
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
MyBase.New(LogConfig)
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@ -2,6 +2,7 @@
|
||||
Imports System.ServiceModel.Channels
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.EDMIFileOps.EDMIServiceReference
|
||||
Imports DigitalData.GUIs.ClientSuite.Base
|
||||
|
||||
Public Class ClassService
|
||||
Inherits BaseClass
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
Imports System.ServiceModel
|
||||
Imports System.Threading
|
||||
Imports System.Timers
|
||||
Imports DigitalData.GUIs.ClientSuite.Base
|
||||
Imports DigitalData.Modules.EDMIFileOps.EDMIServiceReference
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
|
||||
@ -90,6 +90,9 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Modules.Logging\bin\Debug\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ScintillaNET, Version=3.6.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\jacobslusser.ScintillaNET.3.6.3\lib\net40\ScintillaNET.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
@ -128,12 +131,13 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="ApplicationEvents.vb" />
|
||||
<Compile Include="Base\BaseClass.vb" />
|
||||
<Compile Include="ClassControlData.vb" />
|
||||
<Compile Include="FormDesigner\Controls\Data.vb" />
|
||||
<Compile Include="ClassControlManager.vb" />
|
||||
<Compile Include="Common\ClassCommonCommands.vb" />
|
||||
<Compile Include="Common\ClassCommonViews.vb" />
|
||||
<Compile Include="ClassConfig.vb" />
|
||||
<Compile Include="ClassConstants.vb" />
|
||||
<Compile Include="ClassControlLoader.vb" />
|
||||
<Compile Include="FormDesigner\Controls\Loader.vb" />
|
||||
<Compile Include="ClassControlPatcher.vb" />
|
||||
<Compile Include="ClassDragDrop.vb" />
|
||||
<Compile Include="ClassErrorHandler.vb" />
|
||||
@ -146,11 +150,19 @@
|
||||
<Compile Include="Common\ClassCommon.vb" />
|
||||
<Compile Include="ControlDefaults\GridControlDefaults.vb" />
|
||||
<Compile Include="ControlDefaults\TreeListDefaults.vb" />
|
||||
<Compile Include="FormEntityDesigner\ClassControlMetadata.vb" />
|
||||
<Compile Include="FormEntityDesigner\frmFormDesigner.Designer.vb">
|
||||
<Compile Include="FormDesigner\Controls\Editors\DatasourceType.vb" />
|
||||
<Compile Include="FormDesigner\Controls\Metadata.vb" />
|
||||
<Compile Include="FormDesigner\Controls\Editors\DatasourceEditor.vb" />
|
||||
<Compile Include="FormDesigner\Controls\Editors\frmDatasourceEditor.Designer.vb">
|
||||
<DependentUpon>frmDatasourceEditor.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormDesigner\Controls\Editors\frmDatasourceEditor.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormDesigner\frmFormDesigner.Designer.vb">
|
||||
<DependentUpon>frmFormDesigner.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormEntityDesigner\frmFormDesigner.vb">
|
||||
<Compile Include="FormDesigner\frmFormDesigner.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormWorkflow\frmWorkflowStep.Designer.vb">
|
||||
@ -190,14 +202,14 @@
|
||||
<Compile Include="_TEST\frmDocTest.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormEntityDesigner\ClassControlLocalization.vb" />
|
||||
<Compile Include="FormEntityDesigner\ControlProperties\BaseClasses\ClassBaseProperties.vb" />
|
||||
<Compile Include="FormEntityDesigner\ControlProperties\Controls\ClassComboboxProperties.vb" />
|
||||
<Compile Include="FormEntityDesigner\ControlProperties\Editors\ClassStaticListEditor.vb" />
|
||||
<Compile Include="FormEntityDesigner\ControlProperties\Editors\frmStaticListEditor.designer.vb">
|
||||
<Compile Include="FormDesigner\Controls\Localization.vb" />
|
||||
<Compile Include="FormDesigner\Controls\Properties\BaseProperties.vb" />
|
||||
<Compile Include="FormDesigner\Controls\Properties\ComboboxProperties.vb" />
|
||||
<Compile Include="FormDesigner\Controls\Editors\StaticListEditor.vb" />
|
||||
<Compile Include="FormDesigner\Controls\Editors\frmStaticListEditor.designer.vb">
|
||||
<DependentUpon>frmStaticListEditor.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormEntityDesigner\ControlProperties\Editors\frmStaticListEditor.vb">
|
||||
<Compile Include="FormDesigner\Controls\Editors\frmStaticListEditor.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Base\BaseForm.vb">
|
||||
@ -302,7 +314,10 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="FormEntityDesigner\frmFormDesigner.resx">
|
||||
<EmbeddedResource Include="FormDesigner\Controls\Editors\frmDatasourceEditor.resx">
|
||||
<DependentUpon>frmDatasourceEditor.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormDesigner\frmFormDesigner.resx">
|
||||
<DependentUpon>frmFormDesigner.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormWorkflow\frmWorkflowStep.resx">
|
||||
@ -320,10 +335,10 @@
|
||||
<EmbeddedResource Include="_TEST\frmDocTest.resx">
|
||||
<DependentUpon>frmDocTest.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormEntityDesigner\ControlProperties\Editors\frmStaticListEditor.en-US.resx">
|
||||
<EmbeddedResource Include="FormDesigner\Controls\Editors\frmStaticListEditor.en-US.resx">
|
||||
<DependentUpon>frmStaticListEditor.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormEntityDesigner\ControlProperties\Editors\frmStaticListEditor.resx">
|
||||
<EmbeddedResource Include="FormDesigner\Controls\Editors\frmStaticListEditor.resx">
|
||||
<DependentUpon>frmStaticListEditor.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="_TEST\frmFileTest.resx">
|
||||
|
||||
41
EDMI_ClientSuite/FormDesigner/Controls/Data.vb
Normal file
41
EDMI_ClientSuite/FormDesigner/Controls/Data.vb
Normal file
@ -0,0 +1,41 @@
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
Imports DigitalData.GUIs.ClientSuite.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Namespace Controls
|
||||
Public Class ControlData
|
||||
Inherits BaseClass
|
||||
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
MyBase.New(LogConfig)
|
||||
End Sub
|
||||
|
||||
Public Sub LoadControlData(ByRef Controls As List(Of BaseEdit), Data As DataTable)
|
||||
Dim oCounter = 0
|
||||
|
||||
' TODO: Do we need databinding and does it work with lookup control
|
||||
For Each oControl As BaseEdit In Controls
|
||||
Dim oBindingSource As New BindingSource(Data, Nothing)
|
||||
|
||||
Select Case oControl.GetType
|
||||
Case GetType(TextEdit)
|
||||
oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged)
|
||||
Case GetType(MemoEdit)
|
||||
oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged)
|
||||
Case GetType(DateEdit)
|
||||
oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged)
|
||||
Case GetType(LookupControl2)
|
||||
oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged)
|
||||
Case Else
|
||||
|
||||
End Select
|
||||
|
||||
oBindingSource.Position = oCounter
|
||||
oCounter += 1
|
||||
Next
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
Imports System.ComponentModel
|
||||
'Imports System.ComponentModel.Design
|
||||
Imports System.Drawing.Design
|
||||
'Imports System.Windows.Forms
|
||||
Imports System.Windows.Forms.Design
|
||||
|
||||
Namespace Controls.Editors
|
||||
Public Class DatasourceEditor
|
||||
Inherits UITypeEditor
|
||||
|
||||
Public Overrides Function GetEditStyle(context As ITypeDescriptorContext) As UITypeEditorEditStyle
|
||||
Return UITypeEditorEditStyle.Modal
|
||||
End Function
|
||||
|
||||
Public Overrides Function EditValue(context As ITypeDescriptorContext, provider As IServiceProvider, value As Object) As Object
|
||||
Dim oService As IWindowsFormsEditorService = TryCast(provider.GetService(GetType(IWindowsFormsEditorService)), IWindowsFormsEditorService)
|
||||
Dim oDatasource As DatasourceType = DirectCast(value, DatasourceType)
|
||||
|
||||
If oService IsNot Nothing AndAlso oDatasource IsNot Nothing Then
|
||||
Using oForm As New frmDatasourceEditor()
|
||||
oForm.Value = oDatasource
|
||||
If oService.ShowDialog(oForm) = DialogResult.OK Then
|
||||
|
||||
value = oForm.Value
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
Return value
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Public Class DatasourceTypeConverter
|
||||
Inherits TypeConverter
|
||||
|
||||
Public Overrides Function ToString() As String
|
||||
Return MyBase.ToString()
|
||||
End Function
|
||||
|
||||
' Diese Funktion gibt den String zurück, der im PropertyGrid für den Benutzer sichtbar ist, kann ruhig etwas hübscher sein als foo;bar;baz
|
||||
Public Overrides Function ConvertTo(context As ITypeDescriptorContext, culture As Globalization.CultureInfo, value As Object, destinationType As Type) As Object
|
||||
Return "Datasource"
|
||||
End Function
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Drawing.Design
|
||||
Imports DigitalData.GUIs.ClientSuite.Controls.Editors
|
||||
|
||||
Namespace Controls.Editors
|
||||
<Editor(GetType(DatasourceEditor), GetType(UITypeEditor))>
|
||||
<TypeConverter(GetType(DatasourceTypeConverter))>
|
||||
Public Class DatasourceType
|
||||
Public Property StaticList As New List(Of String)
|
||||
Public Property SQLCommand As String = String.Empty
|
||||
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
Public Sub New(Values As List(Of String))
|
||||
_StaticList = Values
|
||||
End Sub
|
||||
|
||||
Public Sub New(SQLCommand As String)
|
||||
_SQLCommand = SQLCommand
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
@ -4,7 +4,7 @@ Imports System.Drawing.Design
|
||||
'Imports System.Windows.Forms
|
||||
Imports System.Windows.Forms.Design
|
||||
|
||||
Public Class ClassStaticListEditor
|
||||
Public Class StaticListEditor
|
||||
Inherits UITypeEditor
|
||||
|
||||
Public Overrides Function GetEditStyle(context As ITypeDescriptorContext) As UITypeEditorEditStyle
|
||||
@ -31,7 +31,7 @@ Public Class ClassStaticListEditor
|
||||
End Function
|
||||
End Class
|
||||
|
||||
<Editor(GetType(ClassStaticListEditor), GetType(UITypeEditor))>
|
||||
<Editor(GetType(StaticListEditor), GetType(UITypeEditor))>
|
||||
<TypeConverter(GetType(StaticListTypeConverter))>
|
||||
Public Class StaticList
|
||||
|
||||
63
EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.Designer.vb
generated
Normal file
63
EDMI_ClientSuite/FormDesigner/Controls/Editors/frmDatasourceEditor.Designer.vb
generated
Normal file
@ -0,0 +1,63 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmDatasourceEditor
|
||||
Inherits DevExpress.XtraEditors.XtraForm
|
||||
|
||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.PanelEditor = New DevExpress.XtraEditors.PanelControl()
|
||||
Me.btnSave = New System.Windows.Forms.Button()
|
||||
CType(Me.PanelEditor, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'PanelEditor
|
||||
'
|
||||
Me.PanelEditor.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.PanelEditor.Location = New System.Drawing.Point(0, 0)
|
||||
Me.PanelEditor.Name = "PanelEditor"
|
||||
Me.PanelEditor.Size = New System.Drawing.Size(800, 394)
|
||||
Me.PanelEditor.TabIndex = 0
|
||||
'
|
||||
'btnSave
|
||||
'
|
||||
Me.btnSave.Location = New System.Drawing.Point(713, 415)
|
||||
Me.btnSave.Name = "btnSave"
|
||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnSave.TabIndex = 1
|
||||
Me.btnSave.Text = "Speichern"
|
||||
Me.btnSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmDatasourceEditor
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(800, 450)
|
||||
Me.Controls.Add(Me.btnSave)
|
||||
Me.Controls.Add(Me.PanelEditor)
|
||||
Me.Name = "frmDatasourceEditor"
|
||||
Me.Text = "frmDatasourceEditor"
|
||||
CType(Me.PanelEditor, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents PanelEditor As DevExpress.XtraEditors.PanelControl
|
||||
Friend WithEvents btnSave As Button
|
||||
End Class
|
||||
@ -0,0 +1,50 @@
|
||||
Imports DigitalData.GUIs.ClientSuite.Controls.Editors
|
||||
Imports ScintillaNET
|
||||
|
||||
Public Class frmDatasourceEditor
|
||||
Public Value As DatasourceType
|
||||
|
||||
Private _Editor As Scintilla
|
||||
|
||||
Private Sub frmDatasourceEditor_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
|
||||
_Editor = New Scintilla() With {
|
||||
.Dock = DockStyle.Fill,
|
||||
.BorderStyle = BorderStyle.None,
|
||||
.Text = Value.SQLCommand
|
||||
}
|
||||
|
||||
_Editor.StyleResetDefault()
|
||||
With _Editor.Styles(Style.Default)
|
||||
.Font = "Consolas"
|
||||
.Size = 10
|
||||
End With
|
||||
_Editor.StyleClearAll()
|
||||
_Editor.Lexer = Lexer.Sql
|
||||
|
||||
_Editor.Styles(Style.LineNumber).ForeColor = Color.FromArgb(255, 128, 128, 128)
|
||||
_Editor.Styles(Style.LineNumber).BackColor = Color.FromArgb(255, 228, 228, 228)
|
||||
_Editor.Styles(Style.Sql.Comment).ForeColor = Color.Green
|
||||
_Editor.Styles(Style.Sql.CommentLine).ForeColor = Color.Green
|
||||
_Editor.Styles(Style.Sql.CommentLineDoc).ForeColor = Color.Green
|
||||
_Editor.Styles(Style.Sql.Number).ForeColor = Color.Maroon
|
||||
_Editor.Styles(Style.Sql.Word).ForeColor = Color.Blue
|
||||
_Editor.Styles(Style.Sql.Word2).ForeColor = Color.Fuchsia
|
||||
_Editor.Styles(Style.Sql.User1).ForeColor = Color.Gray
|
||||
_Editor.Styles(Style.Sql.User2).ForeColor = Color.FromArgb(255, 0, 128, 192)
|
||||
_Editor.Styles(Style.Sql.String).ForeColor = Color.Red
|
||||
_Editor.Styles(Style.Sql.Character).ForeColor = Color.Red
|
||||
_Editor.Styles(Style.Sql.[Operator]).ForeColor = Color.Black
|
||||
_Editor.SetKeywords(0, "add alter as authorization backup begin bigint binary bit break browse bulk by cascade case catch check checkpoint close clustered column commit compute constraint containstable continue create current cursor cursor database date datetime datetime2 datetimeoffset dbcc deallocate decimal declare default delete deny desc disk distinct distributed double drop dump else end errlvl escape except exec execute exit external fetch file fillfactor float for foreign freetext freetexttable from full function goto grant group having hierarchyid holdlock identity identity_insert identitycol if image index insert int intersect into key kill lineno load merge money national nchar nocheck nocount nolock nonclustered ntext numeric nvarchar of off offsets on open opendatasource openquery openrowset openxml option order over percent plan precision primary print proc procedure public raiserror read readtext real reconfigure references replication restore restrict return revert revoke rollback rowcount rowguidcol rule save schema securityaudit select set setuser shutdown smalldatetime smallint smallmoney sql_variant statistics table table tablesample text textsize then time timestamp tinyint to top tran transaction trigger truncate try union unique uniqueidentifier update updatetext use user values varbinary varchar varying view waitfor when where while with writetext xml go ")
|
||||
_Editor.SetKeywords(1, "ascii cast char charindex ceiling coalesce collate contains convert current_date current_time current_timestamp current_user floor isnull max min nullif object_id session_user substring system_user tsequal ")
|
||||
_Editor.SetKeywords(4, "all and any between cross exists in inner is join left like not null or outer pivot right some unpivot ( ) * ")
|
||||
_Editor.SetKeywords(5, "sys objects sysobjects ")
|
||||
|
||||
PanelEditor.Controls.Add(_Editor)
|
||||
End Sub
|
||||
|
||||
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
||||
Value.SQLCommand = _Editor.Text
|
||||
End Sub
|
||||
End Class
|
||||
105
EDMI_ClientSuite/FormDesigner/Controls/Loader.vb
Normal file
105
EDMI_ClientSuite/FormDesigner/Controls/Loader.vb
Normal file
@ -0,0 +1,105 @@
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraLayout
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
Imports DigitalData.GUIs.ClientSuite.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Namespace Controls
|
||||
Public Class ControlLoader
|
||||
Inherits BaseClass
|
||||
|
||||
Private _LayoutControlGroup As LayoutControlGroup
|
||||
Private _LayoutControls As List(Of BaseEdit)
|
||||
|
||||
Public ReadOnly Property LayoutControls As List(Of BaseEdit)
|
||||
Get
|
||||
If _LayoutControls Is Nothing Then
|
||||
_LayoutControls = New List(Of BaseEdit)
|
||||
End If
|
||||
Return _LayoutControls
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, LayoutControlGroup As LayoutControlGroup)
|
||||
MyBase.New(LogConfig)
|
||||
_LayoutControlGroup = LayoutControlGroup
|
||||
End Sub
|
||||
|
||||
Public Sub AddControl(Name As String, Value As String, LayoutControlGroup As LayoutControlGroup)
|
||||
Dim oTextEdit As New SimpleLabelItem() With {
|
||||
.Name = Name,
|
||||
.Text = Name & " - " & Value
|
||||
}
|
||||
|
||||
LayoutControlGroup.AddItem(oTextEdit)
|
||||
End Sub
|
||||
Public Sub AddControl(Name As String, Value As String)
|
||||
AddControl(Name, Value, _LayoutControlGroup)
|
||||
End Sub
|
||||
|
||||
Public Sub AddSeparator(LayoutControlGroup As LayoutControlGroup)
|
||||
Dim oSeparator = New SimpleSeparator()
|
||||
|
||||
LayoutControlGroup.AddItem(oSeparator)
|
||||
End Sub
|
||||
Public Sub AddSeparator()
|
||||
AddSeparator(_LayoutControlGroup)
|
||||
End Sub
|
||||
|
||||
Public Sub LoadControls(Datatable As DataTable, LayoutControlGroup As LayoutControlGroup)
|
||||
For Each oRow As DataRow In Datatable.Rows
|
||||
Dim oCaption As String = oRow.Item("COLNAME")
|
||||
Dim oControlType As String = oRow.Item("CTRLTYPE")
|
||||
Dim oControlId As Int64 = oRow.Item("RECORD_ID")
|
||||
Dim oEditor As BaseEdit = CreateLayoutControl(oControlType, oControlId, oControlId)
|
||||
|
||||
If oEditor Is Nothing Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
oEditor.Tag = New Metadata() With {
|
||||
.Id = oControlId,
|
||||
.Type = oControlType
|
||||
}
|
||||
|
||||
LayoutControls.Add(oEditor)
|
||||
LayoutControlGroup.AddItem(oCaption, oEditor)
|
||||
Next
|
||||
|
||||
LayoutControlGroup.AddItem(New EmptySpaceItem())
|
||||
End Sub
|
||||
Public Sub LoadControls(Datatable As DataTable)
|
||||
LoadControls(Datatable, _LayoutControlGroup)
|
||||
End Sub
|
||||
|
||||
Public Function CreateLayoutControl(Type As String, Name As String, Id As Int64)
|
||||
Dim oEditor As BaseEdit = Nothing
|
||||
|
||||
Logger.Debug("Create new Control of type {0} with name {1}", Type, Name)
|
||||
|
||||
Select Case Type
|
||||
Case ClassConstants.CONTROL_TEXTEDIT
|
||||
Dim oTextEdit As New TextEdit() With {.Name = Name}
|
||||
oEditor = oTextEdit
|
||||
Case ClassConstants.CONTROL_MEMOEDIT
|
||||
Dim oMemoEdit As New MemoEdit() With {.Name = Name}
|
||||
oEditor = oMemoEdit
|
||||
Case ClassConstants.CONTROL_DATEEDIT
|
||||
Dim oDateEdit As New DateEdit() With {.Name = Name}
|
||||
oEditor = oDateEdit
|
||||
Case ClassConstants.CONTROL_CHECKEDIT
|
||||
Dim oCheckEdit As New CheckEdit() With {.Name = Name}
|
||||
oEditor = oCheckEdit
|
||||
Case ClassConstants.CONTROL_COMBOEDIT
|
||||
Dim oComboEdit As New LookupControl2() With {.Name = Name}
|
||||
oEditor = oComboEdit
|
||||
Case Else
|
||||
oEditor = Nothing
|
||||
End Select
|
||||
|
||||
Return oEditor
|
||||
End Function
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
||||
30
EDMI_ClientSuite/FormDesigner/Controls/Localization.vb
Normal file
30
EDMI_ClientSuite/FormDesigner/Controls/Localization.vb
Normal file
@ -0,0 +1,30 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
Namespace Controls
|
||||
Public Class Localization
|
||||
Private Shared Function Lookup(key As String)
|
||||
Try
|
||||
Return My.Resources.ControlProperties.ResourceManager.GetString(key)
|
||||
Catch ex As Exception
|
||||
Return key
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Class LocalizedDescriptionAttribute
|
||||
Inherits DescriptionAttribute
|
||||
|
||||
Public Sub New(key As String)
|
||||
MyBase.New(Lookup(key))
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public Class LocalizedCategoryAttribute
|
||||
Inherits CategoryAttribute
|
||||
|
||||
Public Sub New(key As String)
|
||||
MyBase.New(Lookup(key))
|
||||
End Sub
|
||||
End Class
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
8
EDMI_ClientSuite/FormDesigner/Controls/Metadata.vb
Normal file
8
EDMI_ClientSuite/FormDesigner/Controls/Metadata.vb
Normal file
@ -0,0 +1,8 @@
|
||||
Namespace Controls
|
||||
Public Class Metadata
|
||||
Public Id As Int64
|
||||
Public Type As String
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
Imports System.ComponentModel
|
||||
Imports DigitalData.GUIs.ClientSuite.ClassControlLocalization
|
||||
Imports DigitalData.GUIs.ClientSuite.Controls.Localization
|
||||
|
||||
Namespace ControlProperties
|
||||
Public MustInherit Class ClassBaseProperties
|
||||
Namespace Controls.Properties
|
||||
Public MustInherit Class BaseProperties
|
||||
|
||||
<LocalizedCategory("category_info")>
|
||||
<LocalizedDescription("desc_id")>
|
||||
@ -0,0 +1,14 @@
|
||||
Imports System.ComponentModel
|
||||
Imports DigitalData.GUIs.ClientSuite.Controls.Editors
|
||||
Imports DigitalData.GUIs.ClientSuite.Controls.Localization
|
||||
|
||||
Namespace Controls.Properties
|
||||
Public Class ComboboxProperties
|
||||
Inherits BaseProperties
|
||||
|
||||
<LocalizedCategory("category_data")>
|
||||
<LocalizedDescription("desc_datasource")>
|
||||
Public Property Datasource As DatasourceType
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
@ -20,8 +20,12 @@ Partial Class frmFormDesigner
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmFormDesigner))
|
||||
Me.RibbonControl = New DevExpress.XtraBars.Ribbon.RibbonControl()
|
||||
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.BarCheckEditLayout = New DevExpress.XtraBars.BarCheckItem()
|
||||
Me.RibbonPageCategory1 = New DevExpress.XtraBars.Ribbon.RibbonPageCategory()
|
||||
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
||||
Me.LayoutControlMain = New DevExpress.XtraLayout.LayoutControl()
|
||||
Me.LayoutControlGroupMain = New DevExpress.XtraLayout.LayoutControlGroup()
|
||||
@ -53,18 +57,39 @@ Partial Class frmFormDesigner
|
||||
'RibbonControl
|
||||
'
|
||||
Me.RibbonControl.ExpandCollapseItem.Id = 0
|
||||
Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem})
|
||||
Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.BarCheckEditLayout})
|
||||
Me.RibbonControl.Location = New System.Drawing.Point(0, 0)
|
||||
Me.RibbonControl.MaxItemId = 1
|
||||
Me.RibbonControl.MaxItemId = 4
|
||||
Me.RibbonControl.Name = "RibbonControl"
|
||||
Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
|
||||
Me.RibbonControl.PageCategories.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageCategory() {Me.RibbonPageCategory1})
|
||||
Me.RibbonControl.Size = New System.Drawing.Size(870, 146)
|
||||
Me.RibbonControl.StatusBar = Me.RibbonStatusBar
|
||||
'
|
||||
'RibbonPage1
|
||||
'BarCheckEditLayout
|
||||
'
|
||||
Me.RibbonPage1.Name = "RibbonPage1"
|
||||
Me.RibbonPage1.Text = "RibbonPage1"
|
||||
Me.BarCheckEditLayout.Caption = "Layout bearbeiten"
|
||||
Me.BarCheckEditLayout.Id = 3
|
||||
Me.BarCheckEditLayout.ImageOptions.Image = CType(resources.GetObject("BarCheckEditLayout.ImageOptions.Image"), System.Drawing.Image)
|
||||
Me.BarCheckEditLayout.ImageOptions.LargeImage = CType(resources.GetObject("BarCheckEditLayout.ImageOptions.LargeImage"), System.Drawing.Image)
|
||||
Me.BarCheckEditLayout.Name = "BarCheckEditLayout"
|
||||
'
|
||||
'RibbonPageCategory1
|
||||
'
|
||||
Me.RibbonPageCategory1.Name = "RibbonPageCategory1"
|
||||
Me.RibbonPageCategory1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage2})
|
||||
Me.RibbonPageCategory1.Text = "Form Designer"
|
||||
'
|
||||
'RibbonPage2
|
||||
'
|
||||
Me.RibbonPage2.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup2})
|
||||
Me.RibbonPage2.Name = "RibbonPage2"
|
||||
Me.RibbonPage2.Text = "Allgemein"
|
||||
'
|
||||
'RibbonPageGroup2
|
||||
'
|
||||
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarCheckEditLayout)
|
||||
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
|
||||
Me.RibbonPageGroup2.Text = "RibbonPageGroup2"
|
||||
'
|
||||
'RibbonStatusBar
|
||||
'
|
||||
@ -106,6 +131,7 @@ Partial Class frmFormDesigner
|
||||
Me.ToolboxControlMain.Name = "ToolboxControlMain"
|
||||
Me.ToolboxControlMain.OptionsMinimizing.AllowMinimizing = False
|
||||
Me.ToolboxControlMain.OptionsView.ShowMenuButton = False
|
||||
Me.ToolboxControlMain.OptionsView.ShowToolboxCaption = True
|
||||
Me.ToolboxControlMain.SelectedGroup = Me.ToolboxGroupMain
|
||||
Me.ToolboxControlMain.SelectedGroupIndex = 0
|
||||
Me.ToolboxControlMain.Size = New System.Drawing.Size(232, 337)
|
||||
@ -193,11 +219,11 @@ Partial Class frmFormDesigner
|
||||
Me.XtraTabPageProperties.Size = New System.Drawing.Size(232, 337)
|
||||
Me.XtraTabPageProperties.Text = "Eigenschaften"
|
||||
'
|
||||
'PropertyGridControl1
|
||||
'PropertyGridControlMain
|
||||
'
|
||||
Me.PropertyGridControlMain.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.PropertyGridControlMain.Location = New System.Drawing.Point(0, 0)
|
||||
Me.PropertyGridControlMain.Name = "PropertyGridControl1"
|
||||
Me.PropertyGridControlMain.Name = "PropertyGridControlMain"
|
||||
Me.PropertyGridControlMain.Size = New System.Drawing.Size(232, 337)
|
||||
Me.PropertyGridControlMain.TabIndex = 0
|
||||
'
|
||||
@ -244,7 +270,6 @@ Partial Class frmFormDesigner
|
||||
End Sub
|
||||
|
||||
Friend WithEvents RibbonControl As DevExpress.XtraBars.Ribbon.RibbonControl
|
||||
Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage
|
||||
Friend WithEvents RibbonStatusBar As DevExpress.XtraBars.Ribbon.RibbonStatusBar
|
||||
Friend WithEvents LayoutControlMain As DevExpress.XtraLayout.LayoutControl
|
||||
Friend WithEvents LayoutControlGroupMain As DevExpress.XtraLayout.LayoutControlGroup
|
||||
@ -261,4 +286,8 @@ Partial Class frmFormDesigner
|
||||
Friend WithEvents SplitContainerMain As DevExpress.XtraEditors.SplitContainerControl
|
||||
Friend WithEvents ToolboxItemCombobox As DevExpress.XtraToolbox.ToolboxItem
|
||||
Friend WithEvents ToolboxItemCheckbox As DevExpress.XtraToolbox.ToolboxItem
|
||||
Friend WithEvents BarCheckEditLayout As DevExpress.XtraBars.BarCheckItem
|
||||
Friend WithEvents RibbonPageCategory1 As DevExpress.XtraBars.Ribbon.RibbonPageCategory
|
||||
Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage
|
||||
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
End Class
|
||||
142
EDMI_ClientSuite/FormDesigner/frmFormDesigner.resx
Normal file
142
EDMI_ClientSuite/FormDesigner/frmFormDesigner.resx
Normal file
@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="BarCheckEditLayout.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAG3RFWHRUaXRsZQBPdXRsaW5l
|
||||
O0JvcmRlcjtDb2xvcjtFPhLAAAAAiklEQVQ4T5WSyw2AIBBE6Yk6bMpQlL14924BsjrIEkJm+WzyQjLZ
|
||||
NxjViQhl2w8L/yE4sedCCDJC57xuiDU+FcxMJesTJKYK2M16DguIrKDkfwfWjGRgFuSlVtS8fBVakJda
|
||||
UfMiA6tAl7sy6BWoZMogFdQ8MdYFXRnQ33gFGq5AwxVouAIN5xH3Aj5Jzm636GRiAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="BarCheckEditLayout.ImageOptions.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAG3RFWHRUaXRsZQBPdXRsaW5l
|
||||
O0JvcmRlcjtDb2xvcjtFPhLAAAABDUlEQVRYR72S0Q2DMAxE2Yk5ulTFUB2iG/S//50gvYswSuEIaWI5
|
||||
0hNg4XtH1Sml5M7t/lDMIK3wPr97WPaA4TtK+VaC78qAURB+JTdmGeAFBQWqgF70AOGl9LTEtCxL8sLO
|
||||
6/05iIAqMecCnudEbpQleJ1cC1zIDSuR/6RuBRrlZJMTlwK9cjJcoFeO1cxQgZEvx/pYgRE5QUR/gVE5
|
||||
QUxfAQ85QVS1wHO9/hwvOUHcf7+Ap5wgsr2At5wgtr0AFiy8lO1plhPE/l3AJOVzOZeiMxDbVcBk+2cp
|
||||
qYHY7gImtasUEKxekgvU4EGY4vLLTVJDDiORw0jkMBI5jEQOI5HDSOQwEjmMRA7jSNMXcaR3S692HfcA
|
||||
AAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -5,11 +5,13 @@ Imports DevExpress.XtraLayout.Customization
|
||||
Imports DevExpress.XtraLayout.Dragging
|
||||
Imports DevExpress.XtraLayout.HitInfo
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
Imports DigitalData.GUIs.ClientSuite.ControlProperties
|
||||
Imports DigitalData.GUIs.ClientSuite.Controls
|
||||
Imports DigitalData.GUIs.ClientSuite.Controls.Properties
|
||||
Imports DigitalData.GUIs.ClientSuite.Controls.Editors
|
||||
|
||||
Public Class frmFormDesigner
|
||||
Private _FormId As Int64
|
||||
Private _ControlLoader As ClassControlLoader
|
||||
Private _ControlLoader As ControlLoader
|
||||
|
||||
#Region "Drag Helper"
|
||||
Private _DragItem As BaseLayoutItem
|
||||
@ -88,8 +90,6 @@ Public Class frmFormDesigner
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Public Sub New()
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
@ -105,7 +105,7 @@ Public Class frmFormDesigner
|
||||
End Sub
|
||||
|
||||
Private Async Sub frmFormDesigner_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
_ControlLoader = New ClassControlLoader(My.LogConfig, LayoutControlGroupMain)
|
||||
_ControlLoader = New ControlLoader(My.LogConfig, LayoutControlGroupMain)
|
||||
|
||||
Dim oTable = Await My.Common.Views.VWICM_FORM_CONTROL(_FormId)
|
||||
|
||||
@ -120,7 +120,7 @@ Public Class frmFormDesigner
|
||||
' TODO: Load Property Grid for selected item
|
||||
Dim oLayoutItem As LayoutControlItem = DirectCast(sender, LayoutControlItem)
|
||||
Dim oSelectedControl As BaseEdit = oLayoutItem.Control
|
||||
Dim oMetadata As ClassControlMetadata = oSelectedControl.Tag
|
||||
Dim oMetadata As Metadata = oSelectedControl.Tag
|
||||
|
||||
Select Case oSelectedControl.GetType
|
||||
Case GetType(MemoEdit)
|
||||
@ -128,12 +128,20 @@ Public Class frmFormDesigner
|
||||
Case GetType(TextEdit)
|
||||
|
||||
Case GetType(LookupControl2)
|
||||
PropertyGridControlMain.SelectedObject = New ClassComboboxProperties() With {
|
||||
.Datasource = "TEST",
|
||||
PropertyGridControlMain.SelectedObject = New ComboboxProperties() With {
|
||||
.Datasource = New DatasourceType,
|
||||
.Id = oMetadata.Id
|
||||
}
|
||||
End Select
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BarCheckEditLayout_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarCheckEditLayout.CheckedChanged
|
||||
If BarCheckEditLayout.Checked Then
|
||||
LayoutControlMain.ShowCustomizationForm()
|
||||
Else
|
||||
LayoutControlMain.HideCustomizationForm()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@ -1,27 +0,0 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class ClassControlLocalization
|
||||
Private Shared Function Lookup(key As String)
|
||||
Try
|
||||
Return My.Resources.ControlProperties.ResourceManager.GetString(key)
|
||||
Catch ex As Exception
|
||||
Return key
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Class LocalizedDescriptionAttribute
|
||||
Inherits DescriptionAttribute
|
||||
|
||||
Public Sub New(key As String)
|
||||
MyBase.New(Lookup(key))
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public Class LocalizedCategoryAttribute
|
||||
Inherits CategoryAttribute
|
||||
|
||||
Public Sub New(key As String)
|
||||
MyBase.New(Lookup(key))
|
||||
End Sub
|
||||
End Class
|
||||
End Class
|
||||
@ -1,4 +0,0 @@
|
||||
Public Class ClassControlMetadata
|
||||
Public Id As Int64
|
||||
Public Type As String
|
||||
End Class
|
||||
@ -1,15 +0,0 @@
|
||||
Imports System.ComponentModel
|
||||
Imports DigitalData.GUIs.ClientSuite.ClassControlLocalization
|
||||
|
||||
Namespace ControlProperties
|
||||
Public Class ClassComboboxProperties
|
||||
Inherits ClassBaseProperties
|
||||
|
||||
<LocalizedCategory("category_view")>
|
||||
<LocalizedDescription("desc_multiline")>
|
||||
<DefaultValue("")>
|
||||
Public Property Datasource As String
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
Imports DevExpress.XtraLayout
|
||||
Imports DigitalData.GUIs.ClientSuite
|
||||
Imports DigitalData.GUIs.ClientSuite.Controls
|
||||
|
||||
Public Class frmWorkflowStep
|
||||
Private _ControlLoader As ClassControlLoader
|
||||
Private _ControlData As ClassControlData
|
||||
Private _ControlLoader As ControlLoader
|
||||
Private _ControlData As ControlData
|
||||
|
||||
Private _FormId As Int64
|
||||
Private _RequestId As Int64
|
||||
@ -54,12 +55,16 @@ Public Class frmWorkflowStep
|
||||
_HeaderGroup = LayoutControlGroupMain.AddGroup("Request Header")
|
||||
_BodyGroup = LayoutControlGroupMain.AddGroup("Control Body")
|
||||
|
||||
_ControlLoader = New ClassControlLoader(My.LogConfig, _BodyGroup)
|
||||
_ControlData = New ClassControlData(My.LogConfig)
|
||||
_ControlLoader = New ControlLoader(My.LogConfig, _BodyGroup)
|
||||
_ControlData = New ControlData(My.LogConfig)
|
||||
|
||||
LayoutControl1.BeginUpdate()
|
||||
|
||||
_ControlLoader.LoadControls(oControlTable)
|
||||
_ControlData.LoadControlData(_ControlLoader.LayoutControls, oControlData)
|
||||
|
||||
LayoutControl1.EndUpdate()
|
||||
|
||||
_ControlLoader.AddControl("Process Name", _ProcessName, _HeaderGroup)
|
||||
_ControlLoader.AddControl("Request Name", _RequestName, _HeaderGroup)
|
||||
End Sub
|
||||
|
||||
@ -199,6 +199,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Legt die Datenquelle des Elements fest. ähnelt.
|
||||
'''</summary>
|
||||
Public Shared ReadOnly Property desc_datasource() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("desc_datasource", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Gibt den Standardwert dieses Elements an. ähnelt.
|
||||
'''</summary>
|
||||
|
||||
@ -249,4 +249,7 @@
|
||||
<data name="category_input" xml:space="preserve">
|
||||
<value>Input Configuration</value>
|
||||
</data>
|
||||
<data name="desc_datasource" xml:space="preserve">
|
||||
<value>Sets the element's datasource</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -249,4 +249,7 @@
|
||||
<data name="category_input" xml:space="preserve">
|
||||
<value>Eingabe Eigenschaften</value>
|
||||
</data>
|
||||
<data name="desc_datasource" xml:space="preserve">
|
||||
<value>Legt die Datenquelle des Elements fest.</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -2,5 +2,6 @@
|
||||
<packages>
|
||||
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
|
||||
<package id="FirebirdSql.EntityFrameworkCore.Firebird" version="6.4.0" targetFramework="net461" />
|
||||
<package id="jacobslusser.ScintillaNET" version="3.6.3" targetFramework="net461" />
|
||||
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net461" />
|
||||
</packages>
|
||||
Loading…
x
Reference in New Issue
Block a user