Common/ObjectPropertyDialog: Respect System attribute flag
This commit is contained in:
parent
abb850192a
commit
a6de7e0af2
@ -124,10 +124,6 @@
|
||||
<Compile Include="IBaseForm.vb" />
|
||||
<Compile Include="IResultForm.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
@ -174,7 +170,6 @@
|
||||
<None Include="app.config" />
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
|
||||
13
GUIs.Common/My Project/Application.Designer.vb
generated
13
GUIs.Common/My Project/Application.Designer.vb
generated
@ -1,13 +0,0 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
@ -255,78 +255,78 @@ Partial Class frmObjectPropertyDialog
|
||||
'
|
||||
'txtCreatedWhen
|
||||
'
|
||||
Me.txtCreatedWhen.Location = New System.Drawing.Point(85, 37)
|
||||
Me.txtCreatedWhen.Location = New System.Drawing.Point(94, 37)
|
||||
Me.txtCreatedWhen.Name = "txtCreatedWhen"
|
||||
Me.txtCreatedWhen.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White
|
||||
Me.txtCreatedWhen.Properties.AppearanceReadOnly.Options.UseBackColor = True
|
||||
Me.txtCreatedWhen.Properties.ReadOnly = True
|
||||
Me.txtCreatedWhen.Size = New System.Drawing.Size(199, 20)
|
||||
Me.txtCreatedWhen.Size = New System.Drawing.Size(190, 20)
|
||||
Me.txtCreatedWhen.StyleController = Me.LayoutControlObject
|
||||
Me.txtCreatedWhen.TabIndex = 4
|
||||
'
|
||||
'txtChangedWhen
|
||||
'
|
||||
Me.txtChangedWhen.Location = New System.Drawing.Point(85, 61)
|
||||
Me.txtChangedWhen.Location = New System.Drawing.Point(94, 61)
|
||||
Me.txtChangedWhen.Name = "txtChangedWhen"
|
||||
Me.txtChangedWhen.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White
|
||||
Me.txtChangedWhen.Properties.AppearanceReadOnly.Options.UseBackColor = True
|
||||
Me.txtChangedWhen.Properties.ReadOnly = True
|
||||
Me.txtChangedWhen.Size = New System.Drawing.Size(199, 20)
|
||||
Me.txtChangedWhen.Size = New System.Drawing.Size(190, 20)
|
||||
Me.txtChangedWhen.StyleController = Me.LayoutControlObject
|
||||
Me.txtChangedWhen.TabIndex = 5
|
||||
'
|
||||
'txtAccessedWhen
|
||||
'
|
||||
Me.txtAccessedWhen.Location = New System.Drawing.Point(85, 85)
|
||||
Me.txtAccessedWhen.Location = New System.Drawing.Point(94, 85)
|
||||
Me.txtAccessedWhen.Name = "txtAccessedWhen"
|
||||
Me.txtAccessedWhen.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White
|
||||
Me.txtAccessedWhen.Properties.AppearanceReadOnly.Options.UseBackColor = True
|
||||
Me.txtAccessedWhen.Properties.ReadOnly = True
|
||||
Me.txtAccessedWhen.Size = New System.Drawing.Size(199, 20)
|
||||
Me.txtAccessedWhen.Size = New System.Drawing.Size(190, 20)
|
||||
Me.txtAccessedWhen.StyleController = Me.LayoutControlObject
|
||||
Me.txtAccessedWhen.TabIndex = 6
|
||||
'
|
||||
'txtObjectId
|
||||
'
|
||||
Me.txtObjectId.Location = New System.Drawing.Point(85, 12)
|
||||
Me.txtObjectId.Location = New System.Drawing.Point(94, 12)
|
||||
Me.txtObjectId.Name = "txtObjectId"
|
||||
Me.txtObjectId.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White
|
||||
Me.txtObjectId.Properties.AppearanceReadOnly.Options.UseBackColor = True
|
||||
Me.txtObjectId.Properties.ReadOnly = True
|
||||
Me.txtObjectId.Size = New System.Drawing.Size(475, 20)
|
||||
Me.txtObjectId.Size = New System.Drawing.Size(466, 20)
|
||||
Me.txtObjectId.StyleController = Me.LayoutControlObject
|
||||
Me.txtObjectId.TabIndex = 7
|
||||
'
|
||||
'txtCreatedWho
|
||||
'
|
||||
Me.txtCreatedWho.Location = New System.Drawing.Point(361, 37)
|
||||
Me.txtCreatedWho.Location = New System.Drawing.Point(370, 37)
|
||||
Me.txtCreatedWho.Name = "txtCreatedWho"
|
||||
Me.txtCreatedWho.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White
|
||||
Me.txtCreatedWho.Properties.AppearanceReadOnly.Options.UseBackColor = True
|
||||
Me.txtCreatedWho.Properties.ReadOnly = True
|
||||
Me.txtCreatedWho.Size = New System.Drawing.Size(199, 20)
|
||||
Me.txtCreatedWho.Size = New System.Drawing.Size(190, 20)
|
||||
Me.txtCreatedWho.StyleController = Me.LayoutControlObject
|
||||
Me.txtCreatedWho.TabIndex = 8
|
||||
'
|
||||
'txtChangedWho
|
||||
'
|
||||
Me.txtChangedWho.Location = New System.Drawing.Point(361, 61)
|
||||
Me.txtChangedWho.Location = New System.Drawing.Point(370, 61)
|
||||
Me.txtChangedWho.Name = "txtChangedWho"
|
||||
Me.txtChangedWho.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White
|
||||
Me.txtChangedWho.Properties.AppearanceReadOnly.Options.UseBackColor = True
|
||||
Me.txtChangedWho.Properties.ReadOnly = True
|
||||
Me.txtChangedWho.Size = New System.Drawing.Size(199, 20)
|
||||
Me.txtChangedWho.Size = New System.Drawing.Size(190, 20)
|
||||
Me.txtChangedWho.StyleController = Me.LayoutControlObject
|
||||
Me.txtChangedWho.TabIndex = 9
|
||||
'
|
||||
'TextEdit1
|
||||
'
|
||||
Me.TextEdit1.Location = New System.Drawing.Point(361, 85)
|
||||
Me.TextEdit1.Location = New System.Drawing.Point(370, 85)
|
||||
Me.TextEdit1.Name = "TextEdit1"
|
||||
Me.TextEdit1.Properties.AppearanceReadOnly.BackColor = System.Drawing.Color.White
|
||||
Me.TextEdit1.Properties.AppearanceReadOnly.Options.UseBackColor = True
|
||||
Me.TextEdit1.Properties.ReadOnly = True
|
||||
Me.TextEdit1.Size = New System.Drawing.Size(199, 20)
|
||||
Me.TextEdit1.Size = New System.Drawing.Size(190, 20)
|
||||
Me.TextEdit1.StyleController = Me.LayoutControlObject
|
||||
Me.TextEdit1.TabIndex = 10
|
||||
'
|
||||
|
||||
@ -120,7 +120,7 @@
|
||||
<assembly alias="DevExpress.Data.v21.2" name="DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<data name="frmObjectPropertyDialog.IconOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
||||
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
||||
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAACcFAAAC77u/
|
||||
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
|
||||
|
||||
@ -88,7 +88,8 @@ Public Class frmObjectPropertyDialog
|
||||
.ID = oRow.Item("ATTR_ID"),
|
||||
.Title = oRow.Item("ATTR_TITLE"),
|
||||
.TypeID = oRow.Item("TYPE_ID"),
|
||||
.TypeName = oRow.Item("TYPE_NAME")
|
||||
.TypeName = oRow.Item("TYPE_NAME"),
|
||||
.IsSystem = Convert.ToBoolean(oRow.Item("SYS_ATTRIBUTE"))
|
||||
})
|
||||
Next
|
||||
|
||||
@ -175,7 +176,8 @@ Public Class frmObjectPropertyDialog
|
||||
End If
|
||||
|
||||
For Each oAttribute As Attribute In oAttributes
|
||||
Dim oControl = _Controls.GetControlForAttribute(oAttribute, True)
|
||||
Dim oEditable = ShouldControlBeEditable(oAttribute)
|
||||
Dim oControl = _Controls.GetControlForAttribute(oAttribute, Not oEditable)
|
||||
Dim oItem As LayoutControlItem = AttributeLayout.AddItem()
|
||||
|
||||
oItem.Text = oAttribute.Title
|
||||
@ -188,11 +190,13 @@ Public Class frmObjectPropertyDialog
|
||||
Dim oValue = Await GetAttributeValue(oItem.Name, _ObjectId)
|
||||
Dim oEdit = DirectCast(oItem.Control, BaseEdit)
|
||||
oEdit.EditValue = oValue
|
||||
|
||||
ElseIf TypeOf oItem.Control Is GridControl Then
|
||||
Dim oValueTable = Await GetAttributeValueAsTable(oItem.Name, _ObjectId)
|
||||
Dim oGrid = DirectCast(oItem.Control, GridControl)
|
||||
oGrid.DataSource = oValueTable
|
||||
|
||||
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
@ -200,6 +204,15 @@ Public Class frmObjectPropertyDialog
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ShouldControlBeEditable(pAttribute As Attribute) As Boolean
|
||||
If pAttribute.IsSystem Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function ShowAttributeHistory(pDatatable As DataTable) As Boolean
|
||||
Try
|
||||
If pDatatable.Rows.Count > 0
|
||||
@ -234,8 +247,4 @@ Public Class frmObjectPropertyDialog
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub TabFormControl1_Click(sender As Object, e As EventArgs) Handles TabFormControl1.Click
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
@ -10,4 +10,5 @@
|
||||
Public Property Title As String
|
||||
Public Property TypeID As Long
|
||||
Public Property TypeName As String
|
||||
Public Property IsSystem As Boolean
|
||||
End Class
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user