diff --git a/misc/BreCalApi.cs b/misc/BreCalApi.cs
index 7441519..c64a353 100644
--- a/misc/BreCalApi.cs
+++ b/misc/BreCalApi.cs
@@ -1,7 +1,7 @@
//----------------------
//
-// Generated REST API Client Code Generator v1.7.17.0 on 11.08.2023 12:15:43
+// Generated REST API Client Code Generator v1.7.17.0 on 16.08.2023 11:42:30
// Using the tool OpenAPI Generator v6.6.0
//
//----------------------
@@ -44,7 +44,7 @@ using System.Threading.Tasks;
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -2151,7 +2151,7 @@ namespace BreCalClient.misc.Api
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -2886,7 +2886,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -2946,7 +2946,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -3086,7 +3086,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -3304,7 +3304,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -3744,7 +3744,7 @@ namespace BreCalClient.misc.Client
string report = "C# SDK (BreCalClient.misc) Debug Report:\n";
report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n";
- report += " Version of the API: 1.0.0\n";
+ report += " Version of the API: 0.3.0\n";
report += " SDK Package Version: 1.0.0\n";
return report;
}
@@ -3811,7 +3811,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -3831,7 +3831,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -3888,7 +3888,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -3921,7 +3921,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -3954,7 +3954,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4045,7 +4045,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4153,7 +4153,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4237,7 +4237,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4496,7 +4496,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4524,7 +4524,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4594,7 +4594,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4621,7 +4621,7 @@ namespace BreCalClient.misc.Client
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4688,7 +4688,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4823,7 +4823,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -4960,7 +4960,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5076,7 +5076,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5288,7 +5288,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5514,7 +5514,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5730,7 +5730,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -5951,7 +5951,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
@@ -6002,8 +6002,8 @@ namespace BreCalClient.misc.Model
/// shipId (required).
/// type (required).
/// eta (required).
- /// voyage (required).
- /// etd (required).
+ /// voyage.
+ /// etd.
/// arrivalBerthId.
/// departureBerthId.
/// tugReguired.
@@ -6026,17 +6026,7 @@ namespace BreCalClient.misc.Model
this.ShipId = shipId;
this.Type = type;
this.Eta = eta;
- // to ensure "voyage" is required (not null)
- if (voyage == null)
- {
- throw new ArgumentNullException("voyage is a required property for Shipcall and cannot be null");
- }
this.Voyage = voyage;
- // to ensure "etd" is required (not null)
- if (etd == null)
- {
- throw new ArgumentNullException("etd is a required property for Shipcall and cannot be null");
- }
this.Etd = etd;
this.ArrivalBerthId = arrivalBerthId;
this.DepartureBerthId = departureBerthId;
@@ -6074,12 +6064,12 @@ namespace BreCalClient.misc.Model
///
/// Gets or Sets Voyage
///
- [DataMember(Name = "voyage", IsRequired = true, EmitDefaultValue = true)]
+ [DataMember(Name = "voyage", EmitDefaultValue = true)]
public string Voyage { get; set; }
///
/// Gets or Sets Etd
///
- [DataMember(Name = "etd", IsRequired = true, EmitDefaultValue = true)]
+ [DataMember(Name = "etd", EmitDefaultValue = true)]
public DateTime? Etd { get; set; }
///
/// Gets or Sets ArrivalBerthId
@@ -6440,7 +6430,7 @@ namespace BreCalClient.misc.Model
*
* Administer DEBRE ship calls, times and notifications
*
- * The version of the OpenAPI document: 1.0.0
+ * The version of the OpenAPI document: 0.3.0
* Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
diff --git a/misc/BreCalApi.yaml b/misc/BreCalApi.yaml
index 432436f..c7fbdce 100644
--- a/misc/BreCalApi.yaml
+++ b/misc/BreCalApi.yaml
@@ -1,6 +1,6 @@
openapi: '3.0.0'
info:
- version: '1.0.0'
+ version: '0.3.0'
title: 'Bremen calling API'
description: Administer DEBRE ship calls, times and notifications
termsOfService: "https://www.bsmd.de/" # url to terms page
@@ -310,8 +310,6 @@ components:
- ship_id
- type
- eta
- - voyage
- - etd
properties:
id:
$ref: '#/components/schemas/shipcallId'
diff --git a/src/BreCalClient/.editorconfig b/src/BreCalClient/.editorconfig
new file mode 100644
index 0000000..5d552a4
--- /dev/null
+++ b/src/BreCalClient/.editorconfig
@@ -0,0 +1,135 @@
+[*.cs]
+
+# CS8073: The result of the expression is always the same since a value of this type is never equal to 'null'
+dotnet_diagnostic.CS8073.severity = silent
+csharp_using_directive_placement = outside_namespace:silent
+csharp_prefer_simple_using_statement = true:suggestion
+csharp_prefer_braces = true:silent
+csharp_style_namespace_declarations = block_scoped:silent
+csharp_style_prefer_method_group_conversion = true:silent
+csharp_style_prefer_top_level_statements = true:silent
+csharp_style_expression_bodied_methods = false:silent
+csharp_style_expression_bodied_constructors = false:silent
+csharp_style_expression_bodied_operators = false:silent
+csharp_style_expression_bodied_properties = true:silent
+csharp_style_expression_bodied_indexers = true:silent
+csharp_style_expression_bodied_accessors = true:silent
+csharp_style_expression_bodied_lambdas = true:silent
+csharp_style_expression_bodied_local_functions = false:silent
+csharp_style_throw_expression = true:suggestion
+csharp_style_prefer_null_check_over_type_check = true:suggestion
+csharp_prefer_simple_default_expression = true:suggestion
+csharp_style_prefer_local_over_anonymous_function = true:suggestion
+csharp_style_prefer_index_operator = true:suggestion
+csharp_style_prefer_range_operator = true:suggestion
+csharp_indent_labels = one_less_than_current
+csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
+csharp_space_around_binary_operators = before_and_after
+csharp_style_prefer_tuple_swap = true:suggestion
+csharp_style_prefer_utf8_string_literals = true:suggestion
+csharp_style_inlined_variable_declaration = true:suggestion
+csharp_style_deconstructed_variable_declaration = true:suggestion
+csharp_style_unused_value_assignment_preference = discard_variable:suggestion
+csharp_style_unused_value_expression_statement_preference = discard_variable:silent
+csharp_prefer_static_local_function = true:suggestion
+csharp_style_prefer_readonly_struct = true:suggestion
+csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
+csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
+csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
+csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
+csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
+csharp_style_conditional_delegate_call = true:suggestion
+csharp_style_prefer_switch_expression = true:suggestion
+csharp_style_prefer_pattern_matching = true:silent
+csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
+csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
+csharp_style_prefer_not_pattern = true:suggestion
+csharp_style_prefer_extended_property_pattern = true:suggestion
+csharp_style_var_for_built_in_types = false:silent
+csharp_style_var_when_type_is_apparent = false:silent
+csharp_style_var_elsewhere = false:silent
+
+# IDE1006: Naming Styles
+dotnet_diagnostic.IDE1006.severity = none
+
+[*.{cs,vb}]
+#### Naming styles ####
+
+# Naming rules
+
+dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
+dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
+dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
+
+dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.types_should_be_pascal_case.symbols = types
+dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
+
+dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
+dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
+
+# Symbol specifications
+
+dotnet_naming_symbols.interface.applicable_kinds = interface
+dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.interface.required_modifiers =
+
+dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
+dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.types.required_modifiers =
+
+dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
+dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.non_field_members.required_modifiers =
+
+# Naming styles
+
+dotnet_naming_style.begins_with_i.required_prefix = I
+dotnet_naming_style.begins_with_i.required_suffix =
+dotnet_naming_style.begins_with_i.word_separator =
+dotnet_naming_style.begins_with_i.capitalization = pascal_case
+
+dotnet_naming_style.pascal_case.required_prefix =
+dotnet_naming_style.pascal_case.required_suffix =
+dotnet_naming_style.pascal_case.word_separator =
+dotnet_naming_style.pascal_case.capitalization = pascal_case
+
+dotnet_naming_style.pascal_case.required_prefix =
+dotnet_naming_style.pascal_case.required_suffix =
+dotnet_naming_style.pascal_case.word_separator =
+dotnet_naming_style.pascal_case.capitalization = pascal_case
+dotnet_style_coalesce_expression = true:suggestion
+dotnet_style_null_propagation = true:suggestion
+dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
+dotnet_style_prefer_auto_properties = true:silent
+dotnet_style_object_initializer = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
+dotnet_style_prefer_conditional_expression_over_assignment = true:silent
+dotnet_style_prefer_conditional_expression_over_return = true:silent
+dotnet_style_explicit_tuple_names = true:suggestion
+dotnet_style_prefer_inferred_tuple_names = true:suggestion
+dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
+dotnet_style_prefer_compound_assignment = true:suggestion
+dotnet_style_prefer_simplified_interpolation = true:suggestion
+dotnet_style_namespace_match_folder = true:suggestion
+dotnet_style_operator_placement_when_wrapping = beginning_of_line
+tab_width = 4
+indent_size = 4
+end_of_line = crlf
+dotnet_style_readonly_field = true:suggestion
+dotnet_style_predefined_type_for_locals_parameters_members = true:silent
+dotnet_style_predefined_type_for_member_access = true:silent
+dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
+dotnet_style_allow_multiple_blank_lines_experimental = true:silent
+dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
+dotnet_code_quality_unused_parameters = all:suggestion
+dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
+dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
+dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
+dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
+dotnet_style_qualification_for_field = false:silent
+dotnet_style_qualification_for_property = false:silent
+dotnet_style_qualification_for_method = false:silent
+dotnet_style_qualification_for_event = false:silent
diff --git a/src/BreCalClient/BreCalClient.csproj b/src/BreCalClient/BreCalClient.csproj
index 85258c8..3ae3375 100644
--- a/src/BreCalClient/BreCalClient.csproj
+++ b/src/BreCalClient/BreCalClient.csproj
@@ -8,8 +8,8 @@
True
BreCalClient.App
E:\gitlager\git_brcal\misc\brecal.snk
- 0.1.0.0
- 0.1.0.0
+ 0.3.0.0
+ 0.3.0.0
Bremen calling client
A Windows WPF client for the Bremen calling API.
diff --git a/src/BreCalClient/BreCalClient.sln b/src/BreCalClient/BreCalClient.sln
index 45314d5..469c133 100644
--- a/src/BreCalClient/BreCalClient.sln
+++ b/src/BreCalClient/BreCalClient.sln
@@ -3,7 +3,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33627.172
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BreCalClient", "BreCalClient.csproj", "{FA9E0A87-FBFB-4F2B-B5FA-46DE2E5E4BCB}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BreCalClient", "BreCalClient.csproj", "{FA9E0A87-FBFB-4F2B-B5FA-46DE2E5E4BCB}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EE0DC107-4A84-442F-89B2-2FF2557F761A}"
+ ProjectSection(SolutionItems) = preProject
+ .editorconfig = .editorconfig
+ EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/src/BreCalClient/EditShipcallControl.xaml b/src/BreCalClient/EditShipcallControl.xaml
index e0c7f99..e6da3af 100644
--- a/src/BreCalClient/EditShipcallControl.xaml
+++ b/src/BreCalClient/EditShipcallControl.xaml
@@ -4,9 +4,46 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BreCalClient"
+ xmlns:p = "clr-namespace:BreCalClient.Resources"
+ xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient"
+ xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
- Title="EditShipcallControl" Height="450" Width="800">
+ Title="{x:Static p:Resources.textEditShipcall}" Height="326" Width="800" Loaded="Window_Loaded" ResizeMode="NoResize">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/BreCalClient/EditShipcallControl.xaml.cs b/src/BreCalClient/EditShipcallControl.xaml.cs
index ec3d2c8..fd40810 100644
--- a/src/BreCalClient/EditShipcallControl.xaml.cs
+++ b/src/BreCalClient/EditShipcallControl.xaml.cs
@@ -1,5 +1,11 @@
-using System;
+// Copyright (c) 2023 schick Informatik
+// Description: Windows dialog to create / edit ship calls
+//
+
+using BreCalClient.misc.Model;
+using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -23,5 +29,44 @@ namespace BreCalClient
{
InitializeComponent();
}
+
+ public Shipcall Shipcall { get; set; } = new ();
+
+ public List Participants { get; set; } = new();
+
+ private void Window_Loaded(object sender, RoutedEventArgs e)
+ {
+ List aList = new();
+ List mList = new();
+ List pList = new();
+ List tList = new();
+ List terList = new();
+
+ foreach(Participant p in Participants)
+ {
+ if (p.IsFlagSet(Extensions.ParticipantType.AGENCY)) aList.Add(p);
+ if (p.IsFlagSet(Extensions.ParticipantType.MOORING)) mList.Add(p);
+ if (p.IsFlagSet(Extensions.ParticipantType.PILOT)) pList.Add(p);
+ if (p.IsFlagSet(Extensions.ParticipantType.TUG)) tList.Add(p);
+ if (p.IsFlagSet(Extensions.ParticipantType.TERMINAL)) terList.Add(p);
+ }
+
+ this.comboBoxAgency.ItemsSource = aList;
+ this.comboBoxMooring.ItemsSource = mList;
+ this.comboBoxPilot.ItemsSource = pList;
+ this.comboBoxTug.ItemsSource = tList;
+ this.comboBoxTerminal.ItemsSource = terList;
+
+ }
+
+ private void buttonOK_Click(object sender, RoutedEventArgs e)
+ {
+ this.DialogResult = true; this.Close();
+ }
+
+ private void buttonCancel_Click(object sender, RoutedEventArgs e)
+ {
+ this.DialogResult= false; this.Close();
+ }
}
}
diff --git a/src/BreCalClient/MainWindow.xaml b/src/BreCalClient/MainWindow.xaml
index 44f992b..75f829b 100644
--- a/src/BreCalClient/MainWindow.xaml
+++ b/src/BreCalClient/MainWindow.xaml
@@ -57,7 +57,7 @@
-
+
diff --git a/src/BreCalClient/MainWindow.xaml.cs b/src/BreCalClient/MainWindow.xaml.cs
index 1d721e6..4146447 100644
--- a/src/BreCalClient/MainWindow.xaml.cs
+++ b/src/BreCalClient/MainWindow.xaml.cs
@@ -92,6 +92,22 @@ namespace BreCalClient
this.Close();
}
+ private void buttonNew_Click(object sender, RoutedEventArgs e)
+ {
+ EditShipcallControl esc = new()
+ {
+ Participants = this._participants
+ };
+
+ if (esc.ShowDialog() ?? false)
+ {
+ // create new Shipcall Control
+
+ // add to list
+
+ }
+ }
+
#endregion
#region private methods
@@ -106,7 +122,8 @@ namespace BreCalClient
foreach(var ship in this._ships)
_shipLookupDict[ship.Id] = ship;
this._participants = await _api.ParticipantsGetAsync();
-
+
+ List agencies = new();
foreach (Participant participant in this._participants)
{
this._participantLookupDict[participant.Id] = participant;
@@ -115,7 +132,11 @@ namespace BreCalClient
App.Participant = participant;
EnableControlsForParticipant();
}
+ if(participant.IsFlagSet(Extensions.ParticipantType.AGENCY))
+ agencies.Add(participant);
}
+ this.searchFilterControl.SetAgencies(agencies);
+
_ = Task.Run(() => RefreshShipcalls());
}
@@ -152,8 +173,10 @@ namespace BreCalClient
else
{
// no: create new entry
- selectedSCMModel = new ShipcallControlModel();
- selectedSCMModel.Shipcall = shipcall;
+ selectedSCMModel = new()
+ {
+ Shipcall = shipcall
+ };
if (this._shipLookupDict.ContainsKey(shipcall.ShipId))
selectedSCMModel.Ship = this._shipLookupDict[shipcall.ShipId];
if (this._berthLookupDict.ContainsKey(shipcall.ArrivalBerthId ?? 0))
@@ -162,9 +185,11 @@ namespace BreCalClient
_controlModels.Add(selectedSCMModel);
this.Dispatcher.Invoke(new Action(() =>
{
- ShipcallControl sc = new ShipcallControl();
- sc.Height = 120;
- sc.ShipcallControlModel = selectedSCMModel;
+ ShipcallControl sc = new()
+ {
+ Height = 120,
+ ShipcallControlModel = selectedSCMModel
+ };
sc.TimesRequested += Sc_TimesRequested;
sc.EditRequested += Sc_EditRequested;
this.stackPanel.Children.Add(sc);
@@ -213,9 +238,7 @@ namespace BreCalClient
}
-
#endregion
-
}
}
diff --git a/src/BreCalClient/Resources/Resources.Designer.cs b/src/BreCalClient/Resources/Resources.Designer.cs
index af500fb..2bc7bc6 100644
--- a/src/BreCalClient/Resources/Resources.Designer.cs
+++ b/src/BreCalClient/Resources/Resources.Designer.cs
@@ -215,6 +215,15 @@ namespace BreCalClient.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Cancel.
+ ///
+ public static string textCancel {
+ get {
+ return ResourceManager.GetString("textCancel", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Categories.
///
@@ -224,6 +233,15 @@ namespace BreCalClient.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Edit ship call.
+ ///
+ public static string textEditShipcall {
+ get {
+ return ResourceManager.GetString("textEditShipcall", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Enter keyword.
///
@@ -278,6 +296,15 @@ namespace BreCalClient.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Mooring.
+ ///
+ public static string textMooring {
+ get {
+ return ResourceManager.GetString("textMooring", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to New...
///
@@ -287,6 +314,24 @@ namespace BreCalClient.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to OK.
+ ///
+ public static string textOK {
+ get {
+ return ResourceManager.GetString("textOK", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Participants.
+ ///
+ public static string textParticipants {
+ get {
+ return ResourceManager.GetString("textParticipants", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Password.
///
@@ -296,6 +341,15 @@ namespace BreCalClient.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Pilot.
+ ///
+ public static string textPilot {
+ get {
+ return ResourceManager.GetString("textPilot", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Search.
///
@@ -323,6 +377,15 @@ namespace BreCalClient.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to .
+ ///
+ public static string textTerminal {
+ get {
+ return ResourceManager.GetString("textTerminal", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to to.
///
@@ -332,6 +395,15 @@ namespace BreCalClient.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Tug.
+ ///
+ public static string textTug {
+ get {
+ return ResourceManager.GetString("textTug", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to User login.
///
diff --git a/src/BreCalClient/Resources/Resources.de.resx b/src/BreCalClient/Resources/Resources.de.resx
index 4a14091..a472445 100644
--- a/src/BreCalClient/Resources/Resources.de.resx
+++ b/src/BreCalClient/Resources/Resources.de.resx
@@ -160,9 +160,15 @@
Rufzeichen
+
+ Abbrechen
+
Kategorien
+
+ Schiffsanlauf bearbeiten
+
Suchbegriff eingeben
@@ -181,12 +187,24 @@
Anmelden
+
+ Festmacher
+
Neu..
+
+ OK
+
+
+ Teilnehmer
+
Passwort
+
+ Lotse
+
Suche
@@ -196,9 +214,15 @@
Sortierung
+
+ Terminal
+
bis
+
+ Schlepper
+
Anmeldung
diff --git a/src/BreCalClient/Resources/Resources.resx b/src/BreCalClient/Resources/Resources.resx
index e014eb2..82de618 100644
--- a/src/BreCalClient/Resources/Resources.resx
+++ b/src/BreCalClient/Resources/Resources.resx
@@ -166,9 +166,15 @@
Callsign
+
+ Cancel
+
Categories
+
+ Edit ship call
+
Enter keyword
@@ -187,12 +193,24 @@
Login
+
+ Mooring
+
New..
+
+ OK
+
+
+ Participants
+
Password
+
+ Pilot
+
Search
@@ -202,9 +220,15 @@
Sort order
+
+
+
to
+
+ Tug
+
User login
diff --git a/src/BreCalClient/SearchFilterControl.xaml b/src/BreCalClient/SearchFilterControl.xaml
index 565610b..f63ff3a 100644
--- a/src/BreCalClient/SearchFilterControl.xaml
+++ b/src/BreCalClient/SearchFilterControl.xaml
@@ -75,7 +75,7 @@
-
-
+
+
diff --git a/src/BreCalClient/SearchFilterControl.xaml.cs b/src/BreCalClient/SearchFilterControl.xaml.cs
index 4a2d3c1..f4a8d66 100644
--- a/src/BreCalClient/SearchFilterControl.xaml.cs
+++ b/src/BreCalClient/SearchFilterControl.xaml.cs
@@ -54,7 +54,7 @@ namespace BreCalClient
private void logoImage_MouseUp(object sender, MouseButtonEventArgs e)
{
- if (LogoImageClicked != null) LogoImageClicked();
+ LogoImageClicked?.Invoke();
}
#endregion
diff --git a/src/BreCalClient/ShipcallControl.xaml.cs b/src/BreCalClient/ShipcallControl.xaml.cs
index dd596a1..2819256 100644
--- a/src/BreCalClient/ShipcallControl.xaml.cs
+++ b/src/BreCalClient/ShipcallControl.xaml.cs
@@ -79,26 +79,17 @@ namespace BreCalClient
private void buttonListTimes_Click(object sender, RoutedEventArgs e)
{
- if(this.TimesRequested != null)
- {
- this.TimesRequested(this);
- }
+ this.TimesRequested?.Invoke(this);
}
private void buttonEditShipcall_Click(object sender, RoutedEventArgs e)
{
- if (this.EditRequested != null)
- {
- this.EditRequested(this);
- }
+ this.EditRequested?.Invoke(this);
}
private void buttonOpenDropDown_Click(object sender, RoutedEventArgs e)
{
- if(this.OpenExtraRequested != null)
- {
- this.OpenExtraRequested(this);
- }
+ this.OpenExtraRequested?.Invoke(this);
}
#endregion