From 1bcaa3c84101fe26f716e6f876b16065a69b0db3 Mon Sep 17 00:00:00 2001 From: Valentin VERDIER Date: Mon, 7 Sep 2020 22:24:37 +0200 Subject: [PATCH] Commit initial --- App.config | 6 ++ App.xaml | 10 ++ App.xaml.cs | 20 ++++ Citoyen.cs | 53 +++++++++++ CitoyenDAO.cs | 153 +++++++++++++++++++++++++++++++ CitoyenModal.xaml | 42 +++++++++ CitoyenModal.xaml.cs | 32 +++++++ DataAccess.cs | 44 +++++++++ Hermes.csproj | 153 +++++++++++++++++++++++++++++++ Hermes.sln | 25 +++++ MainWindow.xaml | 36 ++++++++ MainWindow.xaml.cs | 50 ++++++++++ Properties/AssemblyInfo.cs | 55 +++++++++++ Properties/Resources.Designer.cs | 71 ++++++++++++++ Properties/Resources.resx | 117 +++++++++++++++++++++++ Properties/Settings.Designer.cs | 30 ++++++ Properties/Settings.settings | 7 ++ SearchModal.xaml | 36 ++++++++ SearchModal.xaml.cs | 32 +++++++ packages.config | 13 +++ 20 files changed, 985 insertions(+) create mode 100644 App.config create mode 100644 App.xaml create mode 100644 App.xaml.cs create mode 100644 Citoyen.cs create mode 100644 CitoyenDAO.cs create mode 100644 CitoyenModal.xaml create mode 100644 CitoyenModal.xaml.cs create mode 100644 DataAccess.cs create mode 100644 Hermes.csproj create mode 100644 Hermes.sln create mode 100644 MainWindow.xaml create mode 100644 MainWindow.xaml.cs create mode 100644 Properties/AssemblyInfo.cs create mode 100644 Properties/Resources.Designer.cs create mode 100644 Properties/Resources.resx create mode 100644 Properties/Settings.Designer.cs create mode 100644 Properties/Settings.settings create mode 100644 SearchModal.xaml create mode 100644 SearchModal.xaml.cs create mode 100644 packages.config diff --git a/App.config b/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/App.xaml b/App.xaml new file mode 100644 index 0000000..57ce66a --- /dev/null +++ b/App.xaml @@ -0,0 +1,10 @@ + + + + + diff --git a/App.xaml.cs b/App.xaml.cs new file mode 100644 index 0000000..38ee452 --- /dev/null +++ b/App.xaml.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace Hermes +{ + /// + /// Logique d'interaction pour App.xaml + /// + public partial class App : Application + { + private void Application_Exit(object sender, ExitEventArgs e) { + DataAccess.CloseConnection(); + } + } +} diff --git a/Citoyen.cs b/Citoyen.cs new file mode 100644 index 0000000..b579925 --- /dev/null +++ b/Citoyen.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hermes +{ + public class Citoyen + { + public int Id { get; set; } + public string Nom { get; set; } + public string Prenom { get; set; } + public DateTime DateNaissance { get; set; } + public string Adresse { get; set; } + public string Profession { get; set; } + public int TypeResidence { get; set; } + public string Mail { get; set; } + public string Tel { get; set; } + + public string TypeResidenceLabel { + get + { + return TypeResidence == 0 ? "Principale" : "Secondaire"; + } + } + + public int Age { + get + { + return DateTime.Now.Year - DateNaissance.Year; + } + set + { + DateNaissance = new DateTime(DateTime.Now.Year - value, 1, 1); + } + } + + public Citoyen() {} + + public Citoyen(int id, string nom, string prenom, DateTime dateNaissance, string adresse, string profession, int typeResidence, string mail, string tel) { + Id = id; + Nom = nom; + Prenom = prenom; + DateNaissance = dateNaissance; + Adresse = adresse; + Profession = profession; + TypeResidence = typeResidence; + Mail = mail; + Tel = tel; + } + } +} diff --git a/CitoyenDAO.cs b/CitoyenDAO.cs new file mode 100644 index 0000000..a1d92c3 --- /dev/null +++ b/CitoyenDAO.cs @@ -0,0 +1,153 @@ +using Microsoft.Data.Sqlite; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hermes +{ + public static class CitoyenDAO + { + private static Citoyen ReadCitoyen(SqliteDataReader reader) { + Citoyen citoyen = new Citoyen(reader.GetInt32(0), reader.GetString(1), reader.GetString(2), DateTime.Now, reader.GetString(4), reader.GetString(5), reader.GetInt32(6), reader.GetString(7), reader.GetString(8)); + citoyen.DateNaissance = DateTime.ParseExact(reader.GetString(3), "yyyy", CultureInfo.InvariantCulture); + return citoyen; + } + + private static List ReadCitoyens(SqliteDataReader reader) { + List citoyens = new List(); + + while (reader.Read()) + { + citoyens.Add(ReadCitoyen(reader)); + } + + return citoyens; + } + + + public static List FetchAll() { + SqliteConnection db = DataAccess.GetConnection(); + + SqliteCommand selectCmd = new SqliteCommand("SELECT id, nom, prenom, date_naissance, adresse, profession, type_residence, mail, tel FROM citoyen", db); + SqliteDataReader reader = selectCmd.ExecuteReader(); + + return ReadCitoyens(reader); + } + + public static List FetchByAgeSup(int age) { + SqliteConnection db = DataAccess.GetConnection(); + + int year = DateTime.Now.Year - age; + + SqliteCommand selectCmd = new SqliteCommand("SELECT id, nom, prenom, date_naissance, adresse, profession, type_residence, mail, tel FROM citoyen WHERE date_naissance < $year", db); + selectCmd.Parameters.AddWithValue("$year", year.ToString()); + SqliteDataReader reader = selectCmd.ExecuteReader(); + + return ReadCitoyens(reader); + } + + public static List FetchByAgeEquals(int age) + { + SqliteConnection db = DataAccess.GetConnection(); + + int year = DateTime.Now.Year - age; + + SqliteCommand selectCmd = new SqliteCommand("SELECT id, nom, prenom, date_naissance, adresse, profession, type_residence, mail, tel FROM citoyen WHERE date_naissance = $year", db); + selectCmd.Parameters.AddWithValue("$year", year.ToString()); + SqliteDataReader reader = selectCmd.ExecuteReader(); + + return ReadCitoyens(reader); + } + + public static List FetchByAgeInf(int age) + { + SqliteConnection db = DataAccess.GetConnection(); + + int year = DateTime.Now.Year - age; + + SqliteCommand selectCmd = new SqliteCommand("SELECT id, nom, prenom, date_naissance, adresse, profession, type_residence, mail, tel FROM citoyen WHERE date_naissance > $year", db); + selectCmd.Parameters.AddWithValue("$year", year.ToString()); + SqliteDataReader reader = selectCmd.ExecuteReader(); + + return ReadCitoyens(reader); + } + + public static List FetchByProfession(string pattern) + { + SqliteConnection db = DataAccess.GetConnection(); + + SqliteCommand selectCmd = new SqliteCommand("SELECT id, nom, prenom, date_naissance, adresse, profession, type_residence, mail, tel FROM citoyen WHERE LOWER(date_naissance) LIKE $pattern", db); + selectCmd.Parameters.AddWithValue("$pattern", "%" + pattern.ToLower() + "%"); + SqliteDataReader reader = selectCmd.ExecuteReader(); + + return ReadCitoyens(reader); + } + + public static List FetchByAdresse(string pattern) + { + SqliteConnection db = DataAccess.GetConnection(); + + SqliteCommand selectCmd = new SqliteCommand("SELECT id, nom, prenom, date_naissance, adresse, profession, type_residence, mail, tel FROM citoyen WHERE LOWER(adresse) LIKE $pattern", db); + selectCmd.Parameters.AddWithValue("$pattern", "%" + pattern.ToLower() + "%"); + SqliteDataReader reader = selectCmd.ExecuteReader(); + + return ReadCitoyens(reader); + } + + public static List FetchByTypeResidence(int type) + { + SqliteConnection db = DataAccess.GetConnection(); + + SqliteCommand selectCmd = new SqliteCommand("SELECT id, nom, prenom, date_naissance, adresse, profession, type_residence, mail, tel FROM citoyen WHERE type_residence = $type", db); + selectCmd.Parameters.AddWithValue("$type", type); + SqliteDataReader reader = selectCmd.ExecuteReader(); + + return ReadCitoyens(reader); + } + + public static void Add(Citoyen citoyen) { + SqliteConnection db = DataAccess.GetConnection(); + + SqliteCommand insertCmd = new SqliteCommand("INSERT INTO citoyen (nom, prenom, date_naissance, adresse, profession, type_residence, mail, tel) VALUES ($nom, $prenom, $date_naissance, $adresse, $profession, $type_residence, $mail, $tel)", db); + insertCmd.Parameters.AddWithValue("$nom", citoyen.Nom); + insertCmd.Parameters.AddWithValue("$prenom", citoyen.Prenom); + insertCmd.Parameters.AddWithValue("$date_naissance", citoyen.DateNaissance.ToString("yyyy")); + insertCmd.Parameters.AddWithValue("$adresse", citoyen.Adresse); + insertCmd.Parameters.AddWithValue("$profession", citoyen.Profession); + insertCmd.Parameters.AddWithValue("$type_residence", citoyen.TypeResidence); + insertCmd.Parameters.AddWithValue("$mail", citoyen.Mail); + insertCmd.Parameters.AddWithValue("$tel", citoyen.Tel); + + insertCmd.ExecuteNonQuery(); + } + + public static void Update(Citoyen citoyen) { + SqliteConnection db = DataAccess.GetConnection(); + + SqliteCommand insertCmd = new SqliteCommand("UPDATE citoyen SET nom = $nom, prenom = $prenom, date_naissance = $date_naissance, adresse = $adresse, profession = $profession, type_residence = $type_residence, mail = $mail, tel = $tel WHERE id = $id", db); + insertCmd.Parameters.AddWithValue("$id", citoyen.Id); + insertCmd.Parameters.AddWithValue("$nom", citoyen.Nom); + insertCmd.Parameters.AddWithValue("$prenom", citoyen.Prenom); + insertCmd.Parameters.AddWithValue("$date_naissance", citoyen.DateNaissance.ToString("yyyyMMdd")); + insertCmd.Parameters.AddWithValue("$adresse", citoyen.Adresse); + insertCmd.Parameters.AddWithValue("$profession", citoyen.Profession); + insertCmd.Parameters.AddWithValue("$type_residence", citoyen.TypeResidence); + insertCmd.Parameters.AddWithValue("$mail", citoyen.Mail); + insertCmd.Parameters.AddWithValue("$tel", citoyen.Tel); + + insertCmd.ExecuteNonQuery(); + } + + public static void Remove(Citoyen citoyen) { + SqliteConnection db = DataAccess.GetConnection(); + + SqliteCommand insertCmd = new SqliteCommand("DELETE FROM citoyen WHERE id = $id", db); + insertCmd.Parameters.AddWithValue("$id", citoyen.Id); + + insertCmd.ExecuteNonQuery(); + } + } +} diff --git a/CitoyenModal.xaml b/CitoyenModal.xaml new file mode 100644 index 0000000..70933b6 --- /dev/null +++ b/CitoyenModal.xaml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + Principale + Secondaire + + + + + + + + + + + + + + diff --git a/CitoyenModal.xaml.cs b/CitoyenModal.xaml.cs new file mode 100644 index 0000000..bd40170 --- /dev/null +++ b/CitoyenModal.xaml.cs @@ -0,0 +1,32 @@ +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 Hermes +{ + /// + /// Logique d'interaction pour CitoyenModal.xaml + /// + public partial class CitoyenModal : Window + { + public CitoyenModal() + { + InitializeComponent(); + } + + private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { + e.Cancel = true; + this.Hide(); + } + } +} diff --git a/DataAccess.cs b/DataAccess.cs new file mode 100644 index 0000000..5062c81 --- /dev/null +++ b/DataAccess.cs @@ -0,0 +1,44 @@ +using Microsoft.Data.Sqlite; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Policy; +using System.Text; +using System.Threading.Tasks; + +namespace Hermes +{ + public static class DataAccess + { + private static SqliteConnection db= null; + + public static SqliteConnection GetConnection() { + if (db != null) { + return db; + } + + var dbpath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "hermes.db"); + if (!System.IO.File.Exists(dbpath)) { + FileStream fs = File.Create(dbpath); + fs.Close(); + } + db = new SqliteConnection($"Filename={dbpath}"); + db.Open(); + + var createTableCmd = "CREATE TABLE IF NOT EXISTS citoyen (id INTEGER PRIMARY KEY, nom TEXT NOT NULL, prenom TEXT NOT NULL, date_naissance TEXT NOT NULL, adresse TEXT NOT NULL, profession TEXT, type_residence INTEGER NOT NULL, mail TEXT, tel TEXT)"; + + SqliteCommand createTable = new SqliteCommand(createTableCmd, db); + createTable.ExecuteReader(); + + return db; + } + + public static void CloseConnection() { + if (db != null) { + db.Close(); + db = null; + } + } + } +} diff --git a/Hermes.csproj b/Hermes.csproj new file mode 100644 index 0000000..25cae39 --- /dev/null +++ b/Hermes.csproj @@ -0,0 +1,153 @@ + + + + + Debug + AnyCPU + {2F7FDF03-5F05-438E-9C90-F926B40DCC6D} + WinExe + Hermes + Hermes + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + packages\Microsoft.Data.Sqlite.Core.3.1.7\lib\netstandard2.0\Microsoft.Data.Sqlite.dll + + + packages\SQLitePCLRaw.bundle_e_sqlite3.2.0.2\lib\net461\SQLitePCLRaw.batteries_v2.dll + + + packages\SQLitePCLRaw.core.2.0.2\lib\netstandard2.0\SQLitePCLRaw.core.dll + + + packages\SQLitePCLRaw.bundle_e_sqlite3.2.0.2\lib\net461\SQLitePCLRaw.nativelibrary.dll + + + packages\SQLitePCLRaw.provider.dynamic_cdecl.2.0.2\lib\netstandard2.0\SQLitePCLRaw.provider.dynamic_cdecl.dll + + + + packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll + + + + packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll + + + + packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll + + + packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + SearchModal.xaml + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + + + CitoyenModal.xaml + + + + MainWindow.xaml + Code + + + Designer + MSBuild:Compile + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + + Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}. + + + + \ No newline at end of file diff --git a/Hermes.sln b/Hermes.sln new file mode 100644 index 0000000..c698a80 --- /dev/null +++ b/Hermes.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30330.147 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hermes", "Hermes.csproj", "{2F7FDF03-5F05-438E-9C90-F926B40DCC6D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2F7FDF03-5F05-438E-9C90-F926B40DCC6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F7FDF03-5F05-438E-9C90-F926B40DCC6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F7FDF03-5F05-438E-9C90-F926B40DCC6D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F7FDF03-5F05-438E-9C90-F926B40DCC6D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {883D0F2A-F831-488D-8896-1BE1A816E072} + EndGlobalSection +EndGlobal diff --git a/MainWindow.xaml b/MainWindow.xaml new file mode 100644 index 0000000..d50a512 --- /dev/null +++ b/MainWindow.xaml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs new file mode 100644 index 0000000..4f946cd --- /dev/null +++ b/MainWindow.xaml.cs @@ -0,0 +1,50 @@ +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 Hermes +{ + /// + /// Logique d'interaction pour MainWindow.xaml + /// + public partial class MainWindow : Window + { + private CitoyenModal citoyenModal = new CitoyenModal(); + private SearchModal searchModal = new SearchModal(); + + public MainWindow() + { + InitializeComponent(); + List citoyens = new List(); + citoyens.Add(new Citoyen(0, "Dupont", "Jean", new DateTime(1994, 3, 24), "14 rue de la République, Lyon", "Jardinier", 0, "jean.dupont@test.fr", "04 00 00 00 00")); + dgCitoyens.ItemsSource = citoyens; + } + + private void Ajouter_Click(object sender, RoutedEventArgs e) + { + citoyenModal.ShowDialog(); + } + + private void Rechercher_Click(object sender, RoutedEventArgs e) + { + searchModal.ShowDialog(); + } + + protected override void OnClosed(EventArgs e) + { + base.OnClosed(e); + Application.Current.Shutdown(); + } + } +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..8e7d8f0 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("Hermes")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hermes")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur True à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +//Pour commencer à générer des applications localisables, définissez +//CultureUtiliséePourCoder dans votre fichier .csproj +//dans . Par exemple, si vous utilisez le français +//dans vos fichiers sources, définissez à fr-FR. Puis, supprimez les marques de commentaire de +//l'attribut NeutralResourceLanguage ci-dessous. Mettez à jour "fr-FR" dans +//la ligne ci-après pour qu'elle corresponde au paramètre UICulture du fichier projet. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //où se trouvent les dictionnaires de ressources spécifiques à un thème + //(utilisé si une ressource est introuvable dans la page, + // ou dictionnaires de ressources de l'application) + ResourceDictionaryLocation.SourceAssembly //où se trouve le dictionnaire de ressources générique + //(utilisé si une ressource est introuvable dans la page, + // dans l'application ou dans l'un des dictionnaires de ressources spécifiques à un thème) +)] + + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..b197c56 --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Ce code a été généré par un outil. +// Version du runtime :4.0.30319.42000 +// +// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +// le code est régénéré. +// +//------------------------------------------------------------------------------ + +namespace Hermes.Properties +{ + + + /// + /// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées. + /// + // Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder + // à l'aide d'un outil, tel que ResGen ou Visual Studio. + // Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen + // avec l'option /str ou régénérez votre projet VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Retourne l'instance ResourceManager mise en cache utilisée par cette classe. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Hermes.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Remplace la propriété CurrentUICulture du thread actuel pour toutes + /// les recherches de ressources à l'aide de cette classe de ressource fortement typée. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..2a6b510 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Hermes.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/SearchModal.xaml b/SearchModal.xaml new file mode 100644 index 0000000..485f66a --- /dev/null +++ b/SearchModal.xaml @@ -0,0 +1,36 @@ + + + + + + Supérieur à + Inférieur à + Egal à + + + + + + + + + + + + Principale + Secondaire + + + + + + \ No newline at end of file diff --git a/SearchModal.xaml.cs b/SearchModal.xaml.cs new file mode 100644 index 0000000..e11ba88 --- /dev/null +++ b/SearchModal.xaml.cs @@ -0,0 +1,32 @@ +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 Hermes +{ + /// + /// Logique d'interaction pour SearchModal.xaml + /// + public partial class SearchModal : Window + { + public SearchModal() + { + InitializeComponent(); + } + + private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { + e.Cancel = true; + this.Hide(); + } + } +} diff --git a/packages.config b/packages.config new file mode 100644 index 0000000..2088b48 --- /dev/null +++ b/packages.config @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file