You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.0 KiB
81 lines
2.0 KiB
using Business;
|
|
using Modèle;
|
|
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 WpfApp1
|
|
{
|
|
/// <summary>
|
|
/// Logique d'interaction pour ValiderSubmit.xaml
|
|
/// </summary>
|
|
///
|
|
|
|
public partial class ValiderSubmit : Window
|
|
{
|
|
|
|
|
|
|
|
public Manager Mgr => (Application.Current as App).LeManager;
|
|
public ValiderSubmit()
|
|
{
|
|
InitializeComponent();
|
|
|
|
Mgr.RequinsEdit.CollectionChanged += RequinsEdit_CollectionChanged;
|
|
Mgr.RequinsAdd.CollectionChanged += RequinsAdd_CollectionChanged;
|
|
|
|
ChargerUCAdd();
|
|
ChargerUCEdit();
|
|
|
|
}
|
|
|
|
private void RequinsAdd_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
|
|
{
|
|
ChargerUCAdd();
|
|
}
|
|
|
|
private void RequinsEdit_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
|
|
{
|
|
ChargerUCEdit();
|
|
}
|
|
|
|
private void exit_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
Close();
|
|
}
|
|
|
|
public void ChargerUCAdd()
|
|
{
|
|
foreach (Requin req in Mgr.RequinsAdd)
|
|
{
|
|
laListeAdd.Items.Add(new UserControlRequin { requin = req, type=UCrequinType.add });
|
|
}
|
|
}
|
|
|
|
public void ChargerUCEdit()
|
|
{
|
|
foreach (Requin req in Mgr.RequinsEdit)
|
|
{
|
|
laListeEdit.Items.Add(new UserControlRequin { requin = req, type = UCrequinType.edit });
|
|
}
|
|
}
|
|
|
|
|
|
private void addShark_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
var AddSharkWindow = new AddAShark();
|
|
AddSharkWindow.ShowDialog();
|
|
}
|
|
}
|
|
}
|