From df56e0405ab2948768932418b7efce57f06af152 Mon Sep 17 00:00:00 2001 From: Adri Date: Mon, 1 Oct 2018 11:35:19 +0200 Subject: [PATCH] Fen 3 --- ISET2018_WPF/Fen1.xaml | 23 +++++++++ ISET2018_WPF/Fen1.xaml.cs | 28 +++++++++++ ISET2018_WPF/Fen2.xaml | 34 +++++++++++++ ISET2018_WPF/Fen2.xaml.cs | 47 ++++++++++++++++++ ISET2018_WPF/Fen3.xaml | 12 +++++ ISET2018_WPF/Fen3.xaml.cs | 27 ++++++++++ ISET2018_WPF/ISET2018_WPF.csproj | 30 ++++++++++- ISET2018_WPF/MainWindow.xaml | 37 ++++++++++++-- ISET2018_WPF/MainWindow.xaml.cs | 40 +++++++++++++++ ISET2018_WPF/Properties/Resources.Designer.cs | 10 ++++ ISET2018_WPF/Properties/Resources.resx | 3 ++ .../Resources/IMG_20180804_132307_561.jpg | Bin 0 -> 2604705 bytes 12 files changed, 286 insertions(+), 5 deletions(-) create mode 100644 ISET2018_WPF/Fen1.xaml create mode 100644 ISET2018_WPF/Fen1.xaml.cs create mode 100644 ISET2018_WPF/Fen2.xaml create mode 100644 ISET2018_WPF/Fen2.xaml.cs create mode 100644 ISET2018_WPF/Fen3.xaml create mode 100644 ISET2018_WPF/Fen3.xaml.cs create mode 100644 ISET2018_WPF/Resources/IMG_20180804_132307_561.jpg diff --git a/ISET2018_WPF/Fen1.xaml b/ISET2018_WPF/Fen1.xaml new file mode 100644 index 0000000..8897477 --- /dev/null +++ b/ISET2018_WPF/Fen1.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + diff --git a/ISET2018_WPF/Fen1.xaml.cs b/ISET2018_WPF/Fen1.xaml.cs new file mode 100644 index 0000000..b96dcdf --- /dev/null +++ b/ISET2018_WPF/Fen1.xaml.cs @@ -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.Shapes; + +namespace ISET2018_WPF +{ + /// + /// Logique d'interaction pour Fen1.xaml + /// + public partial class Fen1 : Window + { + public Fen1() + { + InitializeComponent(); + DataContext = this; + } + } +} diff --git a/ISET2018_WPF/Fen2.xaml b/ISET2018_WPF/Fen2.xaml new file mode 100644 index 0000000..b074378 --- /dev/null +++ b/ISET2018_WPF/Fen2.xaml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ISET2018_WPF/Fen2.xaml.cs b/ISET2018_WPF/Fen2.xaml.cs new file mode 100644 index 0000000..f4acc1d --- /dev/null +++ b/ISET2018_WPF/Fen2.xaml.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +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 ISET2018_WPF +{ + /// + /// Logique d'interaction pour Fen2.xaml + /// + public partial class Fen2 : Window + { + public Fen2() + { + InitializeComponent(); + } + } + public class Degre2Radian : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return (double)value * Math.PI / 180; + return false; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + double angle = 0; + if(double.TryParse(value.ToString(), out angle)) + { + if (angle < 0) angle = 0; + else if (angle > 2 * Math.PI) angle = 2 * Math.PI; + } + return angle*180/Math.PI; + } + } +} diff --git a/ISET2018_WPF/Fen3.xaml b/ISET2018_WPF/Fen3.xaml new file mode 100644 index 0000000..5273f63 --- /dev/null +++ b/ISET2018_WPF/Fen3.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/ISET2018_WPF/Fen3.xaml.cs b/ISET2018_WPF/Fen3.xaml.cs new file mode 100644 index 0000000..d2579d1 --- /dev/null +++ b/ISET2018_WPF/Fen3.xaml.cs @@ -0,0 +1,27 @@ +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 ISET2018_WPF +{ + /// + /// Logique d'interaction pour Fen3.xaml + /// + public partial class Fen3 : Window + { + public Fen3() + { + InitializeComponent(); + } + } +} diff --git a/ISET2018_WPF/ISET2018_WPF.csproj b/ISET2018_WPF/ISET2018_WPF.csproj index 42ef613..bc62e1b 100644 --- a/ISET2018_WPF/ISET2018_WPF.csproj +++ b/ISET2018_WPF/ISET2018_WPF.csproj @@ -55,6 +55,18 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + MSBuild:Compile Designer @@ -63,6 +75,15 @@ App.xaml Code + + Fen1.xaml + + + Fen2.xaml + + + Fen3.xaml + MainWindow.xaml Code @@ -95,7 +116,14 @@ - + + PreserveNewest + + + + + PreserveNewest + \ No newline at end of file diff --git a/ISET2018_WPF/MainWindow.xaml b/ISET2018_WPF/MainWindow.xaml index cf9e19e..769d515 100644 --- a/ISET2018_WPF/MainWindow.xaml +++ b/ISET2018_WPF/MainWindow.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:ISET2018_WPF" mc:Ignorable="d" - Title="MainWindow" Height="350" Width="525"> + Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded"> @@ -25,8 +25,37 @@ + + Mademoiselle + Madame + Mondamoiseau + Monsieur + Indéfini + + +