|
Vereinsmeisterschaften
22aa7800eae54b428d40e835886cefe1fdefdfdf
This is a software that can be used to manage the internal competition of the swimming club Illertissen called "Vereinsmeisterschaften".
|
This page describes how to add new analytics widgets (displayed on the analytics page).
The module will deliver the data.
IAnalyticsModule. The AnalyticsAvailable flag can be returned, depending on the availability of the data.services.AddSingleton<AnalyticsModule<AnalyticsName>>();SupportedDocumentPlaceholderKeys property that should return a list with all placeholder keys that are supported by this analytics module. e.g. public List<string> SupportedDocumentPlaceholderKeys => new List<string>()
{
Placeholders.PLACEHOLDER_KEY_ANALYTICS_EXAMPLE_PLACEHOLDER1,
Placeholders.PLACEHOLDER_KEY_ANALYTICS_EXAMPLE_PLACEHOLDER2
}; CollectDocumentPlaceholderContents method that should return a DocXPlaceholderHelper.TextPlaceholders object containing all placeholder contents. e.g. public DocXPlaceholderHelper.TextPlaceholders CollectDocumentPlaceholderContents()
{
DocXPlaceholderHelper.TextPlaceholders textPlaceholder = new DocXPlaceholderHelper.TextPlaceholders();
foreach (string placeholder in Placeholders.Placeholders_AnalyticsExamplePlaceholder1) { textPlaceholder.Add(placeholder, ModulePropertyInt1.ToString()); }
foreach (string placeholder in Placeholders.Placeholders_AnalyticsExamplePlaceholder2) { textPlaceholder.Add(placeholder, ModulePropertyStr2); }
return textPlaceholder;
} The widget will display the data that is delivered by the module.
AnalyticsWidgetBase.public AnalyticsWidget<AnalyticsName>(AnalyticsModule<AnalyticsName> analyticsModule) : base(analyticsModule) { InitializeComponent(); } private AnalyticsModule<AnalyticsName> _analyticsModule => AnalyticsModule as AnalyticsModule<AnalyticsName>; NormalAnalyticsWidgetWidth and NormalAnalyticsWidgetHeight properties.<local:AnalyticsWidgetBase x:Class="Vereinsmeisterschaften.Views.AnalyticsWidgets.AnalyticsWidget<AnalyticsName>"...DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}"Template="{StaticResource ControlTemplateAnalyticsWidgetBase}"When the charts needs scrolling (see e.g. AnalyticsWidgetStartsPerPerson.xaml for an example):
<ScrollViewer x:Name="PART_scrollViewerChart" behaviors:NestedScrollViewersBehavior.IsEnabled="True">...Chart Height="{Binding ChartHeight}"PART_scrollViewerChart.SizeChanged += (sender, e) => OnPropertyChanged(nameof(ChartHeight));public double ChartHeight => Math.Max(PART_scrollViewerChart.ActualHeight, NumberRows * ChartMaxBarWidth);