59 lines
1.7 KiB
C#
59 lines
1.7 KiB
C#
using BreCalClient.misc.Model;
|
|
|
|
using System.Collections.Generic;
|
|
using System.Windows;
|
|
|
|
namespace BreCalClient
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for EditShipDialog.xaml
|
|
/// </summary>
|
|
public partial class EditShipDialog : Window
|
|
{
|
|
public EditShipDialog()
|
|
{
|
|
|
|
}
|
|
|
|
public Ship Ship { get; set; } = new Ship();
|
|
|
|
public List<Participant> Participants { get; } = new List<Participant>();
|
|
|
|
private void buttonCancel_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
this.DialogResult = false;
|
|
this.Close();
|
|
}
|
|
|
|
private void buttonOK_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
/*
|
|
this.Ship.Name = this.textBoxName.Text.Trim();
|
|
|
|
this.Ship.Participant = this.comboBoxParticipants.SelectedItem as Participant;
|
|
if (this.Ship.Participant != null)
|
|
this.Ship.Participant_Id = this.Ship.Participant.Id;
|
|
else
|
|
this.Ship.Participant_Id = null;
|
|
this.Ship.IMO = this.integerUpDownIMO.Value;
|
|
this.Ship.Callsign = this.textBoxCallsign.Text.Trim();
|
|
this.Ship.Length = this.doubleUpDownLength.Value;
|
|
this.Ship.Width = this.doubleUpDownWidth.Value;
|
|
this.DialogResult = true;
|
|
this.Close();
|
|
*/
|
|
}
|
|
|
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
this.DataContext = this.Ship;
|
|
// this.comboBoxParticipants.ItemsSource = this.Participants;
|
|
}
|
|
|
|
private void buttonResetParticipant_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
// this.comboBoxParticipants.SelectedItem = null;
|
|
}
|
|
}
|
|
}
|