This commit is contained in:
adri
2019-01-18 13:08:55 +01:00
parent 8f7992622c
commit 63ac321e2f
67 changed files with 3449 additions and 6 deletions

View File

@@ -0,0 +1,24 @@
<UserControl x:Class="ProjetTheAlone.UserControlDIY.EventFutur"
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"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProjetTheAlone.UserControlDIY"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="450"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Grid.Column="2" Style="{StaticResource MaterialDesignTitleTextBlock}" HorizontalAlignment="Center" Height="Auto" Text="Evenement Futur" />
</Grid>
</UserControl>

View File

@@ -0,0 +1,28 @@
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 ProjetTheAlone.UserControlDIY
{
/// <summary>
/// Interaction logic for EventFutur.xaml
/// </summary>
public partial class EventFutur : UserControl
{
public EventFutur()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,38 @@
<UserControl x:Class="ProjetTheAlone.UserControlDIY.EventPasse"
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"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProjetTheAlone.UserControlDIY"
xmlns:models="clr-namespace:ProjetTheAlone.Model"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="450"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}"
Name="wnd2">
<UserControl.Resources>
<DataTemplate DataType="x:Type models:EventPasseModel">
<DockPanel Background="Yellow" />
</DataTemplate>
<local:DebugDummyConverter x:Key="DebugDummyConverter" />
</UserControl.Resources>
<Grid x:Name="GridPrinc">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Style="{StaticResource MaterialDesignTitleTextBlock}" HorizontalAlignment="Center" Height="Auto" Text="Evenement Passe" />
<ListBox x:Name="MyListBox" ItemsSource="{Binding Classement}" Grid.Row="1">
<ListBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding Path=.}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</UserControl>

View File

@@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
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;
using ProjetTheAlone.Model;
namespace ProjetTheAlone.UserControlDIY
{
/// <summary>
/// Interaction logic for EventPasse.xaml
/// </summary>
public partial class EventPasse : UserControl
{
public static readonly DependencyProperty ClassementProperty = DependencyProperty.Register("Classement", typeof(ObservableCollection<string>), typeof(EventPasse));
public ObservableCollection<string> Classement
{
get
{
var val = GetValue(ClassementProperty) as ObservableCollection<string>;
return val;
}
set
{
SetValue(ClassementProperty, value);
}
}
public EventPasse()
{
InitializeComponent();
GridPrinc.DataContext = this;
}
}
public class DebugDummyConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
Debugger.Break();
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
Debugger.Break();
return value;
}
}
}

View File

@@ -0,0 +1,33 @@
<UserControl x:Class="ProjetTheAlone.UserControlDIY.Plat"
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"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProjetTheAlone.UserControlDIY"
xmlns:models="clr-namespace:ProjetTheAlone.Classes"
xmlns:convert="clr-namespace:ProjetTheAlone.Converter"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}">
<UserControl.Resources>
<DataTemplate DataType="x:Type models:Plat">
<DockPanel Background="Yellow" />
</DataTemplate>
<convert:BinaryImageConverter x:Key="imgConverter" />
</UserControl.Resources>
<Grid x:Name="GridPrinc">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock x:Name="FoodDesc" Style="{StaticResource MaterialDesignTitleTextBlock}" HorizontalAlignment="Center" Height="Auto" Text="{Binding PlatV.P_nom}" />
<Image x:Name="FoodPic" Source="{Binding PlatV.P_img, Converter={StaticResource imgConverter}}" Grid.Column="1" Stretch="Uniform"/>
</Grid>
</UserControl>

View File

@@ -0,0 +1,34 @@
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;
using ProjetTheAlone.Classes;
namespace ProjetTheAlone.UserControlDIY
{
/// <summary>
/// Interaction logic for Plat.xaml
/// </summary>
public partial class Plat : UserControl
{
public C_T_plat PlatV { get { return this.DataContext as C_T_plat; } }
public Plat()
{
InitializeComponent();
this.DataContextChanged += new DependencyPropertyChangedEventHandler((o, t) => this.UpdateLayout());
GridPrinc.DataContext = this ;
}
}
}

View File

@@ -0,0 +1,34 @@
<UserControl x:Class="ProjetTheAlone.UserControlDIY.Repa"
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"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProjetTheAlone.UserControlDIY"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}">
<Grid x:Name="GridPrinc">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource MaterialDesignTitleTextBlock}" HorizontalAlignment="Center" Height="Auto" Text="Date Jour" Grid.ColumnSpan="2"/>
<TextBlock Grid.Row="1" Style="{StaticResource MaterialDesignTitleTextBlock}" HorizontalAlignment="Center" Height="Auto" Text="{Binding ListPlat[0].P_Nom}" />
<TextBlock Grid.Row="2" Style="{StaticResource MaterialDesignTitleTextBlock}" HorizontalAlignment="Center" Height="Auto" Text="Date Jour" />
<TextBlock Grid.Row="3" Style="{StaticResource MaterialDesignTitleTextBlock}" HorizontalAlignment="Center" Height="Auto" Text="Date Jour" />
</Grid>
</UserControl>

View File

@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
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;
using ProjetTheAlone.Classes;
using ProjetTheAlone.Model;
namespace ProjetTheAlone.UserControlDIY
{
/// <summary>
/// Interaction logic for Repa.xaml
/// </summary>
public partial class Repa : UserControl
{
public ObservableCollection<C_T_plat> ListPlat
{
get
{
return this.DataContext as ObservableCollection<C_T_plat>;
}
}
public Repa()
{
InitializeComponent();
}
}
}