31.07.2023
This commit is contained in:
@@ -3,6 +3,7 @@ Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.GUIs.Common
|
||||
|
||||
Public Class frmMain
|
||||
Private LogConfig As LogConfig
|
||||
@@ -11,6 +12,8 @@ Public Class frmMain
|
||||
Private ConfigManager As ConfigManager(Of Config)
|
||||
Private DbConfig As DbConfig
|
||||
|
||||
Private GridBuilder As GridBuilder
|
||||
|
||||
Private State As State
|
||||
Private Controller As EnvelopeListController
|
||||
|
||||
@@ -41,8 +44,14 @@ Public Class frmMain
|
||||
|
||||
Controller = New EnvelopeListController(State)
|
||||
|
||||
GridBuilder = New GridBuilder(ViewEnvelopes)
|
||||
GridBuilder.SetDefaults(ViewEnvelopes)
|
||||
GridBuilder.SetReadOnlyOptions(ViewEnvelopes)
|
||||
|
||||
GridEnvelopes.DataSource = Controller.ListEnvelopes()
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
@@ -71,9 +80,20 @@ Public Class frmMain
|
||||
Private Sub btnEditEnvelope_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnEditEnvelope.ItemClick
|
||||
Dim oSelectedRows = ViewEnvelopes.GetSelectedRows()
|
||||
If oSelectedRows.Count > 0 Then
|
||||
Dim oEnvelope As Envelope = ViewEnvelopes.GetRow(oSelectedRows(0))
|
||||
Dim oForm As New frmEnvelopeEditor() With {.State = State, .Envelope = oEnvelope}
|
||||
oForm.ShowDialog()
|
||||
LoadEnvelope(oSelectedRows.First)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LoadEnvelope(pRowHandle As Integer)
|
||||
Dim oEnvelope As Envelope = ViewEnvelopes.GetRow(pRowHandle)
|
||||
Dim oForm As New frmEnvelopeEditor() With {.State = State, .Envelope = oEnvelope}
|
||||
oForm.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub ViewEnvelopes_DoubleClick(sender As Object, e As EventArgs) Handles ViewEnvelopes.DoubleClick
|
||||
Dim oSelectedRows = ViewEnvelopes.GetSelectedRows()
|
||||
If oSelectedRows.Count > 0 Then
|
||||
LoadEnvelope(oSelectedRows.First)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user