| .. | ||
| Properties | ||
| Resources | ||
| .editorconfig | ||
| AboutDialog.xaml | ||
| AboutDialog.xaml.cs | ||
| App.config | ||
| App.xaml | ||
| App.xaml.cs | ||
| AssemblyInfo.cs | ||
| BoolToIndexConverter.cs | ||
| BreCalClient.csproj | ||
| BreCalClient.licenseheader | ||
| BreCalClient.sln | ||
| BreCalLists.cs | ||
| containership.ico | ||
| DateTimePickerExt.cs | ||
| EditShipcallControl.xaml | ||
| EditShipcallControl.xaml.cs | ||
| EditShipDialog.xaml | ||
| EditShipDialog.xaml.cs | ||
| EditTimesAgencyIncomingControl.xaml | ||
| EditTimesAgencyIncomingControl.xaml.cs | ||
| EditTimesAgencyOutgoingControl.xaml | ||
| EditTimesAgencyOutgoingControl.xaml.cs | ||
| EditTimesAgencyShiftingControl.xaml | ||
| EditTimesAgencyShiftingControl.xaml.cs | ||
| EditTimesControl.xaml | ||
| EditTimesControl.xaml.cs | ||
| EditTimesTerminalControl.xaml | ||
| EditTimesTerminalControl.xaml.cs | ||
| ENIDataGrid.cs | ||
| EnumHelper.cs | ||
| Extensions.cs | ||
| HistoryControl.xaml | ||
| HistoryControl.xaml.cs | ||
| HistoryDialog.xaml | ||
| HistoryDialog.xaml.cs | ||
| IEditTimesControl.cs | ||
| MainWindow.xaml | ||
| MainWindow.xaml.cs | ||
| ReadMe.md | ||
| SearchFilterControl.xaml | ||
| SearchFilterControl.xaml.cs | ||
| SearchFilterModel.cs | ||
| SettingBindingExtension.cs | ||
| ShipcallControl.xaml | ||
| ShipcallControl.xaml.cs | ||
| ShipcallControlModel.cs | ||
| ShipListDialog.xaml | ||
| ShipListDialog.xaml.cs | ||
| ShipModel.cs | ||
| Util.cs | ||
Bremen calling WPF client
Introduction
API / code generation
The Rest API client is generated from the OpenAPI specification BreCalApi.yaml into the C# file BreCalApi.cs. In order to do so an extension for Visual Studio needs to be installed: REST API Client Code Generator for VS 2022.
https://marketplace.visualstudio.com/items?itemName=ChristianResmaHelle.ApiClientCodeGenerator2022
This extension has multiple generators, for this project OpenApiCodeGenerator is used (must be set on the yaml file in the project settings). Internally this uses Java, currently > 55 which translates into Java JDK 17 LTS. If code generation is not working please have a look in the output pane and select appropriate output source.
Installation
The client is deployed via ClickOnce.
To deploy the test client, leave everything as it is in develop branch and publish using the profile ClickOnceTestProfile.pubxml. To deploy the productive version, use the profile ClickOnceProfile.pubxml. You will also need to change the AssemblyName in BreCalClient.csproj back to BreCalClient.
<AssemblyName>BreCalClient</AssemblyName>
Resources are embedded in the assembly. Therefore wherever Resources are referenced via assembly name this name has to be adjusted as well. For example:
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_right_green.png"));
It is debatable if the single contained file deployment makes sense at this point. Installation file size is at about 150MB which takes a long time to upload however it should run on any current windows installation. Theoretically it should also work on Linux.
Signing
Currently neither assemblies nor the installation is signed. This probably only makes sense with a paid public code signing certificate.