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.
CShark/WpfApp1/UserControlEdit.xaml.cs

72 lines
2.1 KiB

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.Navigation;
using System.Windows.Shapes;
namespace WpfApp1
{
/// <summary>
/// Logique d'interaction pour UserControlEdit.xaml
/// </summary>
public partial class UserControlEdit : UserControl
{
public UserControlEdit()
{
InitializeComponent();
}
public Requin requin { get; set; } //updateUi(requin)
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;
nomSci.Contenu = requin.NomSci;
desc.Contenu = requin.Description;
LienPhoto.Contenu = requin.Photo;
LienVid.Contenu = requin.Video;
LienMap.Contenu = requin.PhotoCarte;
funFact.Contenu = requin.FunFact;
}
private void exit_Click(object sender, RoutedEventArgs e)
{
((MainWindow)System.Windows.Application.Current.MainWindow).ContentControlSwapAcc();
}
}
}