fixed some bugs compiles now but not finished
This commit is contained in:
parent
fbd636943e
commit
86b2380cb2
@ -1,12 +1,12 @@
|
|||||||
<Window x:Class="RoleEditor.EditShipDialog"
|
<Window x:Class="BreCalClient.EditShipDialog"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:RoleEditor"
|
xmlns:local="clr-namespace:BreCalClient"
|
||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d" Left="{local:SettingBinding W1Left}" Top="{local:SettingBinding W1Top}"
|
||||||
Title="Edit ship" Height="250" Width="500" Loaded="Window_Loaded">
|
Title="Edit ship" Height="250" Width="500" Loaded="buttonOK_Click">
|
||||||
<Grid x:Name="shipGrid">
|
<Grid x:Name="shipGrid">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width=".3*" />
|
<ColumnDefinition Width=".3*" />
|
||||||
@ -36,7 +36,7 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Label Content="IMO" HorizontalAlignment="Right" Grid.Row="2" />
|
<Label Content="IMO" HorizontalAlignment="Right" Grid.Row="2" />
|
||||||
<xctk:IntegerUpDown Name="integerUpDownIMO" Grid.Column="1" Grid.Row="2" Value="{Binding IMO, Mode=OneWay}" Margin="2" Minimum="1000000" Maximum="9999999"/>
|
<xctk:IntegerUpDown Name="integerUpDownIMO" Grid.Column="1" Grid.Row="2" Value="{Binding IMO, Mode=OneWay}" Margin="2" Minimum="1000000" Maximum="9999999" ShowButtonSpinner="False"/>
|
||||||
<Label Content="Callsign" HorizontalAlignment="Right" Grid.Row="3" />
|
<Label Content="Callsign" HorizontalAlignment="Right" Grid.Row="3" />
|
||||||
<TextBox x:Name="textBoxCallsign" Grid.Column="1" Grid.Row="3" Margin="2" VerticalContentAlignment="Center" Text="{Binding Callsign, Mode=OneWay}" />
|
<TextBox x:Name="textBoxCallsign" Grid.Column="1" Grid.Row="3" Margin="2" VerticalContentAlignment="Center" Text="{Binding Callsign, Mode=OneWay}" />
|
||||||
<Label Content="Length" HorizontalAlignment="Right" Grid.Row="4" />
|
<Label Content="Length" HorizontalAlignment="Right" Grid.Row="4" />
|
||||||
|
|||||||
@ -12,7 +12,7 @@ namespace BreCalClient
|
|||||||
{
|
{
|
||||||
public EditShipDialog()
|
public EditShipDialog()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Ship Ship { get; set; } = new Ship();
|
public Ship Ship { get; set; } = new Ship();
|
||||||
@ -27,6 +27,7 @@ namespace BreCalClient
|
|||||||
|
|
||||||
private void buttonOK_Click(object sender, RoutedEventArgs e)
|
private void buttonOK_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
this.Ship.Name = this.textBoxName.Text.Trim();
|
this.Ship.Name = this.textBoxName.Text.Trim();
|
||||||
|
|
||||||
this.Ship.Participant = this.comboBoxParticipants.SelectedItem as Participant;
|
this.Ship.Participant = this.comboBoxParticipants.SelectedItem as Participant;
|
||||||
@ -40,17 +41,18 @@ namespace BreCalClient
|
|||||||
this.Ship.Width = this.doubleUpDownWidth.Value;
|
this.Ship.Width = this.doubleUpDownWidth.Value;
|
||||||
this.DialogResult = true;
|
this.DialogResult = true;
|
||||||
this.Close();
|
this.Close();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
this.DataContext = this.Ship;
|
this.DataContext = this.Ship;
|
||||||
this.comboBoxParticipants.ItemsSource = this.Participants;
|
// this.comboBoxParticipants.ItemsSource = this.Participants;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonResetParticipant_Click(object sender, RoutedEventArgs e)
|
private void buttonResetParticipant_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
this.comboBoxParticipants.SelectedItem = null;
|
// this.comboBoxParticipants.SelectedItem = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -351,7 +351,9 @@ namespace BreCalClient
|
|||||||
|
|
||||||
private void buttonEditShips_Click(object sender, RoutedEventArgs e)
|
private void buttonEditShips_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
ShipListDialog shipListDialog = new ShipListDialog();
|
||||||
|
|
||||||
|
shipListDialog.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
18
src/BreCalClient/Resources/Resources.Designer.cs
generated
18
src/BreCalClient/Resources/Resources.Designer.cs
generated
@ -447,6 +447,15 @@ namespace BreCalClient.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Deleted.
|
||||||
|
/// </summary>
|
||||||
|
public static string textDeleted {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("textDeleted", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Departure terminal.
|
/// Looks up a localized string similar to Departure terminal.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -960,6 +969,15 @@ namespace BreCalClient.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Tug company.
|
||||||
|
/// </summary>
|
||||||
|
public static string textTugCompany {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("textTugCompany", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Tug required.
|
/// Looks up a localized string similar to Tug required.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -439,4 +439,10 @@
|
|||||||
<data name="textEditShips" xml:space="preserve">
|
<data name="textEditShips" xml:space="preserve">
|
||||||
<value>Schiffe anlegen / bearbeiten</value>
|
<value>Schiffe anlegen / bearbeiten</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="textDeleted" xml:space="preserve">
|
||||||
|
<value>Gelöscht</value>
|
||||||
|
</data>
|
||||||
|
<data name="textTugCompany" xml:space="preserve">
|
||||||
|
<value>Schlepper-Reederei</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@ -241,6 +241,9 @@
|
|||||||
<data name="textDelete" xml:space="preserve">
|
<data name="textDelete" xml:space="preserve">
|
||||||
<value>Delete</value>
|
<value>Delete</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="textDeleted" xml:space="preserve">
|
||||||
|
<value>Deleted</value>
|
||||||
|
</data>
|
||||||
<data name="textDepartureTerminal" xml:space="preserve">
|
<data name="textDepartureTerminal" xml:space="preserve">
|
||||||
<value>Departure terminal</value>
|
<value>Departure terminal</value>
|
||||||
</data>
|
</data>
|
||||||
@ -412,6 +415,9 @@
|
|||||||
<data name="textTug" xml:space="preserve">
|
<data name="textTug" xml:space="preserve">
|
||||||
<value>Tug</value>
|
<value>Tug</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="textTugCompany" xml:space="preserve">
|
||||||
|
<value>Tug company</value>
|
||||||
|
</data>
|
||||||
<data name="textTugRequired" xml:space="preserve">
|
<data name="textTugRequired" xml:space="preserve">
|
||||||
<value>Tug required</value>
|
<value>Tug required</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
41
src/BreCalClient/ShipListDialog.xaml
Normal file
41
src/BreCalClient/ShipListDialog.xaml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<Window x:Class="BreCalClient.ShipListDialog"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:p = "clr-namespace:BreCalClient.Resources"
|
||||||
|
xmlns:local="clr-namespace:BreCalClient"
|
||||||
|
mc:Ignorable="d" Left="{local:SettingBinding W1Left}" Top="{local:SettingBinding W1Top}"
|
||||||
|
Height="490" Width="800" ResizeMode="CanResize" Icon="Resources/containership.ico">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<local:ENIDataGrid x:Name="dataGridShips" Grid.Row="0" SelectionMode="Single" IsReadOnly="True" AlternatingRowBackground="LightBlue" AutoGenerateColumns="False"
|
||||||
|
CanUserAddRows="False" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
|
||||||
|
<local:ENIDataGrid.RowStyle>
|
||||||
|
<Style TargetType="DataGridRow">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding Deleted}" Value="1">
|
||||||
|
<Setter Property="Foreground" Value="DarkGray"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</local:ENIDataGrid.RowStyle>
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="Id" Binding="{Binding Path=Id}" IsReadOnly="True"/>
|
||||||
|
<DataGridTextColumn Header="Name" Binding="{Binding Path=Name}" IsReadOnly="True"/>
|
||||||
|
<DataGridCheckBoxColumn Header="{x:Static p:Resources.textTug}" Binding="{Binding Path=IsTug, Mode=OneWay}" IsReadOnly="True"/>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textTugCompany}" Binding="{Binding Path=TugCompany, Mode=OneWay}" IsReadOnly="True"/>
|
||||||
|
<DataGridTextColumn Header="IMO" Binding="{Binding Path=IMO}" IsReadOnly="True"/>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textCallsign}" Binding="{Binding Path=Callsign}" IsReadOnly="True"/>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textLength}" Binding="{Binding Path=Length}" IsReadOnly="True"/>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textWidth}" Binding="{Binding Path=Width}" IsReadOnly="True"/>
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textDeleted}" Binding="{Binding Path=Deleted, Mode=OneWay}" IsReadOnly="True" />
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</local:ENIDataGrid>
|
||||||
|
<Button Grid.Row="1" x:Name="buttonClose" Content="{x:Static p:Resources.textClose}" HorizontalAlignment="Right" Margin="2" Click="buttonClose_Click"/>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
32
src/BreCalClient/ShipListDialog.xaml.cs
Normal file
32
src/BreCalClient/ShipListDialog.xaml.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace BreCalClient
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for ShipListDialog.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class ShipListDialog : Window
|
||||||
|
{
|
||||||
|
public ShipListDialog()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonClose_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user