diff --git a/Business/Manager.cs b/Business/Manager.cs
index 3d1b4b1..3e40bf5 100644
--- a/Business/Manager.cs
+++ b/Business/Manager.cs
@@ -45,6 +45,42 @@ namespace Business
Pers.SaveRequins(requins);
}
+ public bool AjouterRequin(Requin req)
+ {
+ if (requins.Contains(req)){
+ return false;
+
+ }
+ requins.Add(req);
+ return true;
+ }
+
+ public bool SupprimerRequin(Requin req)
+ {
+ if (!requins.Contains(req))
+ {
+ return false;
+ }
+ requins.Remove(req);
+ return true;
+ }
+
+ public Requin GetRequin(Requin req)
+ {
+ return requins.SingleOrDefault(r => r.Equals(req));
+ }
+
+ public bool ModifieRequin(Requin oldR, Requin newR)
+ {
+ if (!oldR.Equals(newR))
+ {
+ return false;
+ }
+ requins.Remove(oldR);
+ requins.Add(newR);
+ return true;
+ }
+
}
}
\ No newline at end of file
diff --git a/WpfApp1/MainWindow.xaml.cs b/WpfApp1/MainWindow.xaml.cs
index 49787d1..3de2126 100644
--- a/WpfApp1/MainWindow.xaml.cs
+++ b/WpfApp1/MainWindow.xaml.cs
@@ -74,7 +74,10 @@ namespace WpfApp1
private void TextBox_IsKeyboardFocusedChanged(object sender, DependencyPropertyChangedEventArgs e)
{
- Rechercher.Text = "";
+ if (Rechercher.Text == "Rechercher")
+ {
+ Rechercher.Text = "";
+ }
}
public string Recherche
diff --git a/WpfApp1/UserControlBoite.xaml b/WpfApp1/UserControlBoite.xaml
index c17811a..2bed431 100644
--- a/WpfApp1/UserControlBoite.xaml
+++ b/WpfApp1/UserControlBoite.xaml
@@ -13,6 +13,6 @@
-
+
diff --git a/WpfApp1/UserControlBoite.xaml.cs b/WpfApp1/UserControlBoite.xaml.cs
index 7afcb6e..7c2f066 100644
--- a/WpfApp1/UserControlBoite.xaml.cs
+++ b/WpfApp1/UserControlBoite.xaml.cs
@@ -41,10 +41,5 @@ namespace WpfApp1
}
}
- private void LeContenu_IsKeyboardFocusedChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- LeContenu.Text = "";
- }
-
}
}
diff --git a/WpfApp1/UserControlEdit.xaml b/WpfApp1/UserControlEdit.xaml
index 37b2e2a..fb08606 100644
--- a/WpfApp1/UserControlEdit.xaml
+++ b/WpfApp1/UserControlEdit.xaml
@@ -27,11 +27,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/WpfApp1/UserControlEdit.xaml.cs b/WpfApp1/UserControlEdit.xaml.cs
index d176808..c2fdd64 100644
--- a/WpfApp1/UserControlEdit.xaml.cs
+++ b/WpfApp1/UserControlEdit.xaml.cs
@@ -25,6 +25,7 @@ namespace WpfApp1
public UserControlEdit()
{
InitializeComponent();
+
}
public Manager Manager => (Application.Current as App).LeManager;
@@ -43,30 +44,8 @@ namespace WpfApp1
- private void LienPhoto_IsKeyboardFocusedChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- LienPhoto.Contenu = "";
- }
-
- private void LienVid_IsKeyboardFocusedChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- LienVid.Contenu = "";
- }
-
- private void LienMap_IsKeyboardFocusedChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- LienMap.Contenu = "";
- }
-
- private void funFact_IsKeyboardFocusedChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- funFact.Contenu = "";
- }
- private void desc_IsKeyboardFocusedChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- desc.Contenu = "";
- }
+
public void UptadeUi(Requin requin)
{
leNom.Contenu = requin.Nom;
@@ -83,14 +62,6 @@ namespace WpfApp1
((MainWindow)System.Windows.Application.Current.MainWindow).ContentControlSwapAcc();
}
- private void LienPhoto_IsKeyboardFocusWithinChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
-
- }
-
- private void desc_IsKeyboardFocusWithinChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- }
}
}