diff --git a/PlanningScheduler/App.config b/PlanningScheduler/App.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/PlanningScheduler/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/PlanningScheduler/App.xaml b/PlanningScheduler/App.xaml new file mode 100644 index 0000000..d90fcae --- /dev/null +++ b/PlanningScheduler/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/PlanningScheduler/App.xaml.cs b/PlanningScheduler/App.xaml.cs new file mode 100644 index 0000000..e075e29 --- /dev/null +++ b/PlanningScheduler/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace PlanningScheduler +{ + /// + /// Logique d'interaction pour App.xaml + /// + public partial class App : Application + { + } +} diff --git a/PlanningScheduler/MainWindow.xaml b/PlanningScheduler/MainWindow.xaml new file mode 100644 index 0000000..4645997 --- /dev/null +++ b/PlanningScheduler/MainWindow.xaml @@ -0,0 +1,6 @@ + + + diff --git a/PlanningScheduler/MainWindow.xaml.cs b/PlanningScheduler/MainWindow.xaml.cs new file mode 100644 index 0000000..a714cc6 --- /dev/null +++ b/PlanningScheduler/MainWindow.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.Navigation; +using System.Windows.Shapes; + +namespace PlanningScheduler +{ + /// + /// Logique d'interaction pour MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/PlanningScheduler/PlanningScheduler.csproj b/PlanningScheduler/PlanningScheduler.csproj new file mode 100644 index 0000000..bc0c0eb --- /dev/null +++ b/PlanningScheduler/PlanningScheduler.csproj @@ -0,0 +1,110 @@ + + + + + Debug + AnyCPU + {B827CC9F-23F1-40B5-A0AA-B2F528E0BDD5} + WinExe + Properties + PlanningScheduler + PlanningScheduler + v4.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + {6cbc43b6-e950-49b2-b14a-563c50fcd5c3} + Calendar.NET + + + + + \ No newline at end of file diff --git a/PlanningScheduler/Properties/AssemblyInfo.cs b/PlanningScheduler/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a890cfd --- /dev/null +++ b/PlanningScheduler/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. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("PlanningScheduler")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("PlanningScheduler")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[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 +//CultureYouAreCodingWith 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/PlanningScheduler/Properties/Resources.Designer.cs b/PlanningScheduler/Properties/Resources.Designer.cs new file mode 100644 index 0000000..8f4235b --- /dev/null +++ b/PlanningScheduler/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Ce code a été généré par un outil. +// Version du runtime :4.0.30319.34209 +// +// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si +// le code est régénéré. +// +//------------------------------------------------------------------------------ + +namespace PlanningScheduler.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("PlanningScheduler.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/PlanningScheduler/Properties/Resources.resx b/PlanningScheduler/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/PlanningScheduler/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/PlanningScheduler/Properties/Settings.Designer.cs b/PlanningScheduler/Properties/Settings.Designer.cs new file mode 100644 index 0000000..2967226 --- /dev/null +++ b/PlanningScheduler/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34209 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace PlanningScheduler.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/PlanningScheduler/Properties/Settings.settings b/PlanningScheduler/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/PlanningScheduler/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/ProjetLabo Dev.sln b/ProjetLabo Dev.sln index 9168e16..43df692 100644 --- a/ProjetLabo Dev.sln +++ b/ProjetLabo Dev.sln @@ -1,10 +1,12 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.30723.0 +VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjetLabo Dev", "ProjetLabo Dev\ProjetLabo Dev.csproj", "{5D58A25A-C801-4C31-B882-2746ED7F7769}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calendar.NET", "..\..\..\Downloads\NetCalendar\Calendar.NET\Calendar.NET.csproj", "{6CBC43B6-E950-49B2-B14A-563C50FCD5C3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {5D58A25A-C801-4C31-B882-2746ED7F7769}.Debug|Any CPU.Build.0 = Debug|Any CPU {5D58A25A-C801-4C31-B882-2746ED7F7769}.Release|Any CPU.ActiveCfg = Release|Any CPU {5D58A25A-C801-4C31-B882-2746ED7F7769}.Release|Any CPU.Build.0 = Release|Any CPU + {6CBC43B6-E950-49B2-B14A-563C50FCD5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CBC43B6-E950-49B2-B14A-563C50FCD5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CBC43B6-E950-49B2-B14A-563C50FCD5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CBC43B6-E950-49B2-B14A-563C50FCD5C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ProjetLabo Dev/Database1.mdf b/ProjetLabo Dev/Database1.mdf index 469847b..c21c00a 100644 Binary files a/ProjetLabo Dev/Database1.mdf and b/ProjetLabo Dev/Database1.mdf differ diff --git a/ProjetLabo Dev/Database1_log.ldf b/ProjetLabo Dev/Database1_log.ldf index 5ba8b02..1ff3b2a 100644 Binary files a/ProjetLabo Dev/Database1_log.ldf and b/ProjetLabo Dev/Database1_log.ldf differ diff --git a/ProjetLabo Dev/Form1.Designer.cs b/ProjetLabo Dev/Form1.Designer.cs new file mode 100644 index 0000000..253893e --- /dev/null +++ b/ProjetLabo Dev/Form1.Designer.cs @@ -0,0 +1,76 @@ +namespace ProjetLabo_Dev +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.calendar1 = new Calendar.NET.Calendar(); + this.SuspendLayout(); + // + // calendar1 + // + this.calendar1.AllowEditingEvents = true; + this.calendar1.CalendarDate = new System.DateTime(2015, 3, 4, 16, 13, 33, 718); + this.calendar1.CalendarView = Calendar.NET.CalendarViews.Month; + this.calendar1.DateHeaderFont = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold); + this.calendar1.DayOfWeekFont = new System.Drawing.Font("Arial", 10F); + this.calendar1.DaysFont = new System.Drawing.Font("Arial", 10F); + this.calendar1.DayViewTimeFont = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.calendar1.DimDisabledEvents = true; + this.calendar1.HighlightCurrentDay = true; + this.calendar1.LoadPresetHolidays = true; + this.calendar1.Location = new System.Drawing.Point(-2, 2); + this.calendar1.Name = "calendar1"; + this.calendar1.ShowArrowControls = true; + this.calendar1.ShowDashedBorderOnDisabledEvents = true; + this.calendar1.ShowDateInHeader = true; + this.calendar1.ShowDisabledEvents = false; + this.calendar1.ShowEventTooltips = true; + this.calendar1.ShowTodayButton = true; + this.calendar1.Size = new System.Drawing.Size(651, 430); + this.calendar1.TabIndex = 0; + this.calendar1.TodayFont = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.calendar1.Load += new System.EventHandler(this.calendar1_Load); + this.calendar1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.calendar1_MouseDoubleClick); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(652, 431); + this.Controls.Add(this.calendar1); + this.Name = "Form1"; + this.Text = "Planning"; + this.ResumeLayout(false); + + } + + #endregion + + private Calendar.NET.Calendar calendar1; + } +} \ No newline at end of file diff --git a/ProjetLabo Dev/Form1.cs b/ProjetLabo Dev/Form1.cs new file mode 100644 index 0000000..5328e77 --- /dev/null +++ b/ProjetLabo Dev/Form1.cs @@ -0,0 +1,132 @@ +using Calendar.NET; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ProjetLabo_Dev +{ + public partial class Form1 : Form + { + [CustomRecurringFunction("RehabDates", "Calculates which days I should be getting Rehab")] + private bool RehabDays(IEvent evnt, DateTime day) + { + if (day.DayOfWeek == DayOfWeek.Monday || day.DayOfWeek == DayOfWeek.Friday) + { + if (day.Ticks >= (new DateTime(2012, 7, 1)).Ticks) + return false; + return true; + } + + return false; + } + + public Form1() + { + InitializeComponent(); + + calendar1.CalendarDate = new DateTime(2012, 5, 2, 0, 0, 0); + calendar1.CalendarView = CalendarViews.Month; + calendar1.AllowEditingEvents = true; + + var groundhogEvent = new HolidayEvent + { + Date = new DateTime(2012, 2, 2), + EventText = "Groundhog Day", + RecurringFrequency = RecurringFrequencies.Yearly + }; + + calendar1.AddEvent(groundhogEvent); + + //var exerciseEvent = new CustomEvent + // { + // Date = DateTime.Now, + // RecurringFrequency = RecurringFrequencies.EveryMonWedFri, + // EventLengthInHours = 1, + // EventText = "Time for Exercise!" + // }; + + + //calendar1.AddEvent(exerciseEvent); + + + //var rehabEvent = new CustomEvent + // { + // Date = DateTime.Now, + // RecurringFrequency = RecurringFrequencies.Custom, + // EventText = "Rehab Therapy", + // Rank = 3, + // CustomRecurringFunction = RehabDays + // }; + + //calendar1.AddEvent(rehabEvent); + + //var ce = new CustomEvent(); + + //ce.EventText = "My Event"; + //ce.Date = new DateTime(2012, 4, 1); + //ce.RecurringFrequency = RecurringFrequencies.Monthly; + //ce.EventFont = new Font("Verdana", 12, FontStyle.Regular); + //ce.ThisDayForwardOnly = true; + //ce.Enabled = true; + //calendar1.AddEvent(ce); + + //var ce2 = new HolidayEvent(); + + //ce2.EventText = "test"; + //ce2.Date = new DateTime(2012, 4, 2); + //ce2.RecurringFrequency = RecurringFrequencies.EveryMonWedFri; + //ce2.Rank = 3; + //calendar1.AddEvent(ce2); + + //var ce = new CustomEvent(); + //ce.IgnoreTimeComponent = false; + //ce.EventText = "test Riadh"; + //ce.Date = new DateTime(2015, 02, 04, 15, 30, 0); + //ce.EventLengthInHours = 2f; + //ce.RecurringFrequency = RecurringFrequencies.None; + //ce.EventFont = new Font("Verdana", 12, FontStyle.Regular); + //ce.Enabled = true; + //calendar1.AddEvent(ce); + + var ce2 = new CustomEvent + { + IgnoreTimeComponent = false, + EventText = "Dinner", + Date = new DateTime(2012, 5, 15, 18, 0, 0), + EventLengthInHours = 2f, + RecurringFrequency = RecurringFrequencies.None, + EventFont = new Font("Verdana", 12, FontStyle.Regular), + Enabled = true, + EventColor = Color.FromArgb(120, 255, 120), + EventTextColor = Color.Black, + ThisDayForwardOnly = true + }; + calendar1.AddEvent(ce2); + } + + [CustomRecurringFunction("Get Monday and Wednesday", "Selects the Monday and Wednesday of each month")] + public bool GetMondayAndWednesday(IEvent evnt, DateTime dt) + { + if (dt.DayOfWeek == DayOfWeek.Monday || dt.DayOfWeek == DayOfWeek.Wednesday) + return true; + return false; + } + + private void calendar1_MouseDoubleClick(object sender, MouseEventArgs e) + { + //add event + + } + + private void calendar1_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/ProjetLabo Dev/Form1.resx b/ProjetLabo Dev/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ProjetLabo Dev/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ProjetLabo Dev/Gestion.xaml b/ProjetLabo Dev/Gestion.xaml new file mode 100644 index 0000000..8658bfd --- /dev/null +++ b/ProjetLabo Dev/Gestion.xaml @@ -0,0 +1,13 @@ + + + + + + diff --git a/ProjetLabo Dev/Gestion.xaml.cs b/ProjetLabo Dev/Gestion.xaml.cs new file mode 100644 index 0000000..4f3546c --- /dev/null +++ b/ProjetLabo Dev/Gestion.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.Navigation; +using System.Windows.Shapes; + +namespace ProjetLabo_Dev +{ + /// + /// Logique d'interaction pour Gestion.xaml + /// + public partial class Gestion : Page + { + public Gestion() + { + InitializeComponent(); + } + } +} diff --git a/ProjetLabo Dev/Interface/Acceuil.xaml b/ProjetLabo Dev/Interface/Acceuil.xaml index 39bfc6d..7e37bb7 100644 --- a/ProjetLabo Dev/Interface/Acceuil.xaml +++ b/ProjetLabo Dev/Interface/Acceuil.xaml @@ -8,10 +8,10 @@ Title="Acceuil"> -