UserControlDescription lolilol

master
thchazot1 3 years ago
parent 0d024d490c
commit b2753c062a

@ -175,9 +175,9 @@
"font": "Arial;13;1",
"left": 341,
"top": 262,
"width": 59.99169921875,
"width": 67.1708984375,
"height": 13,
"text": "test"
"text": "testRequin"
},
{
"_type": "LabelView",
@ -210,7 +210,7 @@
"font": "Arial;13;0",
"left": 336,
"top": 255,
"width": 69.99169921875,
"width": 77.1708984375,
"height": 25,
"stereotypeLabel": {
"$ref": "AAAAAAGAVgJ23UuCE6k="
@ -230,7 +230,7 @@
"containerChangeable": true,
"left": 336,
"top": 240,
"width": 69.99169921875,
"width": 77.1708984375,
"height": 40,
"nameCompartment": {
"$ref": "AAAAAAGAVgJ23EuBaSg="
@ -346,7 +346,7 @@
"_parent": {
"$ref": "AAAAAAGAVgHH+ks1lEI="
},
"name": "test",
"name": "testRequin",
"ownedElements": [
{
"_type": "UMLDependency",

@ -32,7 +32,7 @@
</DockPanel>
<DockPanel>
<ContentControl x:Name="contentControl">
<local:userControlEdit/>
<local:userControlAcceuil/>
</ContentControl>
</DockPanel>
</DockPanel>

@ -42,13 +42,13 @@ namespace WpfApp1
public void ContentControlSwapAcc()
{
contentControl.Content = new userControlEdit();
contentControl.Content = new userControlAcceuil();
}
public void ContentControlSwapEdit()
{
contentControl.Content = new userControlEdit();
contentControl.Content = new UserControlEdit();
}
private void TextBox_IsKeyboardFocusedChanged(object sender, DependencyPropertyChangedEventArgs e)

@ -1,4 +1,4 @@
<UserControl x:Class="WpfApp1.userControlEdit"
<UserControl x:Class="WpfApp1.userControlAcceuil"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

@ -18,9 +18,9 @@ namespace WpfApp1
/// <summary>
/// Logique d'interaction pour userControlAcceuil.xaml
/// </summary>
public partial class userControlEdit : UserControl
public partial class userControlAcceuil : UserControl
{
public userControlEdit()
public userControlAcceuil()
{
InitializeComponent();
}

@ -1,4 +1,5 @@
using System;
using Modèle;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -34,5 +35,41 @@ namespace WpfApp1
{
((MainWindow)System.Windows.Application.Current.MainWindow).ContentControlSwapEdit();
}
public Requin requin { get; set; }
public void UpdateUI(Requin requin)
{
nameReq.Text = requin.Nom;
sciName.Text = requin.NomSci;
desc.Text = requin.Description;
vid.Source = new Uri(requin.Video);
photo.Source = new BitmapImage(new Uri(requin.Photo, UriKind.Relative));
funFact.Text = requin.FunFact;
switch (requin.StatutCons)
{
case Conservation.EX:
break;
case Conservation.EW:
break;
case Conservation.CR:
break;
case Conservation.EN:
consPic.Source= new BitmapImage(new Uri("En-danger.png", UriKind.Relative));
break;
case Conservation.VU:
break;
case Conservation.NT:
break;
case Conservation.LC:
break;
case Conservation.DD:
break;
case Conservation.NE:
break;
}
}
}
}

Loading…
Cancel
Save