TekH 8db72037e0 refactor(form): vbproj aktualisieren, um mit .net 8 zu konfigurieren.
- Verwandte Referenzen für net 9 hinzufügen.
 - Backup-XML-Datei für altes vbproj erstellen.
2025-09-10 13:27:48 +02:00

57 lines
1.7 KiB
VB.net

Imports System.Data
Imports System.Windows.Forms
Imports DevExpress.XtraCharts
Imports EnvelopeGenerator.CommonServices
Imports EnvelopeGenerator.Domain
Public Class EnvelopeListController
Inherits BaseController
Public Sub New(pState As State)
MyBase.New(pState)
End Sub
Public Function ListEnvelopes() As IEnumerable(Of Entities.Envelope)
Return EnvelopeModel.List()
End Function
Public Function ListCompleted() As Object
Return EnvelopeModel.ListCompleted()
End Function
Public Overloads Function DeleteEnvelope(pEnvelope As Entities.Envelope, pReason As String) As Boolean
Return MyBase.DeleteEnvelope(pEnvelope, pReason)
End Function
Public Function GetPieChart() As ChartControl
Dim oChartControl As ChartControl = New ChartControl With {
.Name = "ChartControl1",
.Dock = DockStyle.Fill
}
Dim oSerie As Series = New Series("PIE Title", ViewType.Pie3D) With {
.LegendTextPattern = "{A}"
}
Dim pieLabel As PieSeriesLabel = TryCast(oSerie.Label, PieSeriesLabel)
If pieLabel IsNot Nothing Then
pieLabel.Position = PieSeriesLabelPosition.Outside
End If
Dim xAxisTitle As String = "Argument"
Dim yAxisTitle As String = "Value"
Dim oTable As DataTable = ChartModel.LoadPIEExample()
For Each oRow In oTable.Rows
Dim value1 As String = CStr(oRow.Item(xAxisTitle))
Dim value2 As String = CStr(oRow.Item(yAxisTitle))
oSerie.Points.Add(New SeriesPoint(value1, value2))
Next
oSerie.ArgumentScaleType = ScaleType.Qualitative
oChartControl.Series.Add(oSerie)
Return oChartControl
End Function
End Class