Repository: Eremex/controls-demo
Branch: main
Commit: 04d656ce78ce
Files: 455
Total size: 1.2 MB
Directory structure:
gitextract_lif3ay9j/
├── .github/
│ └── workflows/
│ ├── deploy.yml
│ ├── publish.yml
│ ├── release-tag.yml
│ └── test.yml
├── .gitignore
├── DemoCenter/
│ ├── DemoCenter/
│ │ ├── App.axaml
│ │ ├── App.axaml.cs
│ │ ├── AssemblyInfo.cs
│ │ ├── DemoCenter.csproj
│ │ ├── DemoData/
│ │ │ ├── ApparelProducts.cs
│ │ │ ├── CsvClasses/
│ │ │ │ ├── CarInfo.cs
│ │ │ │ ├── CsvClasses.cs
│ │ │ │ ├── CsvColumnData.cs
│ │ │ │ ├── StockInfo.cs
│ │ │ │ └── StockProduct.cs
│ │ │ ├── CsvSources.cs
│ │ │ ├── ElementsSources.cs
│ │ │ ├── EmployeesData.cs
│ │ │ ├── Enums.cs
│ │ │ ├── InfrastructureData.cs
│ │ │ ├── OrderData.cs
│ │ │ ├── ProjectTasksData.cs
│ │ │ ├── SalesData.cs
│ │ │ └── csv/
│ │ │ ├── Bitcoin Historical Data.csv
│ │ │ ├── CarImages/
│ │ │ │ ├── convert.bat
│ │ │ │ └── readme.txt
│ │ │ ├── cars.csv
│ │ │ ├── logarithmic.csv
│ │ │ ├── mechs.csv
│ │ │ ├── orgchat.csv
│ │ │ ├── spacexlaunches.csv
│ │ │ ├── stockProducts.csv
│ │ │ ├── yachtNames.csv
│ │ │ └── yachts.csv
│ │ ├── Helpers/
│ │ │ ├── HeatmapHelper.cs
│ │ │ └── ThemedSyntaxHighlighter.cs
│ │ ├── ProductsData/
│ │ │ ├── BarsGroupInfo.cs
│ │ │ ├── CartesianChartGroupInfo.cs
│ │ │ ├── CommonControlsGroupInfo.cs
│ │ │ ├── DataGridGroupInfo.cs
│ │ │ ├── DeveloperToolsGroupInfo.cs
│ │ │ ├── EditorsGroupInfo.cs
│ │ │ ├── Graphics3DControlGroupInfo.cs
│ │ │ ├── GroupInfo.cs
│ │ │ ├── HeatmapGroupInfo.cs
│ │ │ ├── PageInfo.cs
│ │ │ ├── PolarChartGroupInfo.cs
│ │ │ ├── ProductInfoBase.cs
│ │ │ ├── Products.cs
│ │ │ ├── PropertyGridGroupInfo.cs
│ │ │ ├── RibbonGroupInfo.cs
│ │ │ ├── SmithChartGroupInfo.cs
│ │ │ ├── StandardControlsGroupInfo.cs
│ │ │ ├── TreeListGroupInfo.cs
│ │ │ └── UseCasesGroupInfo.cs
│ │ ├── Resources/
│ │ │ ├── Colors.Dark.axaml
│ │ │ ├── Colors.Light.axaml
│ │ │ ├── Graphics3D/
│ │ │ │ └── Models/
│ │ │ │ └── robot_arm_2.fbx
│ │ │ ├── Highlighters/
│ │ │ │ ├── Axaml-Highlight-Dark.xshd
│ │ │ │ ├── Axaml-Highlight-Light.xshd
│ │ │ │ ├── CSharp-Highlight-Dark.xshd
│ │ │ │ └── CSharp-Highlight-Light.xshd
│ │ │ ├── SearchPanel.axaml
│ │ │ ├── SharedResources.axaml
│ │ │ ├── SharedStyles.axaml
│ │ │ ├── SvgIconsBrowserViewResources.Designer.cs
│ │ │ └── SvgIconsBrowserViewResources.resx
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Resources.ru.resx
│ │ ├── Resources.zh-Hans.resx
│ │ ├── ViewLocator.cs
│ │ ├── ViewModels/
│ │ │ ├── Bars/
│ │ │ │ ├── BarItemsPageViewModel.cs
│ │ │ │ ├── BarsGroupViewModel.cs
│ │ │ │ ├── BarsOverviewPageViewModel.cs
│ │ │ │ ├── ContextMenuPageViewModel.cs
│ │ │ │ └── ToolbarAndMenuPageViewModel.cs
│ │ │ ├── Charts/
│ │ │ │ ├── CartesianAreaSeriesViewViewModel.cs
│ │ │ │ ├── CartesianCandlestickAggregationViewModel.cs
│ │ │ │ ├── CartesianCandlestickSeriesViewViewModel.cs
│ │ │ │ ├── CartesianChartAxesPageViewModel.cs
│ │ │ │ ├── CartesianChartLargeDataPageViewModel.cs
│ │ │ │ ├── CartesianChartLogarithmicScalePageViewModel.cs
│ │ │ │ ├── CartesianChartRealtimePageViewModel.cs
│ │ │ │ ├── CartesianEmptyPointsViewModel.cs
│ │ │ │ ├── CartesianFullStackedAreaSeriesViewViewModel.cs
│ │ │ │ ├── CartesianLineSeriesViewViewModel.cs
│ │ │ │ ├── CartesianLollipopSeriesViewViewModel.cs
│ │ │ │ ├── CartesianPointSeriesViewViewModel.cs
│ │ │ │ ├── CartesianRangeAreaSeriesViewViewModel.cs
│ │ │ │ ├── CartesianScatterLineSeriesViewViewModel.cs
│ │ │ │ ├── CartesianSideBySideBarSeriesViewViewModel.cs
│ │ │ │ ├── CartesianSideBySideRangeBarSeriesViewViewModel.cs
│ │ │ │ ├── CartesianStackedAreaSeriesViewViewModel.cs
│ │ │ │ ├── CartesianStepAreaSeriesViewViewModel.cs
│ │ │ │ ├── CartesianStepLineSeriesViewViewModel.cs
│ │ │ │ ├── CartesianStripsAndConstantLinesViewModel.cs
│ │ │ │ ├── ChartElementViewModels/
│ │ │ │ │ ├── AxisViewModel.cs
│ │ │ │ │ ├── ConstantLineViewModel.cs
│ │ │ │ │ ├── CustomLabelFormatter.cs
│ │ │ │ │ ├── LogarithmicAxisViewModel.cs
│ │ │ │ │ ├── SeriesViewModel.cs
│ │ │ │ │ └── ViewViewModel.cs
│ │ │ │ ├── ChartsPageViewModel.cs
│ │ │ │ ├── Data/
│ │ │ │ │ ├── ClusterDataAdapter.cs
│ │ │ │ │ ├── RealtimeDataGenerator.cs
│ │ │ │ │ └── SmithSampleDataAdapter.cs
│ │ │ │ ├── HeatmapColorProvidersViewModel.cs
│ │ │ │ ├── HeatmapRealTimeViewModel.cs
│ │ │ │ ├── PolarAreaSeriesViewViewModel.cs
│ │ │ │ ├── PolarEmptyPointsViewModel.cs
│ │ │ │ ├── PolarLineSeriesViewViewModel.cs
│ │ │ │ ├── PolarPointSeriesViewViewModel.cs
│ │ │ │ ├── PolarRangeAreaSeriesViewViewModel.cs
│ │ │ │ ├── PolarScatterLineSeriesViewViewModel.cs
│ │ │ │ ├── PolarStripsAndConstantLinesViewModel.cs
│ │ │ │ ├── SmithLineSeriesViewViewModel.cs
│ │ │ │ └── SmithPointSeriesViewViewModel.cs
│ │ │ ├── CommonControls/
│ │ │ │ ├── CommonControlsGroupViewModel.cs
│ │ │ │ ├── MessageBoxPageViewModel.cs
│ │ │ │ ├── SplitContainerControlPageViewModel.cs
│ │ │ │ └── TabControlPageViewModel.cs
│ │ │ ├── DataGrid/
│ │ │ │ ├── DataGridColumnBandsViewModel.cs
│ │ │ │ ├── DataGridDataEditorsViewModel.cs
│ │ │ │ ├── DataGridDragDropPageViewModel.cs
│ │ │ │ ├── DataGridExportViewModel.cs
│ │ │ │ ├── DataGridFilteringViewModel.cs
│ │ │ │ ├── DataGridFixedColuimnsViewModel.cs
│ │ │ │ ├── DataGridGroupingPageViewModel.cs
│ │ │ │ ├── DataGridLargeDataPageViewModel.cs
│ │ │ │ ├── DataGridLiveDataPageViewModel.cs
│ │ │ │ ├── DataGridMultipleSelectionPageViewModel.cs
│ │ │ │ ├── DataGridPageViewModel.cs
│ │ │ │ ├── DataGridRowAutoHeightViewModel.cs
│ │ │ │ └── DataGridValidationViewModel.cs
│ │ │ ├── DesktopOnlyViewModel.cs
│ │ │ ├── DockManager/
│ │ │ │ └── IdeLayoutPageViewModel.cs
│ │ │ ├── Editors/
│ │ │ │ ├── ColorEditorPageViewModel.cs
│ │ │ │ ├── ComboBoxEditorPageViewModel.cs
│ │ │ │ ├── DateEditorPageViewModel.cs
│ │ │ │ ├── EditorsGroupViewModel.cs
│ │ │ │ ├── EditorsOverviewPageViewModel.cs
│ │ │ │ ├── EnumSourcePageViewModel.cs
│ │ │ │ ├── HyperlinkEditorPageViewModel.cs
│ │ │ │ ├── MemoEditorPageViewModel.cs
│ │ │ │ ├── SegmentedEditorPageViewModel.cs
│ │ │ │ ├── SpinEditorPageViewModel.cs
│ │ │ │ └── TextEditingPageViewModel.cs
│ │ │ ├── Graphics3DControl/
│ │ │ │ ├── Graphics3DControlCameraViewModel.cs
│ │ │ │ ├── Graphics3DControlHighlightingViewModel.cs
│ │ │ │ ├── Graphics3DControlLightsViewModel.cs
│ │ │ │ ├── Graphics3DControlLinesViewModel.cs
│ │ │ │ ├── Graphics3DControlOverviewViewModel.cs
│ │ │ │ ├── Graphics3DControlPointsViewModel.cs
│ │ │ │ ├── Graphics3DControlRobotArmViewModel.cs
│ │ │ │ ├── Graphics3DControlSimpleMaterialsViewModel.cs
│ │ │ │ ├── Graphics3DControlSkyboxViewModel.cs
│ │ │ │ ├── Graphics3DControlStlViewModel.cs
│ │ │ │ ├── Graphics3DControlTexturedMaterialsViewModel.cs
│ │ │ │ ├── Graphics3DControlTransformationViewModel.cs
│ │ │ │ ├── Graphics3DControlViewModel.cs
│ │ │ │ ├── MeshViewModel.cs
│ │ │ │ └── Model3DLoader.cs
│ │ │ ├── MainViewModel.cs
│ │ │ ├── PageViewModelBase.cs
│ │ │ ├── PropertyGrid/
│ │ │ │ ├── PropertyGridDataEditorsViewModel.cs
│ │ │ │ ├── PropertyGridGroupViewModel.cs
│ │ │ │ └── PropertyGridTabItemsViewModel.cs
│ │ │ ├── Ribbon/
│ │ │ │ ├── RibbonGroupViewModel.cs
│ │ │ │ └── WordPadExampleViewModel.cs
│ │ │ ├── StandardControls/
│ │ │ │ ├── PrimitivesPageViewModel.cs
│ │ │ │ ├── ProgressBarPageViewModel.cs
│ │ │ │ ├── SliderPageViewModel.cs
│ │ │ │ ├── StandardControlsGroupViewModel.cs
│ │ │ │ ├── StandardControlsOverviewPageViewModel.cs
│ │ │ │ └── UseCasesGroupViewModel.cs
│ │ │ ├── Tools/
│ │ │ │ ├── DeveloperToolsGroupViewModel.cs
│ │ │ │ └── SvgIconsBrowserViewModel.cs
│ │ │ ├── TreeList/
│ │ │ │ ├── FolderBrowserPageViewModel.cs
│ │ │ │ ├── TreeListColumnBandsViewModel.cs
│ │ │ │ ├── TreeListDataEditorsPageViewModel.cs
│ │ │ │ ├── TreeListExportViewModel.cs
│ │ │ │ ├── TreeListFilteringPageViewModel.cs
│ │ │ │ ├── TreeListGroupViewModel.cs
│ │ │ │ └── TreeListMultipleSelectionPageViewModel.cs
│ │ │ └── UseCases/
│ │ │ └── FinancialServices/
│ │ │ ├── MortgageCalculatorViewModel.cs
│ │ │ └── SampleMortgageCalculator.cs
│ │ ├── Views/
│ │ │ ├── Bars/
│ │ │ │ ├── BarItemsPageView.axaml
│ │ │ │ ├── BarItemsPageView.axaml.cs
│ │ │ │ ├── BarsGroupView.axaml
│ │ │ │ ├── BarsGroupView.axaml.cs
│ │ │ │ ├── BarsOverviewPageView.axaml
│ │ │ │ ├── BarsOverviewPageView.axaml.cs
│ │ │ │ ├── ContextMenuPageView.axaml
│ │ │ │ ├── ContextMenuPageView.axaml.cs
│ │ │ │ ├── Helpers/
│ │ │ │ │ ├── Converters.cs
│ │ │ │ │ ├── ScaleDecorator.cs
│ │ │ │ │ └── TextBoxHelper.cs
│ │ │ │ ├── ToolbarAndMenuPageView.axaml
│ │ │ │ └── ToolbarAndMenuPageView.axaml.cs
│ │ │ ├── Charts/
│ │ │ │ ├── CartesianAreaSeriesViewView.axaml
│ │ │ │ ├── CartesianAreaSeriesViewView.axaml.cs
│ │ │ │ ├── CartesianCandlestickAggregationView.axaml
│ │ │ │ ├── CartesianCandlestickAggregationView.axaml.cs
│ │ │ │ ├── CartesianCandlestickSeriesViewView.axaml
│ │ │ │ ├── CartesianCandlestickSeriesViewView.axaml.cs
│ │ │ │ ├── CartesianChartAxesPageView.axaml
│ │ │ │ ├── CartesianChartAxesPageView.axaml.cs
│ │ │ │ ├── CartesianChartLargeDataPageView.axaml
│ │ │ │ ├── CartesianChartLargeDataPageView.axaml.cs
│ │ │ │ ├── CartesianChartLogarithmicScalePageView.axaml
│ │ │ │ ├── CartesianChartLogarithmicScalePageView.axaml.cs
│ │ │ │ ├── CartesianChartRealtimePageView.axaml
│ │ │ │ ├── CartesianChartRealtimePageView.axaml.cs
│ │ │ │ ├── CartesianEmptyPointsView.axaml
│ │ │ │ ├── CartesianEmptyPointsView.axaml.cs
│ │ │ │ ├── CartesianFullStackedAreaSeriesViewView.axaml
│ │ │ │ ├── CartesianFullStackedAreaSeriesViewView.axaml.cs
│ │ │ │ ├── CartesianLineSeriesViewView.axaml
│ │ │ │ ├── CartesianLineSeriesViewView.axaml.cs
│ │ │ │ ├── CartesianLollipopSeriesViewView.axaml
│ │ │ │ ├── CartesianLollipopSeriesViewView.axaml.cs
│ │ │ │ ├── CartesianPointSeriesViewView.axaml
│ │ │ │ ├── CartesianPointSeriesViewView.axaml.cs
│ │ │ │ ├── CartesianRangeAreaSeriesViewView.axaml
│ │ │ │ ├── CartesianRangeAreaSeriesViewView.axaml.cs
│ │ │ │ ├── CartesianScatterLineSeriesViewView.axaml
│ │ │ │ ├── CartesianScatterLineSeriesViewView.axaml.cs
│ │ │ │ ├── CartesianSideBySideBarSeriesViewView.axaml
│ │ │ │ ├── CartesianSideBySideBarSeriesViewView.axaml.cs
│ │ │ │ ├── CartesianSideBySideRangeBarSeriesViewView.axaml
│ │ │ │ ├── CartesianSideBySideRangeBarSeriesViewView.axaml.cs
│ │ │ │ ├── CartesianStackedAreaSeriesViewView.axaml
│ │ │ │ ├── CartesianStackedAreaSeriesViewView.axaml.cs
│ │ │ │ ├── CartesianStepAreaSeriesViewView.axaml
│ │ │ │ ├── CartesianStepAreaSeriesViewView.axaml.cs
│ │ │ │ ├── CartesianStepLineSeriesViewView.axaml
│ │ │ │ ├── CartesianStepLineSeriesViewView.axaml.cs
│ │ │ │ ├── CartesianStripsAndConstantLinesView.axaml
│ │ │ │ ├── CartesianStripsAndConstantLinesView.axaml.cs
│ │ │ │ ├── HeatmapColorProvidersView.axaml
│ │ │ │ ├── HeatmapColorProvidersView.axaml.cs
│ │ │ │ ├── HeatmapRealTimeView.axaml
│ │ │ │ ├── HeatmapRealTimeView.axaml.cs
│ │ │ │ ├── PolarAreaSeriesViewView.axaml
│ │ │ │ ├── PolarAreaSeriesViewView.axaml.cs
│ │ │ │ ├── PolarEmptyPointsView.axaml
│ │ │ │ ├── PolarEmptyPointsView.axaml.cs
│ │ │ │ ├── PolarLineSeriesViewView.axaml
│ │ │ │ ├── PolarLineSeriesViewView.axaml.cs
│ │ │ │ ├── PolarPointSeriesViewView.axaml
│ │ │ │ ├── PolarPointSeriesViewView.axaml.cs
│ │ │ │ ├── PolarRangeAreaSeriesViewView.axaml
│ │ │ │ ├── PolarRangeAreaSeriesViewView.axaml.cs
│ │ │ │ ├── PolarScatterLineSeriesViewView.axaml
│ │ │ │ ├── PolarScatterLineSeriesViewView.axaml.cs
│ │ │ │ ├── PolarStripsAndConstantLinesView.axaml
│ │ │ │ ├── PolarStripsAndConstantLinesView.axaml.cs
│ │ │ │ ├── SmithLineSeriesViewView.axaml
│ │ │ │ ├── SmithLineSeriesViewView.axaml.cs
│ │ │ │ ├── SmithPointSeriesViewView.axaml
│ │ │ │ └── SmithPointSeriesViewView.axaml.cs
│ │ │ ├── CommonControls/
│ │ │ │ ├── CommonControlsGroupView.axaml
│ │ │ │ ├── CommonControlsGroupView.axaml.cs
│ │ │ │ ├── MessageBoxPageView.axaml
│ │ │ │ ├── MessageBoxPageView.axaml.cs
│ │ │ │ ├── SplitContainerControlPageView.axaml
│ │ │ │ ├── SplitContainerControlPageView.axaml.cs
│ │ │ │ ├── TabControlPageView.axaml
│ │ │ │ └── TabControlPageView.axaml.cs
│ │ │ ├── Converters/
│ │ │ │ └── EnumRadioButtonConverter.cs
│ │ │ ├── DataGrid/
│ │ │ │ ├── DataGridColumnBandsView.axaml
│ │ │ │ ├── DataGridColumnBandsView.axaml.cs
│ │ │ │ ├── DataGridDataEditorsView.axaml
│ │ │ │ ├── DataGridDataEditorsView.axaml.cs
│ │ │ │ ├── DataGridDragDropPageView.axaml
│ │ │ │ ├── DataGridDragDropPageView.axaml.cs
│ │ │ │ ├── DataGridExportView.axaml
│ │ │ │ ├── DataGridExportView.axaml.cs
│ │ │ │ ├── DataGridFilteringView.axaml
│ │ │ │ ├── DataGridFilteringView.axaml.cs
│ │ │ │ ├── DataGridFixedColumnsView.axaml
│ │ │ │ ├── DataGridFixedColumnsView.axaml.cs
│ │ │ │ ├── DataGridGroupingPageView.axaml
│ │ │ │ ├── DataGridGroupingPageView.axaml.cs
│ │ │ │ ├── DataGridLargeDataView.axaml
│ │ │ │ ├── DataGridLargeDataView.axaml.cs
│ │ │ │ ├── DataGridLiveDataPageView.axaml
│ │ │ │ ├── DataGridLiveDataPageView.axaml.cs
│ │ │ │ ├── DataGridMultipleSelectionPageView.axaml
│ │ │ │ ├── DataGridMultipleSelectionPageView.axaml.cs
│ │ │ │ ├── DataGridPageView.axaml
│ │ │ │ ├── DataGridPageView.axaml.cs
│ │ │ │ ├── DataGridRowAutoHeightView.axaml
│ │ │ │ ├── DataGridRowAutoHeightView.axaml.cs
│ │ │ │ ├── DataGridValidationView.axaml
│ │ │ │ └── DataGridValidationView.axaml.cs
│ │ │ ├── DesktopOnlyView.axaml
│ │ │ ├── DesktopOnlyView.axaml.cs
│ │ │ ├── DockManager/
│ │ │ │ ├── IdeLayoutPageView.axaml
│ │ │ │ └── IdeLayoutPageView.axaml.cs
│ │ │ ├── Editors/
│ │ │ │ ├── ColorEditorPageView.axaml
│ │ │ │ ├── ColorEditorPageView.axaml.cs
│ │ │ │ ├── ComboBoxEditorPageView.axaml
│ │ │ │ ├── ComboBoxEditorPageView.axaml.cs
│ │ │ │ ├── DateEditorPageView.axaml
│ │ │ │ ├── DateEditorPageView.axaml.cs
│ │ │ │ ├── EditorsGroupView.axaml
│ │ │ │ ├── EditorsGroupView.axaml.cs
│ │ │ │ ├── EditorsOverviewPageView.axaml
│ │ │ │ ├── EditorsOverviewPageView.axaml.cs
│ │ │ │ ├── EnumSourcePageView.axaml
│ │ │ │ ├── EnumSourcePageView.axaml.cs
│ │ │ │ ├── HyperlinkEditorPageView.axaml
│ │ │ │ ├── HyperlinkEditorPageView.axaml.cs
│ │ │ │ ├── MemoEditorPageView.axaml
│ │ │ │ ├── MemoEditorPageView.axaml.cs
│ │ │ │ ├── SegmentedEditorPageView.axaml
│ │ │ │ ├── SegmentedEditorPageView.axaml.cs
│ │ │ │ ├── SpinEditorPageView.axaml
│ │ │ │ ├── SpinEditorPageView.axaml.cs
│ │ │ │ ├── TextEditingPageView.axaml
│ │ │ │ └── TextEditingPageView.axaml.cs
│ │ │ ├── Export/
│ │ │ │ ├── DemoExportHelper.cs
│ │ │ │ ├── ExportProgressControl.axaml
│ │ │ │ └── ExportProgressControl.axaml.cs
│ │ │ ├── Graphics3DControl/
│ │ │ │ ├── Graphics3DControlCameraView.axaml
│ │ │ │ ├── Graphics3DControlCameraView.axaml.cs
│ │ │ │ ├── Graphics3DControlHighlightingView.axaml
│ │ │ │ ├── Graphics3DControlHighlightingView.axaml.cs
│ │ │ │ ├── Graphics3DControlLightsView.axaml
│ │ │ │ ├── Graphics3DControlLightsView.axaml.cs
│ │ │ │ ├── Graphics3DControlLinesView.axaml
│ │ │ │ ├── Graphics3DControlLinesView.axaml.cs
│ │ │ │ ├── Graphics3DControlOverviewView.axaml
│ │ │ │ ├── Graphics3DControlOverviewView.axaml.cs
│ │ │ │ ├── Graphics3DControlPointsView.axaml
│ │ │ │ ├── Graphics3DControlPointsView.axaml.cs
│ │ │ │ ├── Graphics3DControlRobotArmView.axaml
│ │ │ │ ├── Graphics3DControlRobotArmView.axaml.cs
│ │ │ │ ├── Graphics3DControlSimpleMaterialsView.axaml
│ │ │ │ ├── Graphics3DControlSimpleMaterialsView.axaml.cs
│ │ │ │ ├── Graphics3DControlSkyboxView.axaml
│ │ │ │ ├── Graphics3DControlSkyboxView.axaml.cs
│ │ │ │ ├── Graphics3DControlStlView.axaml
│ │ │ │ ├── Graphics3DControlStlView.axaml.cs
│ │ │ │ ├── Graphics3DControlTexturedMaterialsView.axaml
│ │ │ │ ├── Graphics3DControlTexturedMaterialsView.axaml.cs
│ │ │ │ ├── Graphics3DControlTransformationView.axaml
│ │ │ │ └── Graphics3DControlTransformationView.axaml.cs
│ │ │ ├── MainView.axaml
│ │ │ ├── MainView.axaml.cs
│ │ │ ├── MainWindow.axaml
│ │ │ ├── MainWindow.axaml.cs
│ │ │ ├── PropertyGrid/
│ │ │ │ ├── PropertyGridDataEditorsView.axaml
│ │ │ │ ├── PropertyGridDataEditorsView.axaml.cs
│ │ │ │ ├── PropertyGridGroupView.axaml
│ │ │ │ ├── PropertyGridGroupView.axaml.cs
│ │ │ │ ├── PropertyGridTabItemsView.axaml
│ │ │ │ ├── PropertyGridTabItemsView.axaml.cs
│ │ │ │ └── Utils/
│ │ │ │ └── ContentControlPropertiesWrapper.cs
│ │ │ ├── Ribbon/
│ │ │ │ ├── FontStyleGalleryItemForegroundConverter.cs
│ │ │ │ ├── WordPadExampleView.axaml
│ │ │ │ └── WordPadExampleView.axaml.cs
│ │ │ ├── StandardControls/
│ │ │ │ ├── PrimitivesPageView.axaml
│ │ │ │ ├── PrimitivesPageView.axaml.cs
│ │ │ │ ├── ProgressBarPageView.axaml
│ │ │ │ ├── ProgressBarPageView.axaml.cs
│ │ │ │ ├── SliderPageView.axaml
│ │ │ │ ├── SliderPageView.axaml.cs
│ │ │ │ ├── StandardControlsGroupView.axaml
│ │ │ │ ├── StandardControlsGroupView.axaml.cs
│ │ │ │ ├── StandardControlsOverviewPageView.axaml
│ │ │ │ └── StandardControlsOverviewPageView.axaml.cs
│ │ │ ├── Tools/
│ │ │ │ ├── SvgIconsBrowserView.axaml
│ │ │ │ ├── SvgIconsBrowserView.axaml.cs
│ │ │ │ └── Templates/
│ │ │ │ ├── svgCodeExample.cs
│ │ │ │ └── svgXamlExample.axaml
│ │ │ ├── TreeList/
│ │ │ │ ├── FolderBrowserPageView.axaml
│ │ │ │ ├── FolderBrowserPageView.axaml.cs
│ │ │ │ ├── TreeListColumnBandsView.axaml
│ │ │ │ ├── TreeListColumnBandsView.axaml.cs
│ │ │ │ ├── TreeListDataEditorsPageView.axaml
│ │ │ │ ├── TreeListDataEditorsPageView.axaml.cs
│ │ │ │ ├── TreeListExportView.axaml
│ │ │ │ ├── TreeListExportView.axaml.cs
│ │ │ │ ├── TreeListFilteringPageView.axaml
│ │ │ │ ├── TreeListFilteringPageView.axaml.cs
│ │ │ │ ├── TreeListGroupView.axaml
│ │ │ │ ├── TreeListGroupView.axaml.cs
│ │ │ │ ├── TreeListMultipleSelectionPageView.axaml
│ │ │ │ └── TreeListMultipleSelectionPageView.axaml.cs
│ │ │ └── UseCases/
│ │ │ └── FinancialServices/
│ │ │ ├── MortgageCalculatorView.axaml
│ │ │ └── MortgageCalculatorView.axaml.cs
│ │ └── emxLicense.cs
│ ├── DemoCenter.Android/
│ │ ├── DemoCenter.Android.csproj
│ │ ├── MainActivity.cs
│ │ ├── Properties/
│ │ │ └── AndroidManifest.xml
│ │ └── Resources/
│ │ ├── AboutResources.txt
│ │ ├── drawable/
│ │ │ └── splash_screen.xml
│ │ ├── drawable-night-v31/
│ │ │ └── avalonia_anim.xml
│ │ ├── drawable-v31/
│ │ │ └── avalonia_anim.xml
│ │ ├── values/
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ ├── values-night/
│ │ │ └── colors.xml
│ │ └── values-v31/
│ │ └── styles.xml
│ ├── DemoCenter.Desktop/
│ │ ├── AssemblyInfo.cs
│ │ ├── DemoCenter.Desktop.csproj
│ │ ├── Program.cs
│ │ └── app.manifest
│ ├── DemoCenter.Mobile.sln
│ ├── DemoCenter.WASM.sln
│ ├── DemoCenter.Web/
│ │ ├── DemoCenter.Web.csproj
│ │ ├── Program.cs
│ │ ├── Properties/
│ │ │ └── launchSettings.json
│ │ ├── runtimeconfig.template.json
│ │ └── wwwroot/
│ │ ├── app.css
│ │ ├── index.html
│ │ └── main.js
│ ├── DemoCenter.iOS/
│ │ ├── AppDelegate.cs
│ │ ├── DemoCenter.iOS.csproj
│ │ ├── Entitlements.plist
│ │ ├── Info.plist
│ │ ├── Main.cs
│ │ └── Resources/
│ │ └── LaunchScreen.xib
│ └── DemoCenter.sln
├── Directory.Build.props
├── Directory.Packages.props
├── License.md
├── Tests/
│ ├── DemoCenter.Desktop.UI.Tests/
│ │ ├── AvaloniaApp.cs
│ │ ├── AvaloniaUiTestFramework.cs
│ │ ├── DemoCenter.Desktop.UI.Tests.csproj
│ │ ├── DemoCenter.Desktop.UI.Tests.sln
│ │ ├── ModulesShowTests.cs
│ │ ├── NativeInputHelper.cs
│ │ ├── TestMouseEventsHelper.cs
│ │ ├── V11TestUtils.cs
│ │ └── emxLicense.cs
│ ├── Directory.Build.targets
│ ├── Eremex.ruleset
│ └── stylecop.json
├── docs/
│ ├── charts.md
│ ├── commoncontrols.md
│ ├── datagrid.md
│ ├── docking.md
│ ├── editors.md
│ ├── graphics3dcontrol.md
│ ├── heatmap.md
│ ├── images/
│ │ ├── controls-dark.snag
│ │ └── controls-light.snag
│ ├── propertygrid.md
│ ├── ribbon.md
│ ├── toolbars.md
│ └── treelist.md
└── readme.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/deploy.yml
================================================
name: Deploy to GitHub Pages
env:
PROJECT_PATH: DemoCenter/DemoCenter.Web/DemoCenter.Web.csproj
OUTPUT_PATH: DemoCenter/DemoCenter.Web/bin/Release_WASM/net9.0/publish/wwwroot
on:
workflow_dispatch:
jobs:
deploy-to-github-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Install wasm-tools
run: dotnet workload install wasm-tools-net9 wasm-tools-net8
- name: Publish .NET Project
run: dotnet publish $PROJECT_PATH -f net9.0 -c Release_WASM --nologo -p:PublishTrimmed=false
- name: Change base-tag in index.html
run: sed -i 's###g' $OUTPUT_PATH/index.html
- name: Add .nojekyll file
run: touch $OUTPUT_PATH/.nojekyll
- name: Commit wwwroot to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: ${{ env.OUTPUT_PATH }}
single-commit: true
================================================
FILE: .github/workflows/publish.yml
================================================
name: Publish Demo
on:
workflow_dispatch:
inputs:
platform:
description: 'Platform to publish'
required: true
default: 'all'
type: choice
options:
- 'windows'
- 'linux'
- 'linux-rpi'
- 'osx-arm64'
- 'osx-x64'
- 'all'
jobs:
windows:
if: ${{ github.event.inputs.platform == 'windows' || github.event.inputs.platform == 'all' }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Make upload directory
run: mkdir upload
- name: Publish win-x64
run: dotnet publish ./DemoCenter/DemoCenter.Desktop/DemoCenter.Desktop.csproj -f net9.0 -r win-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/win64
- name: Zip win-x64
run: |
$files = Get-ChildItem -Path ./publish/win64/* -Recurse -Exclude *.pdb
Compress-Archive -Path $files.FullName -DestinationPath ./upload/EMX.Demo.Desktop.win-x64.zip
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: windows
path: ./upload
linux:
if: ${{ github.event.inputs.platform == 'linux' || github.event.inputs.platform == 'all' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Make upload directory
run: mkdir upload
- name: Publish linux-x64
run: dotnet publish ./DemoCenter/DemoCenter.Desktop/DemoCenter.Desktop.csproj -f net9.0 -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/linux64
- name: Publish linux-x64 with files
run: dotnet publish ./DemoCenter/DemoCenter.Desktop/DemoCenter.Desktop.csproj -f net9.0 -r linux-x64 -c Release -o ./publish/linux64Files
- name: Rename app
run: mv ./publish/linux64/DemoCenter.Desktop ./publish/linux64/DemoCenter.App
- name: Copy library
run: mv ./publish/linux64Files/libassimp.so ./publish/linux64/libassimp.so
- name: Zip linux-x64
run: zip -j -r ./upload/EMX.Demo.Desktop.linux-x64.zip ./publish/linux64 -x "*.pdb"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: linux
path: ./upload
linux-rpi:
if: ${{ github.event.inputs.platform == 'linux-rpi' || github.event.inputs.platform == 'all' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Make upload directory
run: mkdir upload
- name: Publish linux-arm64
run: dotnet publish ./DemoCenter/DemoCenter.Desktop/DemoCenter.Desktop.csproj -f net9.0 -r linux-arm64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/linuxArm64
- name: Rename app
run: mv ./publish/linuxArm64/DemoCenter.Desktop ./publish/linuxArm64/DemoCenter.App
- name: Zip linux-x64
run: zip -j -r ./upload/EMX.Demo.Desktop.linux-arm64.zip ./publish/linuxArm64 -x "*.pdb"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: linux-rpi
path: ./upload
osx-x64:
if: ${{ github.event.inputs.platform == 'osx-x64' || github.event.inputs.platform == 'all' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Make upload directory
run: mkdir upload
- name: Publish linux-arm64
run: dotnet publish ./DemoCenter/DemoCenter.Desktop/DemoCenter.Desktop.csproj -f net9.0 -r osx-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/osx-x64
- name: Zip osx-x64
run: zip -j -r ./upload/EMX.Demo.Desktop.osx-x64.zip ./publish/osx-x64 -x "*.pdb"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: osx-x64
path: ./upload
osx-arm64:
if: ${{ github.event.inputs.platform == 'osx-arm64' || github.event.inputs.platform == 'all' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Make upload directory
run: mkdir upload
- name: Publish osx-arm64
run: dotnet publish ./DemoCenter/DemoCenter.Desktop/DemoCenter.Desktop.csproj -f net9.0 -r osx-arm64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/osx-arm64
- name: Zip osx-arm64
run: zip -j -r ./upload/EMX.Demo.Desktop.osx-arm64.zip ./publish/osx-arm64 -x "*.pdb"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: osx-arm64
path: ./upload
================================================
FILE: .github/workflows/release-tag.yml
================================================
name: Release Tag
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
jobs:
windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make upload directory
run: mkdir upload
- name: Publish win-x64
run: dotnet publish ./DemoCenter/DemoCenter.Desktop/DemoCenter.Desktop.csproj -f net9.0 -r win-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/win64
- name: Zip win-x64
run: |
$files = Get-ChildItem -Path ./publish/win64/* -Recurse -Exclude *.pdb
Compress-Archive -Path $files.FullName -DestinationPath ./upload/EMX.Demo.Desktop.win-x64.zip
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: windows
path: ./upload
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make upload directory
run: mkdir upload
- name: Publish linux-x64
run: dotnet publish ./DemoCenter/DemoCenter.Desktop/DemoCenter.Desktop.csproj -f net9.0 -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/linux64
- name: Publish linux-x64 with files
run: dotnet publish ./DemoCenter/DemoCenter.Desktop/DemoCenter.Desktop.csproj -f net9.0 -r linux-x64 -c Release -o ./publish/linux64Files
- name: Rename app
run: mv ./publish/linux64/DemoCenter.Desktop ./publish/linux64/DemoCenter.App
- name: Copy library
run: mv ./publish/linux64Files/libassimp.so ./publish/linux64/libassimp.so
- name: Zip linux-x64
run: zip -j -r ./upload/EMX.Demo.Desktop.linux-x64.zip ./publish/linux64 -x "*.pdb"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: linux
path: ./upload
linux-rpi:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make upload directory
run: mkdir upload
- name: Publish linux-arm64
run: dotnet publish ./DemoCenter/DemoCenter.Desktop/DemoCenter.Desktop.csproj -f net9.0 -r linux-arm64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/linuxArm64
- name: Rename app
run: mv ./publish/linuxArm64/DemoCenter.Desktop ./publish/linuxArm64/DemoCenter.App
- name: Zip linux-x64
run: zip -j -r ./upload/EMX.Demo.Desktop.linux-arm64.zip ./publish/linuxArm64 -x "*.pdb"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: linux-rpi
path: ./upload
linux-orangepi:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make upload directory
run: mkdir upload
- name: Publish linux-arm
run: dotnet publish ./DemoCenter/DemoCenter.Desktop/DemoCenter.Desktop.csproj -f net9.0 -r linux-arm -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/linuxArm
- name: Rename app
run: mv ./publish/linuxArm/DemoCenter.Desktop ./publish/linuxArm/DemoCenter.App
- name: Zip linux-arm
run: zip -j -r ./upload/EMX.Demo.Desktop.linux-arm.zip ./publish/linuxArm -x "*.pdb"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: linux-orangepi
path: ./upload
osx-x64:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make upload directory
run: mkdir upload
- name: Publish linux-arm64
run: dotnet publish ./DemoCenter/DemoCenter.Desktop/DemoCenter.Desktop.csproj -f net9.0 -r osx-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/osx-x64
- name: Zip osx-x64
run: zip -j -r ./upload/EMX.Demo.Desktop.osx-x64.zip ./publish/osx-x64 -x "*.pdb"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: osx-x64
path: ./upload
osx-arm64:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make upload directory
run: mkdir upload
- name: Publish osx-arm64
run: dotnet publish ./DemoCenter/DemoCenter.Desktop/DemoCenter.Desktop.csproj -f net9.0 -r osx-arm64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/osx-arm64
- name: Zip osx-arm64
run: zip -j -r ./upload/EMX.Demo.Desktop.osx-arm64.zip ./publish/osx-arm64 -x "*.pdb"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: osx-arm64
path: ./upload
draft-release:
needs: [ windows, linux, linux-rpi, osx-x64, osx-arm64, linux-orangepi ]
runs-on: ubuntu-latest
steps:
- name: Download windows Artifacts
uses: actions/download-artifact@v4
with:
name: windows
- name: Download linux Artifacts
uses: actions/download-artifact@v4
with:
name: linux
- name: Download linux-rpi Artifacts
uses: actions/download-artifact@v4
with:
name: linux-rpi
- name: Download linux-orangepi Artifacts
uses: actions/download-artifact@v4
with:
name: linux-orangepi
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
with:
generate_release_notes: true
draft: true
files: |
*.zip
================================================
FILE: .github/workflows/test.yml
================================================
name: Test
on:
push:
branches: [ "main", "action/publish" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: EMXDemo Unit Test
run: dotnet test ./Tests/DemoCenter.Desktop.UI.Tests/DemoCenter.Desktop.UI.Tests.csproj -f net9.0
ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: EMXDemo Unit Test
run: dotnet test ./Tests/DemoCenter.Desktop.UI.Tests/DemoCenter.Desktop.UI.Tests.csproj -f net9.0
================================================
FILE: .gitignore
================================================
#Ignore thumbnails created by Windows
Thumbs.db
#Ignore files built by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
[Bb]in
[Dd]ebug*/
*.lib
*.sbr
obj/
.cr/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
.vs/
#Nuget packages folder
.idea
================================================
FILE: DemoCenter/DemoCenter/App.axaml
================================================
================================================
FILE: DemoCenter/DemoCenter/App.axaml.cs
================================================
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using Avalonia.Styling;
using System.Globalization;
using System.Reflection;
using DemoCenter.ViewModels;
using DemoCenter.Views;
using DemoCenter.ProductsData;
using Eremex.AvaloniaUI.Controls.Common;
namespace DemoCenter;
public class App : Application
{
static string[] embeddedResources;
public static bool IsWebApp { get; private set; }
public static VersionInfo Version { get; }
public static string[] EmbeddedResources => embeddedResources ??= Assembly.GetAssembly(typeof(App)).GetManifestResourceNames();
static App()
{
SetCultureInfo();
Version = new VersionInfo(Assembly.GetAssembly(typeof(MxWindow)));
}
void SetPaletteStyle(IStyle oldStyle, IStyle newStyle)
{
if (oldStyle != null && newStyle != null && !Styles.Contains(newStyle))
{
if (Styles.Contains(oldStyle))
Styles[Styles.IndexOf(oldStyle)] = newStyle;
else
Styles.Add(newStyle);
}
}
static void SetCultureInfo()
{
var cultureInfo = CultureInfo.GetCultureInfo("en-US");
Thread.CurrentThread.CurrentCulture = cultureInfo;
Thread.CurrentThread.CurrentUICulture = cultureInfo;
}
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}
public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow
{
DataContext = new MainViewModel(RequestedThemeVariant)
};
}
else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform)
{
IsWebApp = true;
singleViewPlatform.MainView = new MainView
{
DataContext = new MainViewModel(RequestedThemeVariant)
};
}
base.OnFrameworkInitializationCompleted();
}
}
================================================
FILE: DemoCenter/DemoCenter/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: InternalsVisibleTo("DemoCenter.Desktop.UI.Tests")]
================================================
FILE: DemoCenter/DemoCenter/DemoCenter.csproj
================================================
latest
Debug;Release;Release_WASM
True
True
Resources.resx
CartesianCandlestickAggregationView.axaml
Code
MessageBoxPageView.axaml
Code
DataGridExportView.axaml
DataGridExportPageView.axaml
Graphics3DControlOverviewView.axaml
Code
Graphics3DControlSimpleMaterialView.axaml
Code
Graphics3DControlTexturedMaterialsView.axaml
Code
Graphics3DControlLinesView.axaml
Code
Graphics3DControlPointsView.axaml
Code
Graphics3DControlTransformationView.axaml
Code
Graphics3DControlSkyboxView.axaml
Code
PolarEmptyPointsView.axaml
Code
CartesianStackedAreaSeriesViewView.axaml
Code
CartesianFullStackedAreaSeriesViewView.axaml
Code
native
Designer
CartesianChartLogarithmicScalePageView.axaml
Code
DataGridDragDropPageView.axaml
Code
DataGridMultipleSelectionPageView.axaml
DataGridLiveDataPageView.axaml
DataGridFilteringView.axaml
DataGridValidationView.axaml
DataGridRowAutoHeightView.axaml
TreeListColumnBandsView.axaml
TreeListExportView.axaml
TreeListMultipleSelectionPageView.axaml
CartesianPointSeriesViewView.axaml
Code
CartesianLineSeriesViewView.axaml
Code
CartesianAreaSeriesViewView.axaml
Code
CartesianScatterLineSeriesViewView.axaml
Code
CartesianStepLineSeriesViewView.axaml
Code
CartesianStepAreaSeriesViewView.axaml
Code
CartesianRangeAreaSeriesViewView.axaml
Code
CartesianSideBySideBarSeriesViewView.axaml
Code
CartesianSideBySideRangeBarSeriesViewView.axaml
Code
PolarStripsAndConstantLinesView.axaml
Code
PolarPointSeriesViewView.axaml
Code
PolarLineSeriesViewView.axaml
Code
PolarAreaSeriesViewView.axaml
Code
PolarScatterLineSeriesViewView.axaml
Code
PolarRangeAreaSeriesViewView.axaml
Code
SmithPointSeriesViewView.axaml
Code
SmithLineSeriesViewView.axaml
Code
True
True
SvgIconsBrowserViewResources.resx
PublicResXFileCodeGenerator
Resources.Designer.cs
================================================
FILE: DemoCenter/DemoCenter/DemoData/ApparelProducts.cs
================================================
namespace DemoCenter.DemoData
{
public class ApparelProduct
{
public string Name { get; set; }
public string Brand { get; set; }
public string Category { get; set; }
public string SubCategory { get; set; }
public string Style { get; set; }
public string Size { get; set; }
public string Color { get; set; }
public decimal Price { get; set; }
public int Stock { get; set; }
public DateTime ReleaseDate { get; set; }
public bool IsNewArrival { get; set; }
public bool IsBestSeller { get; set; }
}
public class ApparelProducts
{
private static readonly string[] ClothingBrands = { "Urban Wear", "Style Vista", "Thread Nation", "Cotton Bloom", "Denim Haven", "Silk Route", "Linen Legend", "Vogue Venture" };
private static readonly string[] FootwearBrands = { "Sole Superior", "Prestige Steps", "Elite Treads", "Urban Stride", "Lux Walk", "Aristo Feet", "Prime Pace", "Noble Heels" };
private static readonly string[] ClothingCategories = { "Men's T-Shirts", "Women's Dresses", "Jeans", "Jackets", "Sweaters", "Shirts", "Skirts", "Shorts", "Activewear", "Underwear" };
private static readonly string[] FootwearCategories = { "Sneakers", "Boots", "Sandals", "Loafers", "High Heels", "Athletic Shoes", "Oxfords", "Slip-ons", "Flip Flops", "Espadrilles" };
private static readonly string[] Styles = { "Casual", "Sport", "Formal", "Business", "Street", "Vintage", "Minimalist", "Grunge" };
private static readonly string[] Colors = { "Black", "White", "Navy", "Charcoal", "Beige", "Khaki", "Burgundy", "Olive", "Denim Blue", "Cream", "Camel", "Rust", "Terracotta", "Moss Green", "Blush Pink", "Lavender", "Mustard", "Teal", "Coral", "Eggplant" };
private static readonly string[] ProductNameTemplates = { "{0} {1}", "{0} {1} {2}", "{1} by {0}", "{0} - {1}" };
private static readonly string[] ProductNameModifiers = { "Classic", "Modern", "Essential", "Pro", "Basic", "Standard", "Premium", "Lite", "Air", "Comfort" };
public static IList GenerateData(int count)
{
var random = new Random();
var products = new List();
var startDate = DateTime.Now.AddYears(-1);
for (int i = 0; i < count; i++)
{
bool isClothing = random.Next(2) == 0;
var brand = isClothing ? ClothingBrands[random.Next(ClothingBrands.Length)] : FootwearBrands[random.Next(FootwearBrands.Length)];
var category = isClothing ? "Clothing" : "Footwear";
var subCategory = isClothing ? ClothingCategories[random.Next(ClothingCategories.Length)] : FootwearCategories[random.Next(FootwearCategories.Length)];
var isNewArrival = random.Next(10) == 0;
var isBestSeller = random.Next(5) == 0;
var product = new ApparelProduct
{
Name = GenerateProductName(brand, subCategory, i),
Brand = brand,
Category = category,
SubCategory = subCategory,
Style = Styles[random.Next(Styles.Length)],
Color = Colors[random.Next(Colors.Length)],
Size = GenerateSize(category, subCategory),
Price = (decimal)Math.Round(15 + random.NextDouble() * 200, 2),
Stock = random.Next(0, 500),
ReleaseDate = isNewArrival ? DateTime.Now.AddDays(-random.Next(30)) : startDate.AddDays(random.Next(365)),
IsNewArrival = isNewArrival,
IsBestSeller = isBestSeller,
};
products.Add(product);
}
return products;
string GenerateSize(string category, string subCategory)
{
if (category == "Clothing")
{
return subCategory switch
{
"Men's T-Shirts" or "Shirts" => new[] { "S", "M", "L", "XL", "XXL" }[random.Next(5)],
"Women's Dresses" or "Skirts" => new[] { "XS", "S", "M", "L", "XL" }[random.Next(5)],
"Jeans" => $"{random.Next(26, 36)}W/{random.Next(30, 34)}L",
_ => "One Size"
};
}
else
{
return subCategory switch
{
"High Heels" => (35 + random.Next(6)).ToString(),
"Boots" => (36 + random.Next(7)).ToString(),
_ => (38 + random.Next(8)).ToString()
};
}
}
string GenerateProductName(string brand, string subCategory, int index)
{
string template = ProductNameTemplates[random.Next(ProductNameTemplates.Length)];
string modifier = ProductNameModifiers[random.Next(ProductNameModifiers.Length)];
return string.Format(template, brand, subCategory, modifier);
}
}
}
}
================================================
FILE: DemoCenter/DemoCenter/DemoData/CsvClasses/CarInfo.cs
================================================
using Avalonia.Media;
using Avalonia.Media.Imaging;
using Avalonia.Platform;
namespace DemoCenter.DemoData;
public class CarInfo
{
private IImage image;
public int Id { get; init; }
public string Trademark { get; init; }
public decimal HP { get; init; }
public decimal Liter { get; init; }
public decimal Cyl { get; init; }
public decimal TransmissionSpeedCount { get; init; }
public string TransmissionType { get; init; }
public decimal MPG { get; init; }
public string Description { get; init; }
public decimal Price { get; init; }
public string Currency { get; init; }
public bool IsInStock { get; init; }
public string ImageName { get; init; }
public IImage Image
{
get
{
if (image == null)
{
if (!string.IsNullOrEmpty(ImageName))
{
var s = AssetLoader.Open(new Uri($"avares://DemoCenter/DemoData/csv/CarImages/{ImageName}", UriKind.RelativeOrAbsolute));
image = new Bitmap(s);
}
}
return image;
}
}
public CarInfo() { }
public CarInfo(string trademark, CarInfo carInfo)
{
Trademark = trademark;
HP = carInfo.HP;
Liter = carInfo.Liter;
Cyl = carInfo.Cyl;
TransmissionSpeedCount = carInfo.TransmissionSpeedCount;
TransmissionType = carInfo.TransmissionType;
MPG = carInfo.MPG;
Description = carInfo.Description.Replace(carInfo.Trademark, Trademark);
Price = carInfo.Price;
Currency = carInfo.Currency;
IsInStock = carInfo.IsInStock;
ImageName = carInfo.ImageName;
}
}
================================================
FILE: DemoCenter/DemoCenter/DemoData/CsvClasses/CsvClasses.cs
================================================
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace DemoCenter.DemoData
{
public class MechInfo
{
public string Name { get; init; }
public double Weight { get; init; }
public List Weapons { get; init; }
public MechInfo(string name, int weight, List weapons)
{
Name = name;
Weight = weight;
Weapons = weapons;
}
}
public class SpaceLaunchInfo
{
public DateTime Date { get; init; }
public string MissionName { get; init; }
public string LaunchSite { get; init; }
public SpaceLaunchInfo(DateTime date, string missionName, string launchSite)
{
Date = date;
MissionName = missionName;
LaunchSite = launchSite;
}
}
public class YachtInfo
{
public string Name { get; init; }
public double Length { get; init; }
public int NumberOfCabins { get; init; }
public double MaxSpeed { get; init; }
public decimal CruisingRange { get; init; }
public decimal Price { get; init; }
public int LaunchingYear { get; init; }
public string Builder { get; init; }
public string Designer { get; init; }
public string Flag { get; init; }
public string Location { get; init; }
public YachtWebInfo Details { get; init; }
public YachtInfo(string name, double length, int numberOfCabins, double maxSpeed, decimal cruisingRange,
decimal price, int launchingYear, string builder, string designer, string flag, string location)
{
Name = name;
Length = length;
NumberOfCabins = numberOfCabins;
MaxSpeed = maxSpeed;
CruisingRange = cruisingRange;
Price = price;
LaunchingYear = launchingYear;
Builder = builder;
Designer = designer;
Flag = flag;
Location = location.Replace("''", ", ");
Details = new YachtWebInfo(Name, Location, $"https://www.google.com/search?q=yacht+{Name.Replace(" ", "+")}");
}
}
public class YachtWebInfo
{
public string Header { get; init; }
public string Link { get; init; }
public YachtWebInfo(string name, string location, string link)
{
Header = $"{name}, {location}";
Link = link;
}
}
}
================================================
FILE: DemoCenter/DemoCenter/DemoData/CsvClasses/CsvColumnData.cs
================================================
using System.Globalization;
namespace DemoCenter.DemoData;
public abstract class CsvColumn
{
public string Header { get; }
public CsvColumn(string header)
{
Header = header;
}
public abstract void AddValue(string value);
}
public abstract class CsvColumn : CsvColumn
{
public List Data { get; } = new();
protected CsvColumn(string header) : base(header)
{
}
}
public class CsvDoubleColumn : CsvColumn
{
public CsvDoubleColumn(string header) : base(header)
{
}
public override void AddValue(string value) => Data.Add(double.Parse(value.Trim(), CultureInfo.InvariantCulture));
}
================================================
FILE: DemoCenter/DemoCenter/DemoData/CsvClasses/StockInfo.cs
================================================
namespace DemoCenter.DemoData;
public class StockInfo
{
public DateTime Date { get; }
public double Close { get; }
public double Open { get; }
public double High { get; }
public double Low { get; }
public double Volume { get; }
public StockInfo(DateTime date, double close, double open, double high, double low, double volume)
{
Date = date;
Close = close;
Open = open;
High = high;
Low = low;
Volume = volume;
}
}
================================================
FILE: DemoCenter/DemoCenter/DemoData/CsvClasses/StockProduct.cs
================================================
using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DemoCenter.DemoData.CsvClasses
{
public class StockProduct
{
public int Id { get; set; }
public string Name { get; set; }
public string Category { get; set; }
public string Color { get; set; }
public string Size { get; set; }
public decimal Cost { get; set; }
public int Quantity { get; set; }
}
}
================================================
FILE: DemoCenter/DemoCenter/DemoData/CsvSources.cs
================================================
using Avalonia.Platform;
using System.Globalization;
using System.Text.RegularExpressions;
using Microsoft.VisualBasic.FileIO;
using DemoCenter.DemoData.CsvClasses;
namespace DemoCenter.DemoData
{
public static class CsvSources
{
static List cars;
public static List Cars
{
get
{
cars ??= GetCars();
return cars;
}
}
static List mechs;
public static List Mechs
{
get
{
mechs ??= GetMechs();
return mechs;
}
}
static List launches;
public static List Launches
{
get
{
launches ??= GetLaunches();
return launches;
}
}
static List yachtNames;
public static List YachtNames
{
get
{
yachtNames ??= GetYachtNames();
return yachtNames;
}
}
static List yachts;
public static List Yachts
{
get
{
yachts ??= GetYachts();
return yachts;
}
}
static List stockProducts;
public static List StockProducts
{
get
{
stockProducts ??= GetStockProducts();
return stockProducts;
}
}
static List logarithmic;
public static List Logarithmic => logarithmic ??= GetLogarithmic();
static List stock;
public static List Stock => stock ??= GetStock();
static List GetCars()
{
var culture = new CultureInfo("en-US");
return GetInfo(GetUriString("cars"), GetCarInfo);
CarInfo GetCarInfo(string[] values)
{
return new CarInfo
{
Id = int.Parse(values[0], culture),
Trademark = values[1],
HP = decimal.Parse(values[2], culture),
Liter = decimal.Parse(values[3], culture),
Cyl = decimal.Parse(values[4], culture),
TransmissionSpeedCount = decimal.Parse(values[5]),
TransmissionType = values[6],
MPG = decimal.Parse(values[7], culture),
Description = values[8],
Price = decimal.Parse(values[9], NumberStyles.Currency, culture),
Currency = culture.NumberFormat.CurrencySymbol,
IsInStock = bool.Parse(values[10]),
ImageName = values[11]
};
}
}
static List GetMechs()
{
var regex = new Regex(@"\d{1,}");
return GetInfo(GetUriString("mechs"),
values => new MechInfo(values[0], int.Parse(regex.Match(values[1]).Value), new List() { values[2], values[3], values[4] }));
}
static List GetLaunches()
{
var provider = CultureInfo.InvariantCulture;
return GetInfo(GetUriString("spacexlaunches"),
values =>
{
var launchDate = DateTime.ParseExact(values[0] + "," + values[1], "MMMM d, yyyy", provider);
return new SpaceLaunchInfo(launchDate, values[2].TrimStart(), values[3].TrimStart());
});
}
static List GetYachtNames() => GetInfo(GetUriString("yachtNames"), values => values[0]);
static List GetYachts()
{
var provider = CultureInfo.InvariantCulture;
return GetInfo(GetUriString("yachts"),
values =>
{
var price = 1000000m* decimal.Parse(values[5]) + 1000m * decimal.Parse(values[6]) + decimal.Parse(values[7]);
return new YachtInfo(values[0], double.Parse(values[1]), int.Parse(values[2]), double.Parse(values[3]), decimal.Parse(values[4]), price, int.Parse(values[8]), values[9], values[10], values[11], values[12]);
});
}
static List GetLogarithmic() => GetColumnInfo(GetUriString("logarithmic"));
static List GetStock() => GetInfo(GetUriString("Bitcoin Historical Data"),
values =>
{
var date = DateTime.Parse(values[0], CultureInfo.InvariantCulture);
var close = double.Parse(values[1], CultureInfo.InvariantCulture);
var open = double.Parse(values[2], CultureInfo.InvariantCulture);
var high = double.Parse(values[3], CultureInfo.InvariantCulture);
var low = double.Parse(values[4], CultureInfo.InvariantCulture);
var volume = double.Parse(values[5].Substring(0, values[5].Length - 1), CultureInfo.InvariantCulture) * 1000;
return new StockInfo(date, close, open, high, low, volume);
});
static List GetInfo(string uriString, Func getInfo)
{
var result = new List();
var uri = new Uri(uriString);
if (!AssetLoader.Exists(uri))
return result;
using (var reader = new StreamReader(AssetLoader.Open(uri)))
{
reader.ReadLine();
using (var parser = new TextFieldParser(reader))
{
parser.HasFieldsEnclosedInQuotes = true;
parser.Delimiters = new[] { "," };
while (!parser.EndOfData)
{
string[] values = parser.ReadFields();
result.Add(getInfo(values));
}
}
}
return result;
}
static List GetColumnInfo(string uriString) where T : CsvColumn
{
const char separator = ',';
var result = new List();
var uri = new Uri(uriString);
if (!AssetLoader.Exists(uri))
return result;
using (var reader = new StreamReader(AssetLoader.Open(uri)))
{
string[] headers = reader.ReadLine()!.Split(separator);
foreach (string header in headers)
result.Add((T)Activator.CreateInstance(typeof(T), header.Trim()));
using (var parser = new TextFieldParser(reader))
{
parser.HasFieldsEnclosedInQuotes = false;
parser.Delimiters = new[] { separator.ToString() };
while (!parser.EndOfData)
{
string[] values = parser.ReadFields();
if (values != null)
{
for(int i = 0; i < result.Count; i++)
result[i].AddValue(values[i]);
}
}
}
}
return result;
}
static List GetStockProducts()
{
return GetInfo(GetUriString("stockProducts"), GetStockProduct);
StockProduct GetStockProduct(string[] values)
{
return new StockProduct()
{
Id = int.Parse(values[0]),
Name = values[1],
Color = values[2],
Size = values[3],
Category = values[4],
Cost = decimal.Parse(values[5]),
Quantity = int.Parse(values[6]),
};
}
}
static string GetUriString(string path) => $"avares://DemoCenter/DemoData/csv/{path}.csv";
}
}
================================================
FILE: DemoCenter/DemoCenter/DemoData/ElementsSources.cs
================================================
using Avalonia.Media;
using DemoCenter.Helpers;
using static System.Net.Mime.MediaTypeNames;
namespace DemoCenter.DemoData
{
public class ElementInfo
{
public string Name { get; init; }
public ElementCategory Category { get; init; }
public IImage Icon { get; init; }
public ElementInfo(string name, ElementCategory category, IImage icon)
{
Name = name;
Category = category;
Icon = icon;
}
}
public enum ElementCategory
{
Active,
Passive,
IndependentSource,
ControlledSource,
Multipole
}
public static class ElementsSources
{
static List elements;
public static List Elements
{
get
{
elements ??= GetElements();
return elements;
}
}
static List GetElements()
{
return new List()
{
new ElementInfo("Arsenide-gallium transistor", ElementCategory.Active, Eremex.AvaloniaUI.Icons.Models.Aktivnye_komponenty___arsenid_gallievyj_polevoj_tranzistor), //"Group=Models, Icon=aktivnye komponenty - arsenid-gallievyj polevoj tranzistor"),
new ElementInfo("N-Type bypolar transistor with base", ElementCategory.Active, Eremex.AvaloniaUI.Icons.Models.Aktivnye_komponenty___bipoljarnyj_tranzistor_n_tipa_s_podlozhkoj),
new ElementInfo("N-Type bypolar transistor", ElementCategory.Active, Eremex.AvaloniaUI.Icons.Models.Aktivnye_komponenty___bipoljarnyj_tranzistor_n_tipa),
new ElementInfo("P-Type bypolar transistor with base", ElementCategory.Active, Eremex.AvaloniaUI.Icons.Models.Aktivnye_komponenty___bipoljarnyj_tranzistor_p_tipa_s_podlozhkoj),
new ElementInfo("P-Type bypolar transistor", ElementCategory.Active, Eremex.AvaloniaUI.Icons.Models.Aktivnye_komponenty___bipoljarnyj_tranzistor_p_tipa),
new ElementInfo("MOS transistor (DN type)", ElementCategory.Active, Eremex.AvaloniaUI.Icons.Models.Aktivnye_komponenty___mop_tranzistor_DN_tipa),
new ElementInfo("MOS transistor (DP type)", ElementCategory.Active, Eremex.AvaloniaUI.Icons.Models.Aktivnye_komponenty___mop_tranzistor_DP_tipa),
new ElementInfo("MOS transistor (N type)", ElementCategory.Active, Eremex.AvaloniaUI.Icons.Models.Aktivnye_komponenty___mop_tranzistor_N_tipa),
new ElementInfo("MOS transistor (P type)", ElementCategory.Active, Eremex.AvaloniaUI.Icons.Models.Aktivnye_komponenty___mop_tranzistor_P_tipa),
new ElementInfo("Operational amplifier", ElementCategory.Active, Eremex.AvaloniaUI.Icons.Models.Aktivnye_komponenty___operacionnyj_usilitel),
new ElementInfo("Field-effect transistor (N type)", ElementCategory.Active, Eremex.AvaloniaUI.Icons.Models.Aktivnye_komponenty___polevoj_tranzistor_n_tipa),
new ElementInfo("Field-effect transistor (P type)", ElementCategory.Active, Eremex.AvaloniaUI.Icons.Models.Aktivnye_komponenty___polevoj_tranzistor_p_tipa),
new ElementInfo("Functional voltage source", ElementCategory.IndependentSource, Eremex.AvaloniaUI.Icons.Models.Funkcionalnye_istochniki___funkcionalnyj_istochnik_naprjazhenija),
new ElementInfo("Functional current source", ElementCategory.IndependentSource, Eremex.AvaloniaUI.Icons.Models.Funkcionalnye_istochniki___funkcionalnyj_istochnik_toka),
new ElementInfo("Four-pole", ElementCategory.Multipole, Eremex.AvaloniaUI.Icons.Models.Mnogopolosniki___chetyrehpolosnik),
new ElementInfo("Two-pole", ElementCategory.Multipole, Eremex.AvaloniaUI.Icons.Models.Mnogopolosniki___dvuhpolosnik),
new ElementInfo("Six-pole", ElementCategory.Multipole, Eremex.AvaloniaUI.Icons.Models.Mnogopolosniki___shestipolosnik),
new ElementInfo("Eight-pole", ElementCategory.Multipole,Eremex.AvaloniaUI.Icons.Models.Mnogopolosniki___vosmipolosnik),
new ElementInfo("Battery", ElementCategory.IndependentSource, Eremex.AvaloniaUI.Icons.Models.Nezavisimye_istochniki___batareja),
new ElementInfo("Voltage source", ElementCategory.IndependentSource, Eremex.AvaloniaUI.Icons.Models.Nezavisimye_istochniki___istochnik_naprjazhenija),
new ElementInfo("Current source", ElementCategory.IndependentSource, Eremex.AvaloniaUI.Icons.Models.Nezavisimye_istochniki___istochnik_toka),
new ElementInfo("Diod", ElementCategory.Passive, Eremex.AvaloniaUI.Icons.Models.Passivnye_elementy___diod),
new ElementInfo("Long line", ElementCategory.Passive, Eremex.AvaloniaUI.Icons.Models.Passivnye_elementy___dlinnaja_linija),
new ElementInfo("Transformator", ElementCategory.Passive, Eremex.AvaloniaUI.Icons.Models.Passivnye_elementy___dvuhobmotochnyj_transformator),
new ElementInfo("Inductor", ElementCategory.Passive, Eremex.AvaloniaUI.Icons.Models.Passivnye_elementy___induktivnost),
new ElementInfo("Capacitor", ElementCategory.Passive, Eremex.AvaloniaUI.Icons.Models.Passivnye_elementy___kondensator),
new ElementInfo("Voltage-controlled switch", ElementCategory.Passive, Eremex.AvaloniaUI.Icons.Models.Passivnye_elementy___perekljuchatel_upravljaemyj_naprjazheniem),
new ElementInfo("Current-controlled switch", ElementCategory.Passive, Eremex.AvaloniaUI.Icons.Models.Passivnye_elementy___perekljuchatel_upravljaemyj_tokom),
new ElementInfo("Resistor", ElementCategory.Passive, Eremex.AvaloniaUI.Icons.Models.Passivnye_elementy___rezistor),
new ElementInfo("Variable resistor", ElementCategory.Passive, Eremex.AvaloniaUI.Icons.Models.Passivnye_elementy___rezistor_potenciometr),
new ElementInfo("Voltage-controlled voltage source", ElementCategory.ControlledSource, Eremex.AvaloniaUI.Icons.Models.Upravljaemye_istochniki___istochnik_naprjazhenija_upravljaemyj_naprjazheniem),
new ElementInfo("Current-controlled voltage source", ElementCategory.ControlledSource, Eremex.AvaloniaUI.Icons.Models.Upravljaemye_istochniki___istochnik_naprjazhenija_upravljaemyj_tokom),
new ElementInfo("Voltage-controlled current source", ElementCategory.ControlledSource, Eremex.AvaloniaUI.Icons.Models.Upravljaemye_istochniki___istochnik_toka_upravljaemyj_naprjazheniem),
new ElementInfo("Current-controlled current source", ElementCategory.ControlledSource, Eremex.AvaloniaUI.Icons.Models.Upravljaemye_istochniki___istochnik_toka_upravljaemyj_tokom),
};
}
}
}
================================================
FILE: DemoCenter/DemoCenter/DemoData/EmployeesData.cs
================================================
using System.Collections;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.Dynamic;
using System.Globalization;
using System.Text;
namespace DemoCenter.DemoData
{
public static class EmployeesData
{
public const string PhoneRegex = @"^(\+\d{1,2}\s?)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$";
static List employeeNames = new List()
{
"Angelica Grace", "Janet Francis", "Lance Phillips", "Herbert Gilmore", "Jose Horn",
"Alfred McFarland", "Gwen Chandler", "Julia Case", "Thomas Howell", "Liz McGill",
"Pat Dudley", "Jodi Funk", "Taylor Monroe", "Vicki Stevenson", "Roman Bridges",
"Bradley Maloney", "Craig MacDonald", "Cora Cameron", "Katherine Tyler", "Rachel Shah",
"Earl Lee", "Merle Williamson", "Gene Morse", "Steven Dodd", "Julius Peck",
"Trevor Chaney", "Lon Schneider", "Julio Hammond", "Rosario Kirby", "Janice Perry", "Lana Carey",
"Terrell Wells", "Herbert Hardy", "Thomas Downs", "Audrey Shields", "Davis Buchanan", "Cassie Barron",
"Kirsten Huff", "Gregg Wood", "Lily Alvarado", "Cruz Johns", "Michele Clark", "Jasper Ward"
};
public static List EmployeeNames => employeeNames;
static List cities = new List()
{
"New York", "Los Angeles", "Chicago", "Houston", "Phoenix",
"Philadelphia", "San Antonio", "San Diego", "Dallas", "San Jose, Calif"
};
private static Random random = new Random();
public static IReadOnlyList Positions { get; } = new List()
{
"Accountant", "Sales Representative", "Manager", "Project Manager", "Sales Manager",
"HR Manager", "Operations Manager", "Account Manager", "Electrical Engineer", "Customer Service Engineer",
"Software Engineer", "Engineer", "Program Manager", "Administrative Assistant", "Financial Analyst"
};
public static IList GenerateEmployeeSales()
{
var sales = new ObservableCollection();
for (int i = 5; i > 0; i--)
{
foreach (var name in employeeNames)
{
var employee = new EmployeeSale() { Employee = name, Year = DateTime.Now.Year - i + 1 };
employee.Quarter1 = GetQuarterSalePercent();
employee.Quarter2 = GetQuarterSalePercent();
employee.Quarter3 = GetQuarterSalePercent();
employee.Quarter4 = GetQuarterSalePercent();
employee.Total = Math.Round((employee.Quarter1 + employee.Quarter2 + employee.Quarter3 + employee.Quarter4) / 4);
sales.Add(employee);
}
}
return sales;
}
private static decimal GetQuarterSale()
{
return random.Next(90000) + 10000;
}
private static decimal GetQuarterSalePercent()
{
return Math.Round(GetQuarterSale() / 1000);
}
public static IList GenerateEmployeeInfo()
{
var employees = new ObservableCollection();
foreach (var employeeName in employeeNames)
{
var name = employeeName.Split(' ');
var employee = new EmployeeInfo() { FirstName = name[0], LastName = name[1] };
var age = 20 + random.Next(40);
employee.BirthDate = new DateTime(DateTime.Now.Year - age, random.Next(12) + 1, random.Next(28) + 1);
employee.HireDate = new DateTime(DateTime.Now.Year - random.Next(20) - 1, random.Next(12) + 1, random.Next(28) + 1);
employee.Experience = Math.Max(age - 20 - random.Next(age - 20), DateTime.Now.Year - employee.HireDate.Year);
employee.Position = Positions[random.Next(Positions.Count)];
employee.EmploymentType = (EmploymentType)random.Next(3);
employee.Married = random.Next(3) != 0;
employee.City = cities[random.Next(cities.Count)];
employee.Phone = GetPhoneNumber();
employees.Add(employee);
}
return employees;
}
public static IList GenerateValidationEmployeeInfo()
{
Random rnd = new();
var employees = GenerateEmployeeInfo();
GetRandomEmployee(rnd, employees).FirstName = string.Empty;
GetRandomEmployee(rnd, employees).LastName = string.Empty;
GetRandomEmployee(rnd, employees).FirstName = string.Empty;
GetRandomEmployee(rnd, employees).LastName = string.Empty;
GetRandomEmployee(rnd, employees).City = string.Empty;
GetRandomEmployee(rnd, employees).City = string.Empty;
GetRandomEmployee(rnd, employees).City = string.Empty;
GetRandomEmployee(rnd, employees).Phone = "123 456";
GetRandomEmployee(rnd, employees).Phone = "(2994)345-235";
GetRandomEmployee(rnd, employees).Phone = "(574)786";
GetRandomEmployee(rnd, employees).BirthDate = DateTime.Now.AddDays(10);
GetRandomEmployee(rnd, employees).HireDate = DateTime.Now.AddDays(4);
var employee = GetRandomEmployee(rnd, employees);
employee.HireDate = employee.BirthDate - TimeSpan.FromDays(10);
employee.Experience = 0;
return employees.Select(x => new EmployeeValidationInfo(x)).ToList();
EmployeeInfo GetRandomEmployee(Random rnd, IList employees)
{
return employees[rnd.Next(20)];
}
}
private static string GetPhoneNumber()
{
var stringBuilder = new StringBuilder();
for (int i = 0; i < 10; i++)
{
stringBuilder.Append(random.Next(10));
}
var phone = stringBuilder.ToString();
return $"({phone.Substring(0, 3)}) {phone.Substring(3, 3)}-{phone.Substring(6, 4)}";
}
public static IList GenerateComplexEmployeeSales()
{
var sales = new ObservableCollection