Farbauswahl, Zweiter Titel
This commit is contained in:
@@ -58,4 +58,12 @@
|
|||||||
DefaultLabels
|
DefaultLabels
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
|
Public Enum DesignTypeEnum
|
||||||
|
DefaultColors
|
||||||
|
Mixed
|
||||||
|
Office2013
|
||||||
|
Aspect
|
||||||
|
Solstice
|
||||||
|
End Enum
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Public Class ChartParameter
|
Public Class ChartParameter
|
||||||
Public Id As Integer
|
Public Id As Integer
|
||||||
Public Title As String
|
Public Title As String
|
||||||
|
Public SerieTitle As String
|
||||||
Public ChartPos As Constants.ChartPosEnum
|
Public ChartPos As Constants.ChartPosEnum
|
||||||
Public SQLCommand As String
|
Public SQLCommand As String
|
||||||
Public ChartType As Constants.ChartTypeEnum
|
Public ChartType As Constants.ChartTypeEnum
|
||||||
@@ -8,6 +9,8 @@
|
|||||||
Public Value As String
|
Public Value As String
|
||||||
Public SearchId As Integer
|
Public SearchId As Integer
|
||||||
Public LabelType As Constants.LabelTypeEnum
|
Public LabelType As Constants.LabelTypeEnum
|
||||||
|
Public DesignType As Constants.DesignTypeEnum
|
||||||
|
Public DesignBaseColor As Integer
|
||||||
|
|
||||||
Public Overrides Function ToString() As String
|
Public Overrides Function ToString() As String
|
||||||
Return Title
|
Return Title
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ Imports DevExpress.XtraEditors
|
|||||||
Imports System.Drawing.Imaging
|
Imports System.Drawing.Imaging
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports DevExpress.XtraBars
|
Imports DevExpress.XtraBars
|
||||||
|
Imports System.Net
|
||||||
|
Imports System.Runtime.InteropServices.ComTypes
|
||||||
|
|
||||||
|
|
||||||
Public Class frmMonitor
|
Public Class frmMonitor
|
||||||
@@ -324,6 +326,7 @@ Public Class frmMonitor
|
|||||||
End Select
|
End Select
|
||||||
|
|
||||||
SetChartTitle(ChartViewResults, oChartParameterSet.Title)
|
SetChartTitle(ChartViewResults, oChartParameterSet.Title)
|
||||||
|
SetChartDesign(ChartViewResults, oChartParameterSet.DesignType, oChartParameterSet.DesignBaseColor)
|
||||||
Dim oSerie As Series = Await GetChartSerie(oChartParameterSet, oControls)
|
Dim oSerie As Series = Await GetChartSerie(oChartParameterSet, oControls)
|
||||||
ChartViewResults.Series.Add(oSerie)
|
ChartViewResults.Series.Add(oSerie)
|
||||||
Next
|
Next
|
||||||
@@ -417,6 +420,24 @@ Public Class frmMonitor
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Sub SetChartDesign(pChartView As ChartControl, pDesignType As DesignTypeEnum, pDesignBaseColor As Integer)
|
||||||
|
|
||||||
|
Select Case pDesignType
|
||||||
|
Case DesignTypeEnum.Aspect
|
||||||
|
pChartView.PaletteName = "Aspect"
|
||||||
|
Case DesignTypeEnum.Mixed
|
||||||
|
pChartView.PaletteName = "Mixed"
|
||||||
|
Case DesignTypeEnum.Office2013
|
||||||
|
pChartView.PaletteName = "Office 2013"
|
||||||
|
Case DesignTypeEnum.Solstice
|
||||||
|
pChartView.PaletteName = "Solstice"
|
||||||
|
Case Else
|
||||||
|
pChartView.PaletteName = "Office"
|
||||||
|
End Select
|
||||||
|
|
||||||
|
pChartView.PaletteBaseColorNumber = pDesignBaseColor
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub ActivateMenuBarButtons(pSearchType As ReturnTypeEnum)
|
Private Sub ActivateMenuBarButtons(pSearchType As ReturnTypeEnum)
|
||||||
Select Case pSearchType
|
Select Case pSearchType
|
||||||
Case ReturnTypeEnum.ChartView
|
Case ReturnTypeEnum.ChartView
|
||||||
@@ -433,19 +454,27 @@ Public Class frmMonitor
|
|||||||
Private Async Function GetChartSerie(pChartParameters As ChartParameter, pControls As List(Of Control)) As Threading.Tasks.Task(Of Series)
|
Private Async Function GetChartSerie(pChartParameters As ChartParameter, pControls As List(Of Control)) As Threading.Tasks.Task(Of Series)
|
||||||
Dim oSerie As Series
|
Dim oSerie As Series
|
||||||
|
|
||||||
|
Dim serieTitle As String
|
||||||
|
|
||||||
|
If String.IsNullOrEmpty(pChartParameters.SerieTitle) = False Then
|
||||||
|
serieTitle = pChartParameters.SerieTitle
|
||||||
|
Else
|
||||||
|
serieTitle = pChartParameters.Title
|
||||||
|
End If
|
||||||
|
|
||||||
Select Case pChartParameters.ChartType
|
Select Case pChartParameters.ChartType
|
||||||
Case ChartTypeEnum.Bar
|
Case ChartTypeEnum.Bar
|
||||||
oSerie = New Series(pChartParameters.Title, ViewType.Bar)
|
oSerie = New Series(serieTitle, ViewType.Bar)
|
||||||
Case ChartTypeEnum.Line
|
Case ChartTypeEnum.Line
|
||||||
oSerie = New Series(pChartParameters.Title, ViewType.Line)
|
oSerie = New Series(serieTitle, ViewType.Line)
|
||||||
Case ChartTypeEnum.Area
|
Case ChartTypeEnum.Area
|
||||||
oSerie = New Series(pChartParameters.Title, ViewType.Area)
|
oSerie = New Series(serieTitle, ViewType.Area)
|
||||||
Case ChartTypeEnum.Pie
|
Case ChartTypeEnum.Pie
|
||||||
oSerie = New Series(pChartParameters.Title, ViewType.Pie) With {
|
oSerie = New Series(serieTitle, ViewType.Pie) With {
|
||||||
.LegendTextPattern = "{A}"
|
.LegendTextPattern = "{A}"
|
||||||
}
|
}
|
||||||
Case ChartTypeEnum.StackedBar
|
Case ChartTypeEnum.StackedBar
|
||||||
oSerie = New Series(pChartParameters.Title, ViewType.StackedBar)
|
oSerie = New Series(serieTitle, ViewType.StackedBar)
|
||||||
Case Else
|
Case Else
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End Select
|
End Select
|
||||||
|
|||||||
@@ -107,7 +107,10 @@ Public Class SearchLoader
|
|||||||
.ChartType = GetChartType(oRow.ItemEx("CHART_TYPE", String.Empty)),
|
.ChartType = GetChartType(oRow.ItemEx("CHART_TYPE", String.Empty)),
|
||||||
.Argument = oRow.ItemEx("ARGUMENT", String.Empty),
|
.Argument = oRow.ItemEx("ARGUMENT", String.Empty),
|
||||||
.Value = oRow.ItemEx("VALUE", String.Empty),
|
.Value = oRow.ItemEx("VALUE", String.Empty),
|
||||||
.LabelType = GetLabelType(oRow.ItemEx("LABEL_TYPE", String.Empty))
|
.LabelType = GetLabelType(oRow.ItemEx("LABEL_TYPE", String.Empty)),
|
||||||
|
.SerieTitle = oRow.ItemEx("SERIE_TITLE", String.Empty),
|
||||||
|
.DesignType = GetDesignType(oRow.ItemEx("DESIGN_TYPE", String.Empty)),
|
||||||
|
.DesignBaseColor = GetDesignBaseColor(oRow.ItemEx("DESIGN_TYPE", String.Empty))
|
||||||
})
|
})
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -181,6 +184,37 @@ Public Class SearchLoader
|
|||||||
End Select
|
End Select
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function GetDesignType(pTypeString As String) As DesignTypeEnum
|
||||||
|
|
||||||
|
Dim items() As String = pTypeString.Split("|"c)
|
||||||
|
|
||||||
|
Select Case items(0).ToUpper
|
||||||
|
Case "ASPECT"
|
||||||
|
Return DesignTypeEnum.Aspect
|
||||||
|
Case "MIXED"
|
||||||
|
Return DesignTypeEnum.Mixed
|
||||||
|
Case "OFFICE2013"
|
||||||
|
Return DesignTypeEnum.Office2013
|
||||||
|
Case "SOLSTICE"
|
||||||
|
Return DesignTypeEnum.Solstice
|
||||||
|
Case Else
|
||||||
|
Return DesignTypeEnum.DefaultColors
|
||||||
|
End Select
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function GetDesignBaseColor(pTypeString As String) As Integer
|
||||||
|
Dim items() As String = pTypeString.Split("|"c)
|
||||||
|
Dim retValue As Integer = 0
|
||||||
|
|
||||||
|
If items.Length > 1 Then
|
||||||
|
If Integer.TryParse(items(1), retValue) = False Then
|
||||||
|
retValue = 0
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return retValue
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Function GetChartPosType(pPosTypeId As Integer) As ChartPosEnum
|
Private Function GetChartPosType(pPosTypeId As Integer) As ChartPosEnum
|
||||||
Select Case pPosTypeId
|
Select Case pPosTypeId
|
||||||
Case 1
|
Case 1
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' You can specify all the values or you can default the Build and Revision Numbers
|
' You can specify all the values or you can default the Build and Revision Numbers
|
||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' [assembly: AssemblyVersion("1.0.*")]
|
' [assembly: AssemblyVersion("1.0.*")]
|
||||||
<Assembly: AssemblyVersion("1.6.3.0")>
|
<Assembly: AssemblyVersion("1.6.4.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
|
|||||||
Reference in New Issue
Block a user