├── MyMediaPlayer ├── obj │ └── Debug │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ ├── MyMediaPlayer.exe │ │ ├── MyMediaPlayer.pdb │ │ ├── View │ │ ├── LibraryView.baml │ │ ├── MainWindow.baml │ │ ├── PlaylistView.baml │ │ ├── MediaPlayerView.baml │ │ ├── Page1.g.i.cs │ │ ├── Page2.g.i.cs │ │ ├── MediaPlayer.g.i.cs │ │ ├── UserControl.g.i.cs │ │ ├── UserControl1.g.i.cs │ │ ├── UserControl2.g.i.cs │ │ ├── UserControlView.g.i.cs │ │ ├── UserControlViewModel.g.i.cs │ │ ├── MainWindow.g.cs │ │ ├── MainWindow.g.i.cs │ │ ├── LibraryView.g.cs │ │ ├── LibraryView.g.i.cs │ │ ├── PlaylistView.g.cs │ │ └── PlaylistView.g.i.cs │ │ ├── MyMediaPlayer.g.resources │ │ ├── MyMediaPlayer.Properties.Resources.resources │ │ ├── MyMediaPlayer.csproj.GenerateResource.Cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── MyMediaPlayer.csprojResolveAssemblyReference.cache │ │ ├── MyMediaPlayer_MarkupCompile.i.lref │ │ ├── MyMediaPlayer_MarkupCompile.lref │ │ ├── MyMediaPlayer_MarkupCompile.cache │ │ ├── MyMediaPlayer_MarkupCompile.i.cache │ │ ├── MyMediaPlayer_Content.g.i.cs │ │ ├── App.g.cs │ │ ├── App.g.i.cs │ │ ├── GeneratedInternalTypeHelper.g.cs │ │ ├── GeneratedInternalTypeHelper.g.i.cs │ │ ├── MainWindow.g.i.cs │ │ ├── UserControlView.g.i.cs │ │ └── ViewModel │ │ ├── UserControl1.g.i.cs │ │ └── UserControlViewModel.g.i.cs ├── Img │ ├── mute.PNG │ ├── next.PNG │ ├── play.PNG │ ├── stop.PNG │ ├── pause.PNG │ ├── unmute.PNG │ └── previous.PNG ├── bin │ └── Debug │ │ ├── MyMediaPlayer.exe │ │ ├── MyMediaPlayer.pdb │ │ ├── taglib-sharp.dll │ │ ├── MyMediaPlayer.vshost.exe │ │ ├── System.Windows.Interactivity.dll │ │ ├── Microsoft.Expression.Interactions.dll │ │ ├── de │ │ ├── System.Windows.Interactivity.resources.dll │ │ └── Microsoft.Expression.Interactions.resources.dll │ │ ├── en │ │ ├── System.Windows.Interactivity.resources.dll │ │ └── Microsoft.Expression.Interactions.resources.dll │ │ ├── es │ │ ├── System.Windows.Interactivity.resources.dll │ │ └── Microsoft.Expression.Interactions.resources.dll │ │ ├── fr │ │ ├── System.Windows.Interactivity.resources.dll │ │ └── Microsoft.Expression.Interactions.resources.dll │ │ ├── it │ │ ├── System.Windows.Interactivity.resources.dll │ │ └── Microsoft.Expression.Interactions.resources.dll │ │ ├── ja │ │ ├── System.Windows.Interactivity.resources.dll │ │ └── Microsoft.Expression.Interactions.resources.dll │ │ ├── ko │ │ ├── System.Windows.Interactivity.resources.dll │ │ └── Microsoft.Expression.Interactions.resources.dll │ │ ├── ru │ │ ├── System.Windows.Interactivity.resources.dll │ │ └── Microsoft.Expression.Interactions.resources.dll │ │ ├── zh-Hans │ │ ├── System.Windows.Interactivity.resources.dll │ │ └── Microsoft.Expression.Interactions.resources.dll │ │ ├── zh-Hant │ │ ├── System.Windows.Interactivity.resources.dll │ │ └── Microsoft.Expression.Interactions.resources.dll │ │ ├── MyMediaPlayer.exe.config │ │ ├── MyMediaPlayer.vshost.exe.config │ │ ├── MyMediaPlayer.vshost.exe.manifest │ │ └── PlayList.xml ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── App.xaml.cs ├── App.xaml ├── Model │ ├── BaseModel.cs │ ├── MediaPlayerModel.cs │ ├── PlaylistModel.cs │ └── MediaModel.cs ├── Helper │ ├── ObservableCollectionHelpers.cs │ ├── RelayCommand.cs │ └── MediaInfo.cs ├── ViewModel │ ├── BaseViewModel.cs │ ├── MainWindowViewModel.cs │ ├── MediaPlayerViewModel.cs │ ├── LibraryViewModel.cs │ └── PlaylistViewModel.cs ├── View │ ├── MainWindow.xaml.cs │ ├── MainWindow.xaml │ ├── LibraryView.xaml.cs │ ├── PlaylistView.xaml.cs │ ├── MediaPlayerView.xaml.cs │ ├── LibraryView.xaml │ └── MediaPlayerView.xaml └── MyMediaPlayer.csproj ├── taglib-sharp.dll ├── MyWindowsMediaPlayer.suo ├── MyWindowsMediaPlayer.v12.suo └── MyWindowsMediaPlayer.sln /MyMediaPlayer/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /taglib-sharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/taglib-sharp.dll -------------------------------------------------------------------------------- /MyMediaPlayer/Img/mute.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/Img/mute.PNG -------------------------------------------------------------------------------- /MyMediaPlayer/Img/next.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/Img/next.PNG -------------------------------------------------------------------------------- /MyMediaPlayer/Img/play.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/Img/play.PNG -------------------------------------------------------------------------------- /MyMediaPlayer/Img/stop.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/Img/stop.PNG -------------------------------------------------------------------------------- /MyWindowsMediaPlayer.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyWindowsMediaPlayer.suo -------------------------------------------------------------------------------- /MyMediaPlayer/Img/pause.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/Img/pause.PNG -------------------------------------------------------------------------------- /MyMediaPlayer/Img/unmute.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/Img/unmute.PNG -------------------------------------------------------------------------------- /MyWindowsMediaPlayer.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyWindowsMediaPlayer.v12.suo -------------------------------------------------------------------------------- /MyMediaPlayer/Img/previous.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/Img/previous.PNG -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/MyMediaPlayer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/MyMediaPlayer.exe -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/MyMediaPlayer.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/MyMediaPlayer.pdb -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/taglib-sharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/taglib-sharp.dll -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/MyMediaPlayer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/obj/Debug/MyMediaPlayer.exe -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/MyMediaPlayer.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/obj/Debug/MyMediaPlayer.pdb -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/LibraryView.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/obj/Debug/View/LibraryView.baml -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/MainWindow.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/obj/Debug/View/MainWindow.baml -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/PlaylistView.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/obj/Debug/View/PlaylistView.baml -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/MyMediaPlayer.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/MyMediaPlayer.vshost.exe -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/MyMediaPlayer.g.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/obj/Debug/MyMediaPlayer.g.resources -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/MediaPlayerView.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/obj/Debug/View/MediaPlayerView.baml -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/System.Windows.Interactivity.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/System.Windows.Interactivity.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/Microsoft.Expression.Interactions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/Microsoft.Expression.Interactions.dll -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/MyMediaPlayer.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/obj/Debug/MyMediaPlayer.Properties.Resources.resources -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/MyMediaPlayer.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/obj/Debug/MyMediaPlayer.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/de/System.Windows.Interactivity.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/de/System.Windows.Interactivity.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/en/System.Windows.Interactivity.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/en/System.Windows.Interactivity.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/es/System.Windows.Interactivity.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/es/System.Windows.Interactivity.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/fr/System.Windows.Interactivity.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/fr/System.Windows.Interactivity.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/it/System.Windows.Interactivity.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/it/System.Windows.Interactivity.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/ja/System.Windows.Interactivity.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/ja/System.Windows.Interactivity.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/ko/System.Windows.Interactivity.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/ko/System.Windows.Interactivity.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/ru/System.Windows.Interactivity.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/ru/System.Windows.Interactivity.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/de/Microsoft.Expression.Interactions.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/de/Microsoft.Expression.Interactions.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/en/Microsoft.Expression.Interactions.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/en/Microsoft.Expression.Interactions.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/es/Microsoft.Expression.Interactions.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/es/Microsoft.Expression.Interactions.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/fr/Microsoft.Expression.Interactions.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/fr/Microsoft.Expression.Interactions.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/it/Microsoft.Expression.Interactions.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/it/Microsoft.Expression.Interactions.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/ja/Microsoft.Expression.Interactions.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/ja/Microsoft.Expression.Interactions.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/ko/Microsoft.Expression.Interactions.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/ko/Microsoft.Expression.Interactions.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/ru/Microsoft.Expression.Interactions.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/ru/Microsoft.Expression.Interactions.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/zh-Hans/System.Windows.Interactivity.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/zh-Hans/System.Windows.Interactivity.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/zh-Hant/System.Windows.Interactivity.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/zh-Hant/System.Windows.Interactivity.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/MyMediaPlayer.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/obj/Debug/MyMediaPlayer.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/zh-Hans/Microsoft.Expression.Interactions.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/zh-Hans/Microsoft.Expression.Interactions.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/zh-Hant/Microsoft.Expression.Interactions.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kefranabg/MyMediaPlayer/master/MyMediaPlayer/bin/Debug/zh-Hant/Microsoft.Expression.Interactions.resources.dll -------------------------------------------------------------------------------- /MyMediaPlayer/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/MyMediaPlayer_MarkupCompile.i.lref: -------------------------------------------------------------------------------- 1 | 2 | 3 | FF:\final_mediaplayer\mymediaplayer\MyMediaPlayer\View\MediaPlayerView.xaml;; 4 | FF:\final_mediaplayer\mymediaplayer\MyMediaPlayer\View\PlaylistView.xaml;; 5 | 6 | -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/MyMediaPlayer.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/MyMediaPlayer.vshost.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /MyMediaPlayer/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/MyMediaPlayer_MarkupCompile.lref: -------------------------------------------------------------------------------- 1 | 2 | 3 | FF:\final_mediaplayer\mymediaplayer\MyMediaPlayer\View\MainWindow.xaml;; 4 | FF:\final_mediaplayer\mymediaplayer\MyMediaPlayer\View\MediaPlayerView.xaml;; 5 | FF:\final_mediaplayer\mymediaplayer\MyMediaPlayer\View\LibraryView.xaml;; 6 | FF:\final_mediaplayer\mymediaplayer\MyMediaPlayer\View\PlaylistView.xaml;; 7 | 8 | -------------------------------------------------------------------------------- /MyMediaPlayer/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace MyMediaPlayer 10 | { 11 | /// 12 | /// Logique d'interaction pour App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/MyMediaPlayer_MarkupCompile.cache: -------------------------------------------------------------------------------- 1 | MyMediaPlayer 2 | 3 | 4 | winexe 5 | C# 6 | .cs 7 | F:\final_mediaplayer\mymediaplayer\MyMediaPlayer\obj\Debug\ 8 | MyMediaPlayer 9 | none 10 | false 11 | DEBUG;TRACE 12 | F:\final_mediaplayer\mymediaplayer\MyMediaPlayer\App.xaml 13 | 4-1349951494 14 | 15 | 201328573825 16 | 15-1180394077 17 | View\MainWindow.xaml;View\MediaPlayerView.xaml;View\LibraryView.xaml;View\PlaylistView.xaml; 18 | 19 | False 20 | 21 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/MyMediaPlayer_MarkupCompile.i.cache: -------------------------------------------------------------------------------- 1 | MyMediaPlayer 2 | 3 | 4 | winexe 5 | C# 6 | .cs 7 | F:\final_mediaplayer\mymediaplayer\MyMediaPlayer\obj\Debug\ 8 | MyMediaPlayer 9 | none 10 | false 11 | DEBUG;TRACE 12 | F:\final_mediaplayer\mymediaplayer\MyMediaPlayer\App.xaml 13 | 4-1349951494 14 | 15 | 241591533296 16 | 15-1180394077 17 | View\MainWindow.xaml;View\MediaPlayerView.xaml;View\LibraryView.xaml;View\PlaylistView.xaml; 18 | 19 | True 20 | 21 | -------------------------------------------------------------------------------- /MyMediaPlayer/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/MyMediaPlayer.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /MyMediaPlayer/Model/BaseModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MyMediaPlayer.Model 9 | { 10 | public class BaseModel : INotifyPropertyChanged 11 | { 12 | protected void RaisePropertyChanged(string prop) 13 | { 14 | if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(prop)); } 15 | } 16 | public event PropertyChangedEventHandler PropertyChanged; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /MyMediaPlayer/Helper/ObservableCollectionHelpers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MyMediaPlayer.Helper 9 | { 10 | public static class ObservableCollectionHelpers 11 | { 12 | public static void Replace(this ObservableCollection old, ObservableCollection tmp) 13 | { 14 | old.Clear(); 15 | foreach (var item in tmp) 16 | old.Add(item); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /MyMediaPlayer/ViewModel/BaseViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Input; 8 | 9 | namespace MyMediaPlayer.ViewModel 10 | { 11 | public abstract class BaseViewModel : INotifyPropertyChanged 12 | { 13 | protected void RaisePropertyChanged(string prop) 14 | { 15 | if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(prop)); } 16 | } 17 | public event PropertyChangedEventHandler PropertyChanged; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /MyMediaPlayer/View/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using MyMediaPlayer.ViewModel; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Data; 10 | using System.Windows.Documents; 11 | using System.Windows.Input; 12 | using System.Windows.Media; 13 | using System.Windows.Media.Imaging; 14 | using System.Windows.Navigation; 15 | using System.Windows.Shapes; 16 | 17 | namespace MyMediaPlayer.View 18 | { 19 | public partial class MainWindow : Window 20 | { 21 | public MainWindow() 22 | { 23 | InitializeComponent(); 24 | } 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/MyMediaPlayer_Content.g.i.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.18444 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("img/mute.png")] 12 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("img/next.png")] 13 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("img/previous.png")] 14 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("img/stop.png")] 15 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("img/unmute.png")] 16 | 17 | 18 | -------------------------------------------------------------------------------- /MyWindowsMediaPlayer.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMediaPlayer", "MyMediaPlayer\MyMediaPlayer.csproj", "{2CF024A1-A0E6-479A-A40B-6DE5989D5B2D}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2CF024A1-A0E6-479A-A40B-6DE5989D5B2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2CF024A1-A0E6-479A-A40B-6DE5989D5B2D}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2CF024A1-A0E6-479A-A40B-6DE5989D5B2D}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2CF024A1-A0E6-479A-A40B-6DE5989D5B2D}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /MyMediaPlayer/View/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /MyMediaPlayer/bin/Debug/PlayList.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | playlist 5 | 6 | 7 | file:///C:/Users/Abgral_f/Videos/test-mpeg.mpg 8 | test-mpeg 9 | 00:21 10 | 11 | 12 | 13 | 14 | 15 | file:///C:/Users/Abgral_f/Videos/Wildlife.wmv 16 | Wildlife 17 | 00:36 18 | 19 | 20 | 21 | 22 | 23 | file:///C:/Users/Abgral_f/Music/intro-dotnet-3.mp4 24 | intro-dotnet-3 25 | 40:33 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /MyMediaPlayer/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18444 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace MyMediaPlayer.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /MyMediaPlayer/Helper/RelayCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Input; 7 | 8 | namespace MyMediaPlayer.Helper 9 | { 10 | public class RelayCommand : ICommand 11 | { 12 | #region Fields 13 | 14 | readonly Action _execute; 15 | readonly Predicate _canExecute; 16 | 17 | #endregion // Fields 18 | 19 | #region Constructors 20 | 21 | public RelayCommand(Action execute) 22 | : this(execute, null) 23 | { 24 | } 25 | 26 | public RelayCommand(Action execute, Predicate canExecute) 27 | { 28 | if (execute == null) 29 | throw new ArgumentNullException("execute"); 30 | 31 | _execute = execute; 32 | _canExecute = canExecute; 33 | } 34 | #endregion // Constructors 35 | 36 | #region ICommand Members 37 | 38 | public bool CanExecute(object parameter) 39 | { 40 | return _canExecute == null ? true : _canExecute(parameter); 41 | } 42 | 43 | public event EventHandler CanExecuteChanged 44 | { 45 | add { CommandManager.RequerySuggested += value; } 46 | remove { CommandManager.RequerySuggested -= value; } 47 | } 48 | 49 | public void Execute(object parameter) 50 | { 51 | _execute(parameter); 52 | } 53 | 54 | #endregion // ICommand Members 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /MyMediaPlayer/View/LibraryView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace MyMediaPlayer.View 17 | { 18 | public partial class LibraryView : UserControl 19 | { 20 | public LibraryView() 21 | { 22 | InitializeComponent(); 23 | } 24 | 25 | 26 | private void MouseOver(object sender, MouseEventArgs e) 27 | { 28 | if (this.Cursor != Cursors.Wait) 29 | Mouse.OverrideCursor = Cursors.Hand; 30 | (sender as Button).Foreground = new SolidColorBrush(Colors.White); 31 | } 32 | 33 | private void MouseLeave(object sender, MouseEventArgs e) 34 | { 35 | if (this.Cursor != Cursors.Wait) 36 | Mouse.OverrideCursor = Cursors.Arrow; 37 | (sender as Button).Foreground = new SolidColorBrush(Color.FromRgb(167, 170, 172)); 38 | } 39 | 40 | private void buttonOver(object sender, MouseEventArgs e) 41 | { 42 | if (this.Cursor != Cursors.Wait) 43 | Mouse.OverrideCursor = Cursors.Hand; 44 | (sender as Grid).Background = new SolidColorBrush(Color.FromRgb(34, 86, 148)); 45 | } 46 | 47 | private void buttonLeave(object sender, MouseEventArgs e) 48 | { 49 | if (this.Cursor != Cursors.Wait) 50 | Mouse.OverrideCursor = Cursors.Arrow; 51 | (sender as Grid).Background = new SolidColorBrush(Color.FromRgb(31, 55, 95)); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /MyMediaPlayer/Model/MediaPlayerModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | 8 | namespace MyMediaPlayer.Model 9 | { 10 | public class MediaPlayerModel : BaseModel 11 | { 12 | private Uri source; 13 | public Uri Source 14 | { 15 | get { return source; } 16 | set 17 | { 18 | source = value; 19 | RaisePropertyChanged("Source"); 20 | } 21 | } 22 | 23 | private bool isPlaying; 24 | public bool IsPlaying 25 | { 26 | get { return isPlaying; } 27 | set 28 | { 29 | isPlaying = value; 30 | RaisePropertyChanged("IsPlaying"); 31 | } 32 | } 33 | 34 | private double volume; 35 | public double Volume 36 | { 37 | get { return volume; } 38 | set 39 | { 40 | volume = value; 41 | RaisePropertyChanged("Volume"); 42 | } 43 | } 44 | 45 | private double positionTime; 46 | public double PositionTime 47 | { 48 | get { return positionTime; } 49 | set 50 | { 51 | positionTime = value; 52 | RaisePropertyChanged("PositionTime"); 53 | } 54 | } 55 | 56 | private double totalTime; 57 | public double TotalTime 58 | { 59 | get { return totalTime; } 60 | set 61 | { 62 | totalTime = value; 63 | RaisePropertyChanged("TotalTime"); 64 | } 65 | } 66 | 67 | private bool isMute; 68 | 69 | public bool IsMute 70 | { 71 | get { return isMute; } 72 | set 73 | { 74 | isMute = value; 75 | RaisePropertyChanged("IsMute"); 76 | } 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /MyMediaPlayer/Model/PlaylistModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Xml; 8 | using System.Xml.Serialization; 9 | namespace MyMediaPlayer.Model 10 | { 11 | public class PlaylistModel : BaseModel 12 | { 13 | 14 | public PlaylistModel() 15 | { 16 | this.Name = "None"; 17 | this.ListMedias = new ObservableCollection(); 18 | } 19 | public PlaylistModel(string _name, ObservableCollection _listMedias) 20 | { 21 | this.Name = _name; 22 | this.ListMedias = _listMedias; 23 | } 24 | private string name; 25 | public string Name 26 | { 27 | get { return name; } 28 | set 29 | { 30 | name = value; 31 | RaisePropertyChanged("Name"); 32 | } 33 | } 34 | private ObservableCollection listMedias; 35 | public ObservableCollection ListMedias 36 | { 37 | get { return listMedias; } 38 | set 39 | { 40 | listMedias = value; 41 | RaisePropertyChanged("Name"); 42 | } 43 | } 44 | 45 | public PlaylistModelSerializer getSerializer() 46 | { 47 | PlaylistModelSerializer ret = new PlaylistModelSerializer(); 48 | ret.Name = this.name; 49 | foreach (MediaModel mm in listMedias) 50 | { 51 | ret.media.Add(mm.getSerializer()); 52 | } 53 | return ret; 54 | } 55 | } 56 | [Serializable] 57 | public class PlaylistModelSerializer 58 | { 59 | public PlaylistModelSerializer() 60 | { 61 | this.Name = ""; 62 | this.media = new Collection(); 63 | } 64 | public string Name { get; set; } 65 | [XmlArray] 66 | public Collection media { get; set; } 67 | public PlaylistModel getDeSerializer() 68 | { 69 | PlaylistModel ret = new PlaylistModel(); 70 | ret.Name = this.Name; 71 | foreach (MediaModelSerializer mms in media) 72 | { 73 | ret.ListMedias.Add(mms.getDeSerializer()); 74 | } 75 | return ret; 76 | 77 | } 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/App.g.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "47C030301CE92CDE532F76109B9B32D9" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using MyMediaPlayer.View; 13 | using MyMediaPlayer.ViewModel; 14 | using System; 15 | using System.Diagnostics; 16 | using System.Windows; 17 | using System.Windows.Automation; 18 | using System.Windows.Controls; 19 | using System.Windows.Controls.Primitives; 20 | using System.Windows.Data; 21 | using System.Windows.Documents; 22 | using System.Windows.Ink; 23 | using System.Windows.Input; 24 | using System.Windows.Markup; 25 | using System.Windows.Media; 26 | using System.Windows.Media.Animation; 27 | using System.Windows.Media.Effects; 28 | using System.Windows.Media.Imaging; 29 | using System.Windows.Media.Media3D; 30 | using System.Windows.Media.TextFormatting; 31 | using System.Windows.Navigation; 32 | using System.Windows.Shapes; 33 | using System.Windows.Shell; 34 | 35 | 36 | namespace MyMediaPlayer { 37 | 38 | 39 | /// 40 | /// App 41 | /// 42 | public partial class App : System.Windows.Application { 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | 51 | #line 6 "..\..\App.xaml" 52 | this.StartupUri = new System.Uri("View/MainWindow.xaml", System.UriKind.Relative); 53 | 54 | #line default 55 | #line hidden 56 | } 57 | 58 | /// 59 | /// Application Entry Point. 60 | /// 61 | [System.STAThreadAttribute()] 62 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 63 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 64 | public static void Main() { 65 | MyMediaPlayer.App app = new MyMediaPlayer.App(); 66 | app.InitializeComponent(); 67 | app.Run(); 68 | } 69 | } 70 | } 71 | 72 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/App.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "47C030301CE92CDE532F76109B9B32D9" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using MyMediaPlayer.View; 13 | using MyMediaPlayer.ViewModel; 14 | using System; 15 | using System.Diagnostics; 16 | using System.Windows; 17 | using System.Windows.Automation; 18 | using System.Windows.Controls; 19 | using System.Windows.Controls.Primitives; 20 | using System.Windows.Data; 21 | using System.Windows.Documents; 22 | using System.Windows.Ink; 23 | using System.Windows.Input; 24 | using System.Windows.Markup; 25 | using System.Windows.Media; 26 | using System.Windows.Media.Animation; 27 | using System.Windows.Media.Effects; 28 | using System.Windows.Media.Imaging; 29 | using System.Windows.Media.Media3D; 30 | using System.Windows.Media.TextFormatting; 31 | using System.Windows.Navigation; 32 | using System.Windows.Shapes; 33 | using System.Windows.Shell; 34 | 35 | 36 | namespace MyMediaPlayer { 37 | 38 | 39 | /// 40 | /// App 41 | /// 42 | public partial class App : System.Windows.Application { 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | 51 | #line 6 "..\..\App.xaml" 52 | this.StartupUri = new System.Uri("View/MainWindow.xaml", System.UriKind.Relative); 53 | 54 | #line default 55 | #line hidden 56 | } 57 | 58 | /// 59 | /// Application Entry Point. 60 | /// 61 | [System.STAThreadAttribute()] 62 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 63 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 64 | public static void Main() { 65 | MyMediaPlayer.App app = new MyMediaPlayer.App(); 66 | app.InitializeComponent(); 67 | app.Run(); 68 | } 69 | } 70 | } 71 | 72 | -------------------------------------------------------------------------------- /MyMediaPlayer/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // Les informations générales relatives à un assembly dépendent de 8 | // l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations 9 | // associées à un assembly. 10 | [assembly: AssemblyTitle("MyMediaPlayer")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("MyMediaPlayer")] 15 | [assembly: AssemblyCopyright("Copyright © 2014")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly 20 | // aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de 21 | // COM, affectez la valeur true à l'attribut ComVisible sur ce type. 22 | [assembly: ComVisible(false)] 23 | 24 | //Pour commencer à générer des applications localisables, définissez 25 | //CultureYouAreCodingWith dans votre fichier .csproj 26 | //dans . Par exemple, si vous utilisez le français 27 | //dans vos fichiers sources, définissez à fr-FR. Puis, supprimez les marques de commentaire de 28 | //l'attribut NeutralResourceLanguage ci-dessous. Mettez à jour "fr-FR" dans 29 | //la ligne ci-après pour qu'elle corresponde au paramètre UICulture du fichier projet. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //où se trouvent les dictionnaires de ressources spécifiques à un thème 36 | //(utilisé si une ressource est introuvable dans la page, 37 | // ou dictionnaires de ressources de l'application) 38 | ResourceDictionaryLocation.SourceAssembly //où se trouve le dictionnaire de ressources générique 39 | //(utilisé si une ressource est introuvable dans la page, 40 | // dans l'application ou dans l'un des dictionnaires de ressources spécifiques à un thème) 41 | )] 42 | 43 | 44 | // Les informations de version pour un assembly se composent des quatre valeurs suivantes : 45 | // 46 | // Version principale 47 | // Version secondaire 48 | // Numéro de build 49 | // Révision 50 | // 51 | // Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut 52 | // en utilisant '*', comme indiqué ci-dessous : 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /MyMediaPlayer/View/PlaylistView.xaml.cs: -------------------------------------------------------------------------------- 1 | using MyMediaPlayer.Helper; 2 | using MyMediaPlayer.Model; 3 | using MyMediaPlayer.ViewModel; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.ObjectModel; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows; 11 | using System.Windows.Controls; 12 | using System.Windows.Data; 13 | using System.Windows.Documents; 14 | using System.Windows.Input; 15 | using System.Windows.Media; 16 | using System.Windows.Media.Imaging; 17 | using System.Windows.Navigation; 18 | using System.Windows.Shapes; 19 | 20 | namespace MyMediaPlayer.View 21 | { 22 | public partial class PlaylistView : UserControl 23 | { 24 | public PlaylistView() 25 | { 26 | InitializeComponent(); 27 | } 28 | 29 | private void MouseOver(object sender, MouseEventArgs e) 30 | { 31 | if (this.Cursor != Cursors.Wait) 32 | Mouse.OverrideCursor = Cursors.Hand; 33 | (sender as Button).Foreground = new SolidColorBrush(Colors.White); 34 | } 35 | 36 | private void MouseLeave(object sender, MouseEventArgs e) 37 | { 38 | if (this.Cursor != Cursors.Wait) 39 | Mouse.OverrideCursor = Cursors.Arrow; 40 | (sender as Button).Foreground = new SolidColorBrush(Color.FromRgb(167, 170, 172)); 41 | } 42 | 43 | private void buttonOver(object sender, MouseEventArgs e) 44 | { 45 | if (this.Cursor != Cursors.Wait) 46 | Mouse.OverrideCursor = Cursors.Hand; 47 | (sender as Grid).Background = new SolidColorBrush(Color.FromRgb(34, 86, 148)); 48 | } 49 | 50 | private void buttonLeave(object sender, MouseEventArgs e) 51 | { 52 | if (this.Cursor != Cursors.Wait) 53 | Mouse.OverrideCursor = Cursors.Arrow; 54 | (sender as Grid).Background = new SolidColorBrush(Color.FromRgb(31, 55, 95)); 55 | } 56 | 57 | private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e) 58 | { 59 | if (this.DataContext == null) 60 | return; 61 | var dataContext = this.DataContext as PlaylistViewModel; 62 | PlaylistModel selectedPlaylist = (PlaylistModel)this.listPlaylist.SelectedItem; 63 | dataContext.selectedPlaylist = selectedPlaylist; 64 | if (selectedPlaylist != null) 65 | ObservableCollectionHelpers.Replace(dataContext.currentPlaylist, selectedPlaylist.ListMedias); 66 | } 67 | 68 | private void listMedias_Drop(object sender, DragEventArgs e) 69 | { 70 | string[] filePaths = e.Data.GetData(DataFormats.FileDrop, true) as string[]; 71 | ((PlaylistViewModel)this.DataContext).InsertFileListToPlaylist(filePaths); 72 | } 73 | 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /MyMediaPlayer/ViewModel/MainWindowViewModel.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Expression.Interactivity.Core; 2 | using MyMediaPlayer.Helper; 3 | using MyMediaPlayer.Model; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.ObjectModel; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows; 11 | using System.Windows.Input; 12 | 13 | namespace MyMediaPlayer.ViewModel 14 | { 15 | public class MainWindowViewModel : BaseViewModel 16 | { 17 | public enum ViewType { Library, MediaPlayer, Playlist, Exit } 18 | public RelayCommand switchViewCommand { get; set; } 19 | public RelayCommand switchPlaylistCommand { get; set; } 20 | 21 | private MediaPlayerViewModel mediaPlayerView = new MediaPlayerViewModel(); 22 | 23 | private LibraryViewModel libraryView = new LibraryViewModel(); 24 | 25 | private PlaylistViewModel playlistView = new PlaylistViewModel(); 26 | 27 | private BaseViewModel currentView; 28 | public BaseViewModel CurrentView 29 | { 30 | get { return currentView; } 31 | set 32 | { 33 | currentView = value; 34 | RaisePropertyChanged("CurrentView"); 35 | } 36 | } 37 | 38 | public delegate void changeView(); 39 | public MainWindowViewModel() 40 | { 41 | switchViewCommand = new RelayCommand(switchView); 42 | switchPlaylistCommand = new RelayCommand(switchPlaylist); 43 | this.CurrentView = mediaPlayerView; 44 | this.playlistView.ImportPlayList(); 45 | } 46 | 47 | ~MainWindowViewModel() 48 | { 49 | this.playlistView.ExportPlayList(); 50 | } 51 | 52 | public void switchView(object param) 53 | { 54 | if ((ViewType)param == ViewType.Library) 55 | this.CurrentView = libraryView; 56 | else if ((ViewType)param == ViewType.Playlist) 57 | this.CurrentView = playlistView; 58 | else if ((ViewType)param == ViewType.MediaPlayer) 59 | this.CurrentView = mediaPlayerView; 60 | else 61 | Application.Current.Shutdown(); 62 | } 63 | 64 | public void switchPlaylist(object param) 65 | { 66 | ObservableCollection list = new ObservableCollection(); 67 | try { list = (ObservableCollection)param; } 68 | catch (System.InvalidCastException e) 69 | { 70 | var items = (param as ObservableCollection).Cast().ToList(); 71 | foreach (MediaModel elem in items) 72 | list.Add(elem); 73 | } 74 | if (list.Count == 0) 75 | return; 76 | mediaPlayerView.replacePlaylist(list, 0); 77 | this.switchView(ViewType.MediaPlayer); 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/GeneratedInternalTypeHelper.g.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.18444 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace XamlGeneratedNamespace { 12 | 13 | 14 | /// 15 | /// GeneratedInternalTypeHelper 16 | /// 17 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 18 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 19 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 20 | public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper { 21 | 22 | /// 23 | /// CreateInstance 24 | /// 25 | protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) { 26 | return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) 27 | | (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture); 28 | } 29 | 30 | /// 31 | /// GetPropertyValue 32 | /// 33 | protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) { 34 | return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture); 35 | } 36 | 37 | /// 38 | /// SetPropertyValue 39 | /// 40 | protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) { 41 | propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture); 42 | } 43 | 44 | /// 45 | /// CreateDelegate 46 | /// 47 | protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) { 48 | return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod 49 | | (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] { 50 | delegateType, 51 | handler}, null))); 52 | } 53 | 54 | /// 55 | /// AddEventHandler 56 | /// 57 | protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) { 58 | eventInfo.AddEventHandler(target, handler); 59 | } 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/GeneratedInternalTypeHelper.g.i.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.18444 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace XamlGeneratedNamespace { 12 | 13 | 14 | /// 15 | /// GeneratedInternalTypeHelper 16 | /// 17 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 18 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 19 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 20 | public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper { 21 | 22 | /// 23 | /// CreateInstance 24 | /// 25 | protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) { 26 | return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) 27 | | (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture); 28 | } 29 | 30 | /// 31 | /// GetPropertyValue 32 | /// 33 | protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) { 34 | return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture); 35 | } 36 | 37 | /// 38 | /// SetPropertyValue 39 | /// 40 | protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) { 41 | propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture); 42 | } 43 | 44 | /// 45 | /// CreateDelegate 46 | /// 47 | protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) { 48 | return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod 49 | | (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] { 50 | delegateType, 51 | handler}, null))); 52 | } 53 | 54 | /// 55 | /// AddEventHandler 56 | /// 57 | protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) { 58 | eventInfo.AddEventHandler(target, handler); 59 | } 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /MyMediaPlayer/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.18444 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace MyMediaPlayer.Properties 12 | { 13 | 14 | 15 | /// 16 | /// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées. 17 | /// 18 | // Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder 19 | // à l'aide d'un outil, tel que ResGen ou Visual Studio. 20 | // Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen 21 | // avec l'option /str ou régénérez votre projet VS. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Retourne l'instance ResourceManager mise en cache utilisée par cette classe. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MyMediaPlayer.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Remplace la propriété CurrentUICulture du thread actuel pour toutes 56 | /// les recherches de ressources à l'aide de cette classe de ressource fortement typée. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/MainWindow.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2C6E0200CC979561FABF7F3DE6ED6750" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using System; 13 | using System.Diagnostics; 14 | using System.Windows; 15 | using System.Windows.Automation; 16 | using System.Windows.Controls; 17 | using System.Windows.Controls.Primitives; 18 | using System.Windows.Data; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Markup; 23 | using System.Windows.Media; 24 | using System.Windows.Media.Animation; 25 | using System.Windows.Media.Effects; 26 | using System.Windows.Media.Imaging; 27 | using System.Windows.Media.Media3D; 28 | using System.Windows.Media.TextFormatting; 29 | using System.Windows.Navigation; 30 | using System.Windows.Shapes; 31 | using System.Windows.Shell; 32 | 33 | 34 | namespace MyMediaPlayer { 35 | 36 | 37 | /// 38 | /// MainWindow 39 | /// 40 | public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { 41 | 42 | private bool _contentLoaded; 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | if (_contentLoaded) { 51 | return; 52 | } 53 | _contentLoaded = true; 54 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/mainwindow.xaml", System.UriKind.Relative); 55 | 56 | #line 1 "..\..\MainWindow.xaml" 57 | System.Windows.Application.LoadComponent(this, resourceLocater); 58 | 59 | #line default 60 | #line hidden 61 | } 62 | 63 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 65 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 66 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 69 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 70 | this._contentLoaded = true; 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/Page1.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\Page1.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "AFF365D5D7BADB0CAE329C2F406E5533" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using System; 13 | using System.Diagnostics; 14 | using System.Windows; 15 | using System.Windows.Automation; 16 | using System.Windows.Controls; 17 | using System.Windows.Controls.Primitives; 18 | using System.Windows.Data; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Markup; 23 | using System.Windows.Media; 24 | using System.Windows.Media.Animation; 25 | using System.Windows.Media.Effects; 26 | using System.Windows.Media.Imaging; 27 | using System.Windows.Media.Media3D; 28 | using System.Windows.Media.TextFormatting; 29 | using System.Windows.Navigation; 30 | using System.Windows.Shapes; 31 | using System.Windows.Shell; 32 | 33 | 34 | namespace MyMediaPlayer.View { 35 | 36 | 37 | /// 38 | /// Page1 39 | /// 40 | public partial class Page1 : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector { 41 | 42 | private bool _contentLoaded; 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | if (_contentLoaded) { 51 | return; 52 | } 53 | _contentLoaded = true; 54 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/page1.xaml", System.UriKind.Relative); 55 | 56 | #line 1 "..\..\..\View\Page1.xaml" 57 | System.Windows.Application.LoadComponent(this, resourceLocater); 58 | 59 | #line default 60 | #line hidden 61 | } 62 | 63 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 65 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 66 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 69 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 70 | this._contentLoaded = true; 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/Page2.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\Page2.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "ED52E66F8362251E12E2F9CB9D1BD9FC" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using System; 13 | using System.Diagnostics; 14 | using System.Windows; 15 | using System.Windows.Automation; 16 | using System.Windows.Controls; 17 | using System.Windows.Controls.Primitives; 18 | using System.Windows.Data; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Markup; 23 | using System.Windows.Media; 24 | using System.Windows.Media.Animation; 25 | using System.Windows.Media.Effects; 26 | using System.Windows.Media.Imaging; 27 | using System.Windows.Media.Media3D; 28 | using System.Windows.Media.TextFormatting; 29 | using System.Windows.Navigation; 30 | using System.Windows.Shapes; 31 | using System.Windows.Shell; 32 | 33 | 34 | namespace MyMediaPlayer.View { 35 | 36 | 37 | /// 38 | /// Page2 39 | /// 40 | public partial class Page2 : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector { 41 | 42 | private bool _contentLoaded; 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | if (_contentLoaded) { 51 | return; 52 | } 53 | _contentLoaded = true; 54 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/page2.xaml", System.UriKind.Relative); 55 | 56 | #line 1 "..\..\..\View\Page2.xaml" 57 | System.Windows.Application.LoadComponent(this, resourceLocater); 58 | 59 | #line default 60 | #line hidden 61 | } 62 | 63 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 65 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 66 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 69 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 70 | this._contentLoaded = true; 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/UserControlView.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\UserControlView.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "21768070CFEB96D0DF666DC54E0991FE" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using System; 13 | using System.Diagnostics; 14 | using System.Windows; 15 | using System.Windows.Automation; 16 | using System.Windows.Controls; 17 | using System.Windows.Controls.Primitives; 18 | using System.Windows.Data; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Markup; 23 | using System.Windows.Media; 24 | using System.Windows.Media.Animation; 25 | using System.Windows.Media.Effects; 26 | using System.Windows.Media.Imaging; 27 | using System.Windows.Media.Media3D; 28 | using System.Windows.Media.TextFormatting; 29 | using System.Windows.Navigation; 30 | using System.Windows.Shapes; 31 | using System.Windows.Shell; 32 | 33 | 34 | namespace MyMediaPlayer { 35 | 36 | 37 | /// 38 | /// UserControlView 39 | /// 40 | public partial class UserControlView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 41 | 42 | private bool _contentLoaded; 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | if (_contentLoaded) { 51 | return; 52 | } 53 | _contentLoaded = true; 54 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/usercontrolview.xaml", System.UriKind.Relative); 55 | 56 | #line 1 "..\..\UserControlView.xaml" 57 | System.Windows.Application.LoadComponent(this, resourceLocater); 58 | 59 | #line default 60 | #line hidden 61 | } 62 | 63 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 65 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 66 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 69 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 70 | this._contentLoaded = true; 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/MediaPlayer.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\MediaPlayer.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "6A509BEAAB7A117DDDE1F05F527106DD" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using System; 13 | using System.Diagnostics; 14 | using System.Windows; 15 | using System.Windows.Automation; 16 | using System.Windows.Controls; 17 | using System.Windows.Controls.Primitives; 18 | using System.Windows.Data; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Markup; 23 | using System.Windows.Media; 24 | using System.Windows.Media.Animation; 25 | using System.Windows.Media.Effects; 26 | using System.Windows.Media.Imaging; 27 | using System.Windows.Media.Media3D; 28 | using System.Windows.Media.TextFormatting; 29 | using System.Windows.Navigation; 30 | using System.Windows.Shapes; 31 | using System.Windows.Shell; 32 | 33 | 34 | namespace MyMediaPlayer.View { 35 | 36 | 37 | /// 38 | /// MediaPlayer 39 | /// 40 | public partial class MediaPlayer : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 41 | 42 | private bool _contentLoaded; 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | if (_contentLoaded) { 51 | return; 52 | } 53 | _contentLoaded = true; 54 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/mediaplayer.xaml", System.UriKind.Relative); 55 | 56 | #line 1 "..\..\..\View\MediaPlayer.xaml" 57 | System.Windows.Application.LoadComponent(this, resourceLocater); 58 | 59 | #line default 60 | #line hidden 61 | } 62 | 63 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 65 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 66 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 69 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 70 | this._contentLoaded = true; 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/UserControl.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\UserControl.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2BCE6145FE2638FE7A082B807823128D" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using System; 13 | using System.Diagnostics; 14 | using System.Windows; 15 | using System.Windows.Automation; 16 | using System.Windows.Controls; 17 | using System.Windows.Controls.Primitives; 18 | using System.Windows.Data; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Markup; 23 | using System.Windows.Media; 24 | using System.Windows.Media.Animation; 25 | using System.Windows.Media.Effects; 26 | using System.Windows.Media.Imaging; 27 | using System.Windows.Media.Media3D; 28 | using System.Windows.Media.TextFormatting; 29 | using System.Windows.Navigation; 30 | using System.Windows.Shapes; 31 | using System.Windows.Shell; 32 | 33 | 34 | namespace MyMediaPlayer.View { 35 | 36 | 37 | /// 38 | /// UserControlView 39 | /// 40 | public partial class UserControlView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 41 | 42 | private bool _contentLoaded; 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | if (_contentLoaded) { 51 | return; 52 | } 53 | _contentLoaded = true; 54 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/usercontrol.xaml", System.UriKind.Relative); 55 | 56 | #line 1 "..\..\..\View\UserControl.xaml" 57 | System.Windows.Application.LoadComponent(this, resourceLocater); 58 | 59 | #line default 60 | #line hidden 61 | } 62 | 63 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 65 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 66 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 69 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 70 | this._contentLoaded = true; 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/UserControl1.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\UserControl1.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "C44FB3A69F4A46AD7286248D007DB7CC" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using System; 13 | using System.Diagnostics; 14 | using System.Windows; 15 | using System.Windows.Automation; 16 | using System.Windows.Controls; 17 | using System.Windows.Controls.Primitives; 18 | using System.Windows.Data; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Markup; 23 | using System.Windows.Media; 24 | using System.Windows.Media.Animation; 25 | using System.Windows.Media.Effects; 26 | using System.Windows.Media.Imaging; 27 | using System.Windows.Media.Media3D; 28 | using System.Windows.Media.TextFormatting; 29 | using System.Windows.Navigation; 30 | using System.Windows.Shapes; 31 | using System.Windows.Shell; 32 | 33 | 34 | namespace MyMediaPlayer.View { 35 | 36 | 37 | /// 38 | /// UserControl1 39 | /// 40 | public partial class UserControl1 : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 41 | 42 | private bool _contentLoaded; 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | if (_contentLoaded) { 51 | return; 52 | } 53 | _contentLoaded = true; 54 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/usercontrol1.xaml", System.UriKind.Relative); 55 | 56 | #line 1 "..\..\..\View\UserControl1.xaml" 57 | System.Windows.Application.LoadComponent(this, resourceLocater); 58 | 59 | #line default 60 | #line hidden 61 | } 62 | 63 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 65 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 66 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 69 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 70 | this._contentLoaded = true; 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/UserControl2.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\UserControl2.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "92992B111C2B0A91E9E413BAB41C32FC" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using System; 13 | using System.Diagnostics; 14 | using System.Windows; 15 | using System.Windows.Automation; 16 | using System.Windows.Controls; 17 | using System.Windows.Controls.Primitives; 18 | using System.Windows.Data; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Markup; 23 | using System.Windows.Media; 24 | using System.Windows.Media.Animation; 25 | using System.Windows.Media.Effects; 26 | using System.Windows.Media.Imaging; 27 | using System.Windows.Media.Media3D; 28 | using System.Windows.Media.TextFormatting; 29 | using System.Windows.Navigation; 30 | using System.Windows.Shapes; 31 | using System.Windows.Shell; 32 | 33 | 34 | namespace MyMediaPlayer.View { 35 | 36 | 37 | /// 38 | /// UserControl2 39 | /// 40 | public partial class UserControl2 : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 41 | 42 | private bool _contentLoaded; 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | if (_contentLoaded) { 51 | return; 52 | } 53 | _contentLoaded = true; 54 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/usercontrol2.xaml", System.UriKind.Relative); 55 | 56 | #line 1 "..\..\..\View\UserControl2.xaml" 57 | System.Windows.Application.LoadComponent(this, resourceLocater); 58 | 59 | #line default 60 | #line hidden 61 | } 62 | 63 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 65 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 66 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 69 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 70 | this._contentLoaded = true; 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/UserControlView.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\UserControlView.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "50B4CB19635EE227522EA423D4D17E7B" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using System; 13 | using System.Diagnostics; 14 | using System.Windows; 15 | using System.Windows.Automation; 16 | using System.Windows.Controls; 17 | using System.Windows.Controls.Primitives; 18 | using System.Windows.Data; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Markup; 23 | using System.Windows.Media; 24 | using System.Windows.Media.Animation; 25 | using System.Windows.Media.Effects; 26 | using System.Windows.Media.Imaging; 27 | using System.Windows.Media.Media3D; 28 | using System.Windows.Media.TextFormatting; 29 | using System.Windows.Navigation; 30 | using System.Windows.Shapes; 31 | using System.Windows.Shell; 32 | 33 | 34 | namespace MyMediaPlayer.View { 35 | 36 | 37 | /// 38 | /// UserControlView 39 | /// 40 | public partial class UserControlView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 41 | 42 | private bool _contentLoaded; 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | if (_contentLoaded) { 51 | return; 52 | } 53 | _contentLoaded = true; 54 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/usercontrolview.xaml", System.UriKind.Relative); 55 | 56 | #line 1 "..\..\..\View\UserControlView.xaml" 57 | System.Windows.Application.LoadComponent(this, resourceLocater); 58 | 59 | #line default 60 | #line hidden 61 | } 62 | 63 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 65 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 66 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 69 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 70 | this._contentLoaded = true; 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/ViewModel/UserControl1.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\ViewModel\UserControl1.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "E21FEAB8C1312633FAA772FDDF4313C2" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using System; 13 | using System.Diagnostics; 14 | using System.Windows; 15 | using System.Windows.Automation; 16 | using System.Windows.Controls; 17 | using System.Windows.Controls.Primitives; 18 | using System.Windows.Data; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Markup; 23 | using System.Windows.Media; 24 | using System.Windows.Media.Animation; 25 | using System.Windows.Media.Effects; 26 | using System.Windows.Media.Imaging; 27 | using System.Windows.Media.Media3D; 28 | using System.Windows.Media.TextFormatting; 29 | using System.Windows.Navigation; 30 | using System.Windows.Shapes; 31 | using System.Windows.Shell; 32 | 33 | 34 | namespace MyMediaPlayer.ViewModel { 35 | 36 | 37 | /// 38 | /// UserControl1 39 | /// 40 | public partial class UserControl1 : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 41 | 42 | private bool _contentLoaded; 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | if (_contentLoaded) { 51 | return; 52 | } 53 | _contentLoaded = true; 54 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/viewmodel/usercontrol1.xaml", System.UriKind.Relative); 55 | 56 | #line 1 "..\..\..\ViewModel\UserControl1.xaml" 57 | System.Windows.Application.LoadComponent(this, resourceLocater); 58 | 59 | #line default 60 | #line hidden 61 | } 62 | 63 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 65 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 66 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 69 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 70 | this._contentLoaded = true; 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/UserControlViewModel.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\UserControlViewModel.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2CDF63BD5C315D05852185B325356AC1" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using System; 13 | using System.Diagnostics; 14 | using System.Windows; 15 | using System.Windows.Automation; 16 | using System.Windows.Controls; 17 | using System.Windows.Controls.Primitives; 18 | using System.Windows.Data; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Markup; 23 | using System.Windows.Media; 24 | using System.Windows.Media.Animation; 25 | using System.Windows.Media.Effects; 26 | using System.Windows.Media.Imaging; 27 | using System.Windows.Media.Media3D; 28 | using System.Windows.Media.TextFormatting; 29 | using System.Windows.Navigation; 30 | using System.Windows.Shapes; 31 | using System.Windows.Shell; 32 | 33 | 34 | namespace MyMediaPlayer.ViewModel { 35 | 36 | 37 | /// 38 | /// UserControlViewModel 39 | /// 40 | public partial class UserControlViewModel : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 41 | 42 | private bool _contentLoaded; 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | if (_contentLoaded) { 51 | return; 52 | } 53 | _contentLoaded = true; 54 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/usercontrolviewmodel.xaml", System.UriKind.Relative); 55 | 56 | #line 1 "..\..\..\View\UserControlViewModel.xaml" 57 | System.Windows.Application.LoadComponent(this, resourceLocater); 58 | 59 | #line default 60 | #line hidden 61 | } 62 | 63 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 65 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 66 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 69 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 70 | this._contentLoaded = true; 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/ViewModel/UserControlViewModel.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\ViewModel\UserControlViewModel.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2CDF63BD5C315D05852185B325356AC1" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using System; 13 | using System.Diagnostics; 14 | using System.Windows; 15 | using System.Windows.Automation; 16 | using System.Windows.Controls; 17 | using System.Windows.Controls.Primitives; 18 | using System.Windows.Data; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Markup; 23 | using System.Windows.Media; 24 | using System.Windows.Media.Animation; 25 | using System.Windows.Media.Effects; 26 | using System.Windows.Media.Imaging; 27 | using System.Windows.Media.Media3D; 28 | using System.Windows.Media.TextFormatting; 29 | using System.Windows.Navigation; 30 | using System.Windows.Shapes; 31 | using System.Windows.Shell; 32 | 33 | 34 | namespace MyMediaPlayer.ViewModel { 35 | 36 | 37 | /// 38 | /// UserControlViewModel 39 | /// 40 | public partial class UserControlViewModel : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 41 | 42 | private bool _contentLoaded; 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | if (_contentLoaded) { 51 | return; 52 | } 53 | _contentLoaded = true; 54 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/viewmodel/usercontrolviewmodel.xaml", System.UriKind.Relative); 55 | 56 | #line 1 "..\..\..\ViewModel\UserControlViewModel.xaml" 57 | System.Windows.Application.LoadComponent(this, resourceLocater); 58 | 59 | #line default 60 | #line hidden 61 | } 62 | 63 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 65 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 66 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 69 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 70 | this._contentLoaded = true; 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /MyMediaPlayer/Helper/MediaInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Controls; 7 | using System.Diagnostics; 8 | using System.IO; 9 | using TagLib; 10 | using System.Windows.Media.Imaging; 11 | 12 | namespace MyMediaPlayer.Helper 13 | { 14 | public class MediaInfo 15 | { 16 | public static String getDuration(String filepath) 17 | { 18 | try { 19 | TagLib.File file = TagLib.File.Create(filepath); 20 | return new DateTime(file.Properties.Duration.Ticks).ToString("mm:ss"); 21 | } 22 | catch (TagLib.UnsupportedFormatException e) { 23 | return null; 24 | } 25 | } 26 | 27 | public static String getAlbum(String filepath) 28 | { 29 | try { 30 | TagLib.File file = TagLib.File.Create(filepath); 31 | return file.Tag.Album; 32 | } 33 | catch (TagLib.UnsupportedFormatException e) { 34 | return null; 35 | } 36 | } 37 | 38 | public static String[] getArtists(String filepath) 39 | { 40 | try { 41 | TagLib.File file = TagLib.File.Create(filepath); 42 | return file.Tag.AlbumArtists; 43 | } 44 | catch (TagLib.UnsupportedFormatException e) { 45 | return null; 46 | } 47 | } 48 | 49 | public static String getCopyrigth(String filepath) 50 | { 51 | try { 52 | TagLib.File file = TagLib.File.Create(filepath); 53 | return file.Tag.Copyright; 54 | } 55 | catch (TagLib.UnsupportedFormatException e) { 56 | return null; 57 | } 58 | } 59 | 60 | public static String[] getGenres(String filepath) 61 | { 62 | try { 63 | TagLib.File file = TagLib.File.Create(filepath); 64 | return file.Tag.Genres; 65 | } 66 | catch (TagLib.UnsupportedFormatException e) { 67 | return null; 68 | } 69 | } 70 | 71 | public static BitmapImage getPictures(String filepath) 72 | { 73 | TagLib.File file = TagLib.File.Create(filepath); 74 | TagLib.IPicture pic = file.Tag.Pictures[0]; 75 | MemoryStream ms = new MemoryStream(pic.Data.Data); 76 | ms.Seek(0, SeekOrigin.Begin); 77 | BitmapImage bitmap = new BitmapImage(); 78 | bitmap.BeginInit(); 79 | bitmap.StreamSource = ms; 80 | bitmap.EndInit(); 81 | return bitmap; 82 | } 83 | 84 | public static String getTitle(String filepath) 85 | { 86 | try { 87 | TagLib.File file = TagLib.File.Create(filepath); 88 | return file.Tag.Title; 89 | } 90 | catch (TagLib.UnsupportedFormatException e) { 91 | return null; 92 | } 93 | } 94 | 95 | public static int getYear(String filepath) 96 | { 97 | try 98 | { 99 | TagLib.File file = TagLib.File.Create(filepath); 100 | return (int)file.Tag.Year; 101 | } 102 | catch (TagLib.UnsupportedFormatException e) { 103 | return (0); 104 | } 105 | } 106 | 107 | } 108 | 109 | } -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/MainWindow.g.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "5555B4340F8BA7B274EC2E32624BD6FB" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using MyMediaPlayer.View; 13 | using MyMediaPlayer.ViewModel; 14 | using System; 15 | using System.Diagnostics; 16 | using System.Windows; 17 | using System.Windows.Automation; 18 | using System.Windows.Controls; 19 | using System.Windows.Controls.Primitives; 20 | using System.Windows.Data; 21 | using System.Windows.Documents; 22 | using System.Windows.Ink; 23 | using System.Windows.Input; 24 | using System.Windows.Markup; 25 | using System.Windows.Media; 26 | using System.Windows.Media.Animation; 27 | using System.Windows.Media.Effects; 28 | using System.Windows.Media.Imaging; 29 | using System.Windows.Media.Media3D; 30 | using System.Windows.Media.TextFormatting; 31 | using System.Windows.Navigation; 32 | using System.Windows.Shapes; 33 | using System.Windows.Shell; 34 | 35 | 36 | namespace MyMediaPlayer.View { 37 | 38 | 39 | /// 40 | /// MainWindow 41 | /// 42 | public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { 43 | 44 | 45 | #line 7 "..\..\..\View\MainWindow.xaml" 46 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 47 | internal MyMediaPlayer.View.MainWindow myMediaPlayer; 48 | 49 | #line default 50 | #line hidden 51 | 52 | private bool _contentLoaded; 53 | 54 | /// 55 | /// InitializeComponent 56 | /// 57 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 58 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 59 | public void InitializeComponent() { 60 | if (_contentLoaded) { 61 | return; 62 | } 63 | _contentLoaded = true; 64 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/mainwindow.xaml", System.UriKind.Relative); 65 | 66 | #line 1 "..\..\..\View\MainWindow.xaml" 67 | System.Windows.Application.LoadComponent(this, resourceLocater); 68 | 69 | #line default 70 | #line hidden 71 | } 72 | 73 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 74 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 75 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 76 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 77 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 78 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 79 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 80 | switch (connectionId) 81 | { 82 | case 1: 83 | this.myMediaPlayer = ((MyMediaPlayer.View.MainWindow)(target)); 84 | return; 85 | } 86 | this._contentLoaded = true; 87 | } 88 | } 89 | } 90 | 91 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/MainWindow.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "5555B4340F8BA7B274EC2E32624BD6FB" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using MyMediaPlayer.View; 13 | using MyMediaPlayer.ViewModel; 14 | using System; 15 | using System.Diagnostics; 16 | using System.Windows; 17 | using System.Windows.Automation; 18 | using System.Windows.Controls; 19 | using System.Windows.Controls.Primitives; 20 | using System.Windows.Data; 21 | using System.Windows.Documents; 22 | using System.Windows.Ink; 23 | using System.Windows.Input; 24 | using System.Windows.Markup; 25 | using System.Windows.Media; 26 | using System.Windows.Media.Animation; 27 | using System.Windows.Media.Effects; 28 | using System.Windows.Media.Imaging; 29 | using System.Windows.Media.Media3D; 30 | using System.Windows.Media.TextFormatting; 31 | using System.Windows.Navigation; 32 | using System.Windows.Shapes; 33 | using System.Windows.Shell; 34 | 35 | 36 | namespace MyMediaPlayer.View { 37 | 38 | 39 | /// 40 | /// MainWindow 41 | /// 42 | public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { 43 | 44 | 45 | #line 7 "..\..\..\View\MainWindow.xaml" 46 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 47 | internal MyMediaPlayer.View.MainWindow myMediaPlayer; 48 | 49 | #line default 50 | #line hidden 51 | 52 | private bool _contentLoaded; 53 | 54 | /// 55 | /// InitializeComponent 56 | /// 57 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 58 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 59 | public void InitializeComponent() { 60 | if (_contentLoaded) { 61 | return; 62 | } 63 | _contentLoaded = true; 64 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/mainwindow.xaml", System.UriKind.Relative); 65 | 66 | #line 1 "..\..\..\View\MainWindow.xaml" 67 | System.Windows.Application.LoadComponent(this, resourceLocater); 68 | 69 | #line default 70 | #line hidden 71 | } 72 | 73 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 74 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 75 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 76 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 77 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 78 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 79 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 80 | switch (connectionId) 81 | { 82 | case 1: 83 | this.myMediaPlayer = ((MyMediaPlayer.View.MainWindow)(target)); 84 | return; 85 | } 86 | this._contentLoaded = true; 87 | } 88 | } 89 | } 90 | 91 | -------------------------------------------------------------------------------- /MyMediaPlayer/Model/MediaModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Xml; 7 | using System.Xml.Serialization; 8 | namespace MyMediaPlayer.Model 9 | { 10 | public class MediaModel : BaseModel 11 | { 12 | public MediaModel() 13 | { 14 | this.Path = null; 15 | } 16 | 17 | public MediaModel(Uri _path) 18 | { 19 | this.Path = _path; 20 | } 21 | 22 | private Uri path; 23 | public Uri Path 24 | { 25 | get { return path; } 26 | set 27 | { 28 | path = value; 29 | RaisePropertyChanged("Path"); 30 | } 31 | } 32 | 33 | private string title; 34 | public string Title 35 | { 36 | get { return title; } 37 | set 38 | { 39 | title = value; 40 | RaisePropertyChanged("Title"); 41 | } 42 | } 43 | 44 | private string duration; 45 | public string Duration 46 | { 47 | get { return duration; } 48 | set 49 | { 50 | duration = value; 51 | RaisePropertyChanged("Duration"); 52 | } 53 | } 54 | 55 | private string album; 56 | public string Album 57 | { 58 | get { return album; } 59 | set 60 | { 61 | album = value; 62 | RaisePropertyChanged("Album"); 63 | } 64 | } 65 | 66 | private string genres; 67 | public string Genres 68 | { 69 | get { return genres; } 70 | set 71 | { 72 | genres = value; 73 | RaisePropertyChanged("Genres"); 74 | } 75 | } 76 | 77 | private string artists; 78 | public string Artists 79 | { 80 | get { return artists; } 81 | set 82 | { 83 | artists = value; 84 | RaisePropertyChanged("Artists"); 85 | } 86 | } 87 | 88 | public MediaModelSerializer getSerializer() 89 | { 90 | MediaModelSerializer ret = new MediaModelSerializer(); 91 | 92 | ret.album = this.album; 93 | ret.artists = this.artists; 94 | ret.duration = this.duration; 95 | ret.path = this.path.ToString(); 96 | ret.title = this.title; 97 | ret.genres = this.genres; 98 | return ret; 99 | } 100 | } 101 | [Serializable] 102 | public class MediaModelSerializer 103 | { 104 | public MediaModelSerializer() 105 | { 106 | this.path = ""; 107 | this.title = ""; 108 | this.duration = ""; 109 | this.album = ""; 110 | this.genres = ""; 111 | this.artists = ""; 112 | } 113 | public string path { get; set; } 114 | public string title { get; set; } 115 | public string duration { get; set; } 116 | public string album { get; set; } 117 | public string genres { get; set; } 118 | public string artists { get; set; } 119 | public MediaModel getDeSerializer() 120 | { 121 | MediaModel ret = new MediaModel(); 122 | 123 | ret.Album = this.album; 124 | ret.Artists = this.artists; 125 | ret.Duration = this.duration; 126 | ret.Path = new Uri(this.path); 127 | ret.Title = this.title; 128 | ret.Genres = this.genres; 129 | return ret; 130 | } 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /MyMediaPlayer/View/MediaPlayerView.xaml.cs: -------------------------------------------------------------------------------- 1 | using MyMediaPlayer.ViewModel; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Timers; 9 | using System.Windows; 10 | using System.Windows.Controls; 11 | using System.Windows.Controls.Primitives; 12 | using System.Windows.Data; 13 | using System.Windows.Documents; 14 | using System.Windows.Input; 15 | using System.Windows.Media; 16 | using System.Windows.Media.Imaging; 17 | using System.Windows.Navigation; 18 | using System.Windows.Shapes; 19 | using System.Windows.Threading; 20 | 21 | namespace MyMediaPlayer.View 22 | { 23 | public partial class MediaPlayerView : UserControl 24 | { 25 | private DispatcherTimer timer = new DispatcherTimer(); 26 | private bool isDragging = false; 27 | 28 | void ticks(object sender, EventArgs e) 29 | { 30 | if (isDragging == false) 31 | this.timelineSlider.Value = this.myMediaElem.Position.TotalMilliseconds; 32 | } 33 | 34 | private void start() 35 | { 36 | this.myMediaElem.Play(); 37 | this.timer.Start(); 38 | } 39 | 40 | private void MouseOver(object sender, MouseEventArgs e) 41 | { 42 | if (this.Cursor != Cursors.Wait) 43 | Mouse.OverrideCursor = Cursors.Hand; 44 | (sender as Button).Foreground = new SolidColorBrush(Colors.White); 45 | } 46 | 47 | private void MouseLeave(object sender, MouseEventArgs e) 48 | { 49 | if (this.Cursor != Cursors.Wait) 50 | Mouse.OverrideCursor = Cursors.Arrow; 51 | (sender as Button).Foreground = new SolidColorBrush(Color.FromRgb(167, 170, 172)); 52 | } 53 | 54 | private void LoadEvents(object sender, RoutedEventArgs e) 55 | { 56 | var dataContext = myMediaElem.DataContext as MediaPlayerViewModel; 57 | dataContext.PlayEvent += (_sender, _e) => 58 | { 59 | this.start(); 60 | }; 61 | dataContext.PauseEvent += (_sender, _e) => { this.myMediaElem.Pause(); this.timer.Stop(); }; 62 | dataContext.StopEvent += (_sender, _e) => { this.myMediaElem.Stop(); }; 63 | } 64 | 65 | private void Element_MediaOpened(object sender, EventArgs e) 66 | { 67 | if (this.myMediaElem.NaturalDuration.HasTimeSpan) 68 | this.timelineSlider.Maximum = myMediaElem.NaturalDuration.TimeSpan.TotalMilliseconds; 69 | else 70 | this.timelineSlider.Maximum = 0; 71 | } 72 | 73 | private void Element_MediaEnded(object sender, EventArgs e) 74 | { 75 | ((MediaPlayerViewModel)this.DataContext).Next(EventArgs.Empty); 76 | } 77 | 78 | private void SeekToMediaPosition(object sender, MouseButtonEventArgs e) 79 | { 80 | myMediaElem.Position = TimeSpan.FromMilliseconds(timelineSlider.Value); 81 | this.isDragging = false; 82 | } 83 | 84 | private void DragStart(object sender, DragStartedEventArgs e) 85 | { 86 | this.isDragging = true; 87 | this.myMediaElem.Pause(); 88 | } 89 | 90 | private void DragEnd(object sender, DragCompletedEventArgs e) 91 | { 92 | this.isDragging = false; 93 | myMediaElem.Position = TimeSpan.FromMilliseconds(timelineSlider.Value); 94 | this.myMediaElem.Play(); 95 | } 96 | 97 | public MediaPlayerView() 98 | { 99 | InitializeComponent(); 100 | this.timer.Interval = TimeSpan.FromMilliseconds(1000); 101 | this.timer.Tick += new EventHandler(ticks); 102 | } 103 | 104 | private void MuteUnmute(object sender, RoutedEventArgs e) 105 | { 106 | this.myMediaElem.IsMuted = (this.myMediaElem.IsMuted) ? false : true; 107 | } 108 | 109 | private void Grid_Drop(object sender, DragEventArgs e) 110 | { 111 | string[] filePaths = e.Data.GetData(DataFormats.FileDrop, true) as string[]; 112 | ((MediaPlayerViewModel)this.DataContext).createPlaylistByDragAndDrop(filePaths); 113 | this.start(); 114 | } 115 | 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /MyMediaPlayer/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /MyMediaPlayer/MyMediaPlayer.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {2CF024A1-A0E6-479A-A40B-6DE5989D5B2D} 8 | WinExe 9 | Properties 10 | MyMediaPlayer 11 | MyMediaPlayer 12 | v4.5 13 | 512 14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15 | 4 16 | 17 | 18 | AnyCPU 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | AnyCPU 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | 36 | 37 | 38 | 39 | ..\..\..\..\Downloads\Microsoft.WindowsAPICodePack.dll 40 | 41 | 42 | ..\..\..\..\Downloads\Microsoft.WindowsAPICodePack.Shell.dll 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 4.0 54 | 55 | 56 | ..\taglib-sharp.dll 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | MSBuild:Compile 65 | Designer 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | MediaPlayerView.xaml 81 | 82 | 83 | LibraryView.xaml 84 | 85 | 86 | PlaylistView.xaml 87 | 88 | 89 | MSBuild:Compile 90 | Designer 91 | 92 | 93 | App.xaml 94 | Code 95 | 96 | 97 | MainWindow.xaml 98 | Code 99 | 100 | 101 | Designer 102 | MSBuild:Compile 103 | 104 | 105 | Designer 106 | MSBuild:Compile 107 | 108 | 109 | Designer 110 | MSBuild:Compile 111 | 112 | 113 | 114 | 115 | Code 116 | 117 | 118 | True 119 | True 120 | Resources.resx 121 | 122 | 123 | True 124 | Settings.settings 125 | True 126 | 127 | 128 | ResXFileCodeGenerator 129 | Resources.Designer.cs 130 | 131 | 132 | SettingsSingleFileGenerator 133 | Settings.Designer.cs 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 161 | -------------------------------------------------------------------------------- /MyMediaPlayer/ViewModel/MediaPlayerViewModel.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Win32; 2 | using MyMediaPlayer.Model; 3 | using MyMediaPlayer.Helper; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Controls; 10 | using System.Windows; 11 | using System.Collections.ObjectModel; 12 | 13 | namespace MyMediaPlayer.ViewModel 14 | { 15 | public class MediaPlayerViewModel : BaseViewModel 16 | { 17 | private MediaPlayerModel mediaPlayer = new MediaPlayerModel(); 18 | private ObservableCollection playlist = new ObservableCollection(); 19 | private int currentMedia; 20 | public ObservableCollection Playlist { get { return playlist; } } 21 | public Uri SourceUri 22 | { 23 | get { return this.mediaPlayer.Source; } 24 | set 25 | { 26 | this.mediaPlayer.Source = value; 27 | RaisePropertyChanged("SourceUri"); 28 | } 29 | } 30 | 31 | public String IsPlaying { 32 | get { return mediaPlayer.IsPlaying ? "../Img/pause.PNG" : "../Img/play.PNG"; } 33 | set 34 | { 35 | if (value == "PAUSE") 36 | mediaPlayer.IsPlaying = true; 37 | else 38 | mediaPlayer.IsPlaying = false; 39 | RaisePropertyChanged("IsPlaying"); 40 | } 41 | } 42 | 43 | public String IsMute 44 | { 45 | get { return mediaPlayer.IsMute ? "../Img/mute.PNG" : "../Img/unmute.PNG"; } 46 | } 47 | 48 | public bool setIsMute 49 | { 50 | set 51 | { 52 | this.mediaPlayer.IsMute = value; 53 | RaisePropertyChanged("IsMute"); 54 | } 55 | } 56 | 57 | public double Volume 58 | { 59 | get { return this.mediaPlayer.Volume; } 60 | set 61 | { 62 | this.mediaPlayer.Volume = value; 63 | RaisePropertyChanged("Volume"); 64 | } 65 | } 66 | 67 | public string PositionTime 68 | { 69 | get 70 | { 71 | var time = TimeSpan.FromMilliseconds(this.mediaPlayer.PositionTime); 72 | return time.ToString(@"hh\:mm\:ss"); 73 | } 74 | } 75 | 76 | public double setPositionTime 77 | { 78 | set 79 | { 80 | this.mediaPlayer.PositionTime = value; 81 | RaisePropertyChanged("PositionTime"); 82 | } 83 | } 84 | 85 | public string TotalTime 86 | { 87 | get 88 | { 89 | var time = TimeSpan.FromMilliseconds(this.mediaPlayer.TotalTime); 90 | return time.ToString(@"hh\:mm\:ss"); 91 | } 92 | } 93 | 94 | public double setTotalTime 95 | { 96 | set 97 | { 98 | this.mediaPlayer.TotalTime = value; 99 | RaisePropertyChanged("TotalTime"); 100 | } 101 | } 102 | 103 | public event EventHandler PlayEvent; 104 | public event EventHandler PauseEvent; 105 | public event EventHandler StopEvent; 106 | 107 | public RelayCommand BrowseCommand { get; set; } 108 | public RelayCommand PlayPauseCommand { get; set; } 109 | public RelayCommand StopCommand { get; set; } 110 | public RelayCommand MuteUnmuteCommand { get; set; } 111 | public RelayCommand NextCommand { get; set; } 112 | public RelayCommand PreviousCommand { get; set; } 113 | void Browse(object param) 114 | { 115 | OpenFileDialog dialog = new OpenFileDialog(); 116 | dialog.AddExtension = true; 117 | dialog.DefaultExt = "*.*"; 118 | dialog.Filter = "Media(*.*)|*.*"; 119 | bool? dialogResult = dialog.ShowDialog(); 120 | if (dialogResult.Value && dialogResult.HasValue) 121 | { 122 | this.playlist.Clear(); 123 | this.playlist.Add(new MediaModel(new Uri(dialog.FileName))); 124 | this.currentMedia = 0; 125 | this.ChangeSource(this.playlist[this.currentMedia].Path); 126 | } 127 | } 128 | 129 | public void ChangeSource(Uri value) 130 | { 131 | this.SourceUri = value; 132 | this.Play(); 133 | } 134 | 135 | public void PlayPause(object param) 136 | { 137 | if (mediaPlayer.IsPlaying == true) 138 | this.Pause(); 139 | else 140 | this.Play(); 141 | } 142 | 143 | public void Play() 144 | { 145 | if (this.SourceUri == null) 146 | return; 147 | this.IsPlaying = "PAUSE"; 148 | this.PlayEvent(this, EventArgs.Empty); 149 | } 150 | 151 | public void Pause() 152 | { 153 | this.IsPlaying = "PLAY"; 154 | this.PauseEvent(this, EventArgs.Empty); 155 | } 156 | 157 | public void Stop(object param) 158 | { 159 | this.IsPlaying = "PLAY"; 160 | this.StopEvent(this, EventArgs.Empty); 161 | } 162 | public void MuteUnmute(object param) 163 | { 164 | this.setIsMute = (this.mediaPlayer.IsMute) ? false : true; 165 | } 166 | 167 | public void Next(object param) 168 | { 169 | this.currentMedia = (this.playlist.Count - 1 > this.currentMedia) ? this.currentMedia + 1 : 0; 170 | if (this.playlist.Count > 0) 171 | this.SourceUri = this.playlist[this.currentMedia].Path; 172 | } 173 | 174 | public void Previous(object param) 175 | { 176 | this.currentMedia = (this.currentMedia > 0) ? this.currentMedia - 1 : this.playlist.Count - 1; 177 | if (this.playlist.Count > 0) 178 | this.SourceUri = this.playlist[this.currentMedia].Path; 179 | } 180 | 181 | public void replacePlaylist(ObservableCollection newPlaylist, int newCurrentMedia) 182 | { 183 | ObservableCollectionHelpers.Replace(this.playlist, newPlaylist); 184 | this.currentMedia = newCurrentMedia; 185 | this.SourceUri = this.playlist[this.currentMedia].Path; 186 | this.IsPlaying = "PLAY"; 187 | } 188 | 189 | public void createPlaylistByDragAndDrop(string[] filesPaths) 190 | { 191 | ObservableCollection DragDropPlaylist = new ObservableCollection(); 192 | foreach (String filePath in filesPaths) 193 | DragDropPlaylist.Add(new MediaModel(new Uri(filePath))); 194 | this.replacePlaylist(DragDropPlaylist, 0); 195 | } 196 | 197 | public MediaPlayerViewModel() 198 | { 199 | BrowseCommand = new RelayCommand(Browse); 200 | PlayPauseCommand = new RelayCommand(PlayPause); 201 | StopCommand = new RelayCommand(Stop); 202 | NextCommand = new RelayCommand(Next); 203 | PreviousCommand = new RelayCommand(Previous); 204 | MuteUnmuteCommand = new RelayCommand(MuteUnmute); 205 | this.Volume = 0.5; 206 | } 207 | } 208 | } 209 | -------------------------------------------------------------------------------- /MyMediaPlayer/ViewModel/LibraryViewModel.cs: -------------------------------------------------------------------------------- 1 | using MyMediaPlayer.Helper; 2 | using MyMediaPlayer.Model; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Collections.ObjectModel; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | 11 | namespace MyMediaPlayer.ViewModel 12 | { 13 | public class LibraryViewModel : BaseViewModel 14 | { 15 | public enum FolderType { Video, Music, Picture }; 16 | public FolderType actualType; 17 | public ObservableCollection musicFolder { get; set; } 18 | public ObservableCollection pictureFolder { get; set; } 19 | public ObservableCollection videoFolder { get; set; } 20 | public ObservableCollection currentFolder { get; set; } 21 | public RelayCommand ChangeFolderCommand { get; set; } 22 | public RelayCommand SortByTitleCommand { get; set; } 23 | public RelayCommand SortByDurationCommand { get; set; } 24 | public RelayCommand SortByGenresCommand { get; set; } 25 | public RelayCommand SortByAlbumCommand { get; set; } 26 | public RelayCommand SortByArtistsCommand { get; set; } 27 | 28 | private String searchText; 29 | public String SearchText 30 | { 31 | get { return searchText; } 32 | set 33 | { 34 | searchText = value; 35 | RaisePropertyChanged("SearchText"); 36 | this.SortBySearch(); 37 | } 38 | } 39 | 40 | public void ChangeFolder(object param) 41 | { 42 | if (FolderType.Video == (FolderType)param) 43 | ObservableCollectionHelpers.Replace(this.currentFolder, this.videoFolder); 44 | else if (FolderType.Music == (FolderType)param) 45 | ObservableCollectionHelpers.Replace(this.currentFolder, this.musicFolder); 46 | else 47 | ObservableCollectionHelpers.Replace(this.currentFolder, this.pictureFolder); 48 | actualType = (FolderType)param; 49 | } 50 | 51 | public void FillMediaInfos(MediaModel media, String path) 52 | { 53 | media.Title = Path.GetFileNameWithoutExtension(path); 54 | media.Duration = MediaInfo.getDuration(path); 55 | media.Album = MediaInfo.getAlbum(path); 56 | String[] List = MediaInfo.getGenres(path); 57 | if (List != null) 58 | foreach (String Genre in List) 59 | media.Genres += Genre; 60 | List = MediaInfo.getArtists(path); 61 | if (List != null) 62 | foreach (String Artist in List) 63 | media.Artists += Artist; 64 | } 65 | 66 | private void ScanFolders() 67 | { 68 | // Scan Music folder and add musics files to list 69 | string pathFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic); 70 | foreach (string file in Directory.EnumerateFiles(pathFolder) 71 | .Where(s => s.EndsWith(".mp3") || s.EndsWith(".flac") || s.EndsWith(".cda") || s.EndsWith(".wpl") 72 | || s.EndsWith(".wav") || s.EndsWith(".aac") || s.EndsWith(".ogg") 73 | || s.EndsWith(".wma") || s.EndsWith(".mid") || s.EndsWith(".ra"))) 74 | { 75 | MediaModel newMedia = new MediaModel(new Uri(file)); 76 | this.FillMediaInfos(newMedia, file); 77 | musicFolder.Add(newMedia); 78 | } 79 | 80 | // Scan Picture folder and add pictures files to list 81 | pathFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures); 82 | foreach (string file in Directory.EnumerateFiles(pathFolder) 83 | .Where(s => s.EndsWith(".png") || s.EndsWith(".jpg") || s.EndsWith(".bmp") || s.EndsWith(".gif"))) 84 | { 85 | MediaModel newMedia = new MediaModel(new Uri(file)); 86 | newMedia.Title = Path.GetFileNameWithoutExtension(file); 87 | pictureFolder.Add(newMedia); 88 | } 89 | 90 | // Scan Video folder and add videos files to list 91 | pathFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyVideos); 92 | foreach (string file in Directory.EnumerateFiles(pathFolder) 93 | .Where(s => s.EndsWith(".mpg") || s.EndsWith(".mpeg") || s.EndsWith(".mp4") || s.EndsWith(".avi") || s.EndsWith(".mpeg") 94 | || s.EndsWith(".wmv"))) 95 | { 96 | MediaModel newMedia = new MediaModel(new Uri(file)); 97 | this.FillMediaInfos(newMedia, file); 98 | videoFolder.Add(newMedia); 99 | } 100 | } 101 | 102 | public void SortBySearch() 103 | { 104 | List tmp = new List(); 105 | ObservableCollection toCompare; 106 | if (actualType == FolderType.Video) 107 | toCompare = videoFolder; 108 | else if (actualType == FolderType.Music) 109 | toCompare = musicFolder; 110 | else 111 | toCompare = pictureFolder; 112 | foreach (MediaModel media in toCompare) 113 | if (media.Title != null && media.Title.Contains(SearchText)) 114 | tmp.Add(media); 115 | this.currentFolder.Clear(); 116 | foreach (MediaModel elem in tmp) 117 | this.currentFolder.Add(elem); 118 | } 119 | 120 | public void SortByTitle(object param) 121 | { 122 | List tmp = new List(); 123 | var request = from elem in this.currentFolder orderby elem.Title select elem; 124 | foreach (MediaModel elem in request) 125 | tmp.Add(elem); 126 | this.currentFolder.Clear(); 127 | foreach (MediaModel elem in tmp) 128 | this.currentFolder.Add(elem); 129 | } 130 | 131 | public void SortByGenres(object param) 132 | { 133 | List tmp = new List(); 134 | var request = from elem in this.currentFolder orderby elem.Genres select elem; 135 | foreach (MediaModel elem in request) 136 | tmp.Add(elem); 137 | this.currentFolder.Clear(); 138 | foreach (MediaModel elem in tmp) 139 | this.currentFolder.Add(elem); 140 | } 141 | 142 | public void SortByAlbum(object param) 143 | { 144 | List tmp = new List(); 145 | var request = from elem in this.currentFolder orderby elem.Album select elem; 146 | foreach (MediaModel elem in request) 147 | tmp.Add(elem); 148 | this.currentFolder.Clear(); 149 | foreach (MediaModel elem in tmp) 150 | this.currentFolder.Add(elem); 151 | } 152 | 153 | public void SortByArtists(object param) 154 | { 155 | List tmp = new List(); 156 | var request = from elem in this.currentFolder orderby elem.Artists select elem; 157 | foreach (MediaModel elem in request) 158 | tmp.Add(elem); 159 | this.currentFolder.Clear(); 160 | foreach (MediaModel elem in tmp) 161 | this.currentFolder.Add(elem); 162 | } 163 | 164 | public void SortByDuration(object param) 165 | { 166 | List tmp = new List(); 167 | var request = from elem in this.currentFolder orderby elem.Duration select elem; 168 | foreach (MediaModel elem in request) 169 | tmp.Add(elem); 170 | this.currentFolder.Clear(); 171 | foreach (MediaModel elem in tmp) 172 | this.currentFolder.Add(elem); 173 | } 174 | 175 | public LibraryViewModel() 176 | { 177 | actualType = FolderType.Video; 178 | musicFolder = new ObservableCollection(); 179 | pictureFolder = new ObservableCollection(); 180 | videoFolder = new ObservableCollection(); 181 | currentFolder = new ObservableCollection(); 182 | ChangeFolderCommand = new RelayCommand(ChangeFolder); 183 | SortByTitleCommand = new RelayCommand(SortByTitle); 184 | SortByDurationCommand = new RelayCommand(SortByDuration); 185 | SortByAlbumCommand = new RelayCommand(SortByAlbum); 186 | SortByArtistsCommand = new RelayCommand(SortByArtists); 187 | SortByGenresCommand = new RelayCommand(SortByGenres); 188 | ScanFolders(); 189 | ObservableCollectionHelpers.Replace(this.currentFolder, this.videoFolder); 190 | } 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/LibraryView.g.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\LibraryView.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "29155D938190A2DE028DFFF5F3B62E14" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using MyMediaPlayer.ViewModel; 13 | using System; 14 | using System.Diagnostics; 15 | using System.Windows; 16 | using System.Windows.Automation; 17 | using System.Windows.Controls; 18 | using System.Windows.Controls.Primitives; 19 | using System.Windows.Data; 20 | using System.Windows.Documents; 21 | using System.Windows.Ink; 22 | using System.Windows.Input; 23 | using System.Windows.Markup; 24 | using System.Windows.Media; 25 | using System.Windows.Media.Animation; 26 | using System.Windows.Media.Effects; 27 | using System.Windows.Media.Imaging; 28 | using System.Windows.Media.Media3D; 29 | using System.Windows.Media.TextFormatting; 30 | using System.Windows.Navigation; 31 | using System.Windows.Shapes; 32 | using System.Windows.Shell; 33 | 34 | 35 | namespace MyMediaPlayer.View { 36 | 37 | 38 | /// 39 | /// LibraryView 40 | /// 41 | public partial class LibraryView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 42 | 43 | 44 | #line 21 "..\..\..\View\LibraryView.xaml" 45 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 46 | internal System.Windows.Controls.Button library; 47 | 48 | #line default 49 | #line hidden 50 | 51 | 52 | #line 28 "..\..\..\View\LibraryView.xaml" 53 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 54 | internal System.Windows.Controls.Button playlist; 55 | 56 | #line default 57 | #line hidden 58 | 59 | 60 | #line 35 "..\..\..\View\LibraryView.xaml" 61 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 62 | internal System.Windows.Controls.Button mediaPlayer; 63 | 64 | #line default 65 | #line hidden 66 | 67 | 68 | #line 44 "..\..\..\View\LibraryView.xaml" 69 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 70 | internal System.Windows.Controls.ListView listMedias; 71 | 72 | #line default 73 | #line hidden 74 | 75 | private bool _contentLoaded; 76 | 77 | /// 78 | /// InitializeComponent 79 | /// 80 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 81 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 82 | public void InitializeComponent() { 83 | if (_contentLoaded) { 84 | return; 85 | } 86 | _contentLoaded = true; 87 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/libraryview.xaml", System.UriKind.Relative); 88 | 89 | #line 1 "..\..\..\View\LibraryView.xaml" 90 | System.Windows.Application.LoadComponent(this, resourceLocater); 91 | 92 | #line default 93 | #line hidden 94 | } 95 | 96 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 97 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 98 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 99 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 100 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 101 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 102 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 103 | switch (connectionId) 104 | { 105 | case 1: 106 | this.library = ((System.Windows.Controls.Button)(target)); 107 | 108 | #line 21 "..\..\..\View\LibraryView.xaml" 109 | this.library.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 110 | 111 | #line default 112 | #line hidden 113 | 114 | #line 21 "..\..\..\View\LibraryView.xaml" 115 | this.library.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 116 | 117 | #line default 118 | #line hidden 119 | return; 120 | case 2: 121 | this.playlist = ((System.Windows.Controls.Button)(target)); 122 | 123 | #line 28 "..\..\..\View\LibraryView.xaml" 124 | this.playlist.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 125 | 126 | #line default 127 | #line hidden 128 | 129 | #line 28 "..\..\..\View\LibraryView.xaml" 130 | this.playlist.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 131 | 132 | #line default 133 | #line hidden 134 | return; 135 | case 3: 136 | this.mediaPlayer = ((System.Windows.Controls.Button)(target)); 137 | 138 | #line 35 "..\..\..\View\LibraryView.xaml" 139 | this.mediaPlayer.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 140 | 141 | #line default 142 | #line hidden 143 | 144 | #line 35 "..\..\..\View\LibraryView.xaml" 145 | this.mediaPlayer.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 146 | 147 | #line default 148 | #line hidden 149 | return; 150 | case 4: 151 | this.listMedias = ((System.Windows.Controls.ListView)(target)); 152 | return; 153 | case 5: 154 | 155 | #line 80 "..\..\..\View\LibraryView.xaml" 156 | ((System.Windows.Controls.Button)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 157 | 158 | #line default 159 | #line hidden 160 | 161 | #line 80 "..\..\..\View\LibraryView.xaml" 162 | ((System.Windows.Controls.Button)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 163 | 164 | #line default 165 | #line hidden 166 | return; 167 | case 6: 168 | 169 | #line 87 "..\..\..\View\LibraryView.xaml" 170 | ((System.Windows.Controls.Button)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 171 | 172 | #line default 173 | #line hidden 174 | 175 | #line 87 "..\..\..\View\LibraryView.xaml" 176 | ((System.Windows.Controls.Button)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 177 | 178 | #line default 179 | #line hidden 180 | return; 181 | case 7: 182 | 183 | #line 94 "..\..\..\View\LibraryView.xaml" 184 | ((System.Windows.Controls.Button)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 185 | 186 | #line default 187 | #line hidden 188 | 189 | #line 94 "..\..\..\View\LibraryView.xaml" 190 | ((System.Windows.Controls.Button)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 191 | 192 | #line default 193 | #line hidden 194 | return; 195 | case 8: 196 | 197 | #line 117 "..\..\..\View\LibraryView.xaml" 198 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 199 | 200 | #line default 201 | #line hidden 202 | 203 | #line 117 "..\..\..\View\LibraryView.xaml" 204 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 205 | 206 | #line default 207 | #line hidden 208 | return; 209 | } 210 | this._contentLoaded = true; 211 | } 212 | } 213 | } 214 | 215 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/LibraryView.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\LibraryView.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "29155D938190A2DE028DFFF5F3B62E14" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using MyMediaPlayer.ViewModel; 13 | using System; 14 | using System.Diagnostics; 15 | using System.Windows; 16 | using System.Windows.Automation; 17 | using System.Windows.Controls; 18 | using System.Windows.Controls.Primitives; 19 | using System.Windows.Data; 20 | using System.Windows.Documents; 21 | using System.Windows.Ink; 22 | using System.Windows.Input; 23 | using System.Windows.Markup; 24 | using System.Windows.Media; 25 | using System.Windows.Media.Animation; 26 | using System.Windows.Media.Effects; 27 | using System.Windows.Media.Imaging; 28 | using System.Windows.Media.Media3D; 29 | using System.Windows.Media.TextFormatting; 30 | using System.Windows.Navigation; 31 | using System.Windows.Shapes; 32 | using System.Windows.Shell; 33 | 34 | 35 | namespace MyMediaPlayer.View { 36 | 37 | 38 | /// 39 | /// LibraryView 40 | /// 41 | public partial class LibraryView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 42 | 43 | 44 | #line 21 "..\..\..\View\LibraryView.xaml" 45 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 46 | internal System.Windows.Controls.Button library; 47 | 48 | #line default 49 | #line hidden 50 | 51 | 52 | #line 28 "..\..\..\View\LibraryView.xaml" 53 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 54 | internal System.Windows.Controls.Button playlist; 55 | 56 | #line default 57 | #line hidden 58 | 59 | 60 | #line 35 "..\..\..\View\LibraryView.xaml" 61 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 62 | internal System.Windows.Controls.Button mediaPlayer; 63 | 64 | #line default 65 | #line hidden 66 | 67 | 68 | #line 44 "..\..\..\View\LibraryView.xaml" 69 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 70 | internal System.Windows.Controls.ListView listMedias; 71 | 72 | #line default 73 | #line hidden 74 | 75 | private bool _contentLoaded; 76 | 77 | /// 78 | /// InitializeComponent 79 | /// 80 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 81 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 82 | public void InitializeComponent() { 83 | if (_contentLoaded) { 84 | return; 85 | } 86 | _contentLoaded = true; 87 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/libraryview.xaml", System.UriKind.Relative); 88 | 89 | #line 1 "..\..\..\View\LibraryView.xaml" 90 | System.Windows.Application.LoadComponent(this, resourceLocater); 91 | 92 | #line default 93 | #line hidden 94 | } 95 | 96 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 97 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 98 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 99 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 100 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 101 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 102 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 103 | switch (connectionId) 104 | { 105 | case 1: 106 | this.library = ((System.Windows.Controls.Button)(target)); 107 | 108 | #line 21 "..\..\..\View\LibraryView.xaml" 109 | this.library.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 110 | 111 | #line default 112 | #line hidden 113 | 114 | #line 21 "..\..\..\View\LibraryView.xaml" 115 | this.library.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 116 | 117 | #line default 118 | #line hidden 119 | return; 120 | case 2: 121 | this.playlist = ((System.Windows.Controls.Button)(target)); 122 | 123 | #line 28 "..\..\..\View\LibraryView.xaml" 124 | this.playlist.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 125 | 126 | #line default 127 | #line hidden 128 | 129 | #line 28 "..\..\..\View\LibraryView.xaml" 130 | this.playlist.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 131 | 132 | #line default 133 | #line hidden 134 | return; 135 | case 3: 136 | this.mediaPlayer = ((System.Windows.Controls.Button)(target)); 137 | 138 | #line 35 "..\..\..\View\LibraryView.xaml" 139 | this.mediaPlayer.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 140 | 141 | #line default 142 | #line hidden 143 | 144 | #line 35 "..\..\..\View\LibraryView.xaml" 145 | this.mediaPlayer.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 146 | 147 | #line default 148 | #line hidden 149 | return; 150 | case 4: 151 | this.listMedias = ((System.Windows.Controls.ListView)(target)); 152 | return; 153 | case 5: 154 | 155 | #line 80 "..\..\..\View\LibraryView.xaml" 156 | ((System.Windows.Controls.Button)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 157 | 158 | #line default 159 | #line hidden 160 | 161 | #line 80 "..\..\..\View\LibraryView.xaml" 162 | ((System.Windows.Controls.Button)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 163 | 164 | #line default 165 | #line hidden 166 | return; 167 | case 6: 168 | 169 | #line 87 "..\..\..\View\LibraryView.xaml" 170 | ((System.Windows.Controls.Button)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 171 | 172 | #line default 173 | #line hidden 174 | 175 | #line 87 "..\..\..\View\LibraryView.xaml" 176 | ((System.Windows.Controls.Button)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 177 | 178 | #line default 179 | #line hidden 180 | return; 181 | case 7: 182 | 183 | #line 94 "..\..\..\View\LibraryView.xaml" 184 | ((System.Windows.Controls.Button)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 185 | 186 | #line default 187 | #line hidden 188 | 189 | #line 94 "..\..\..\View\LibraryView.xaml" 190 | ((System.Windows.Controls.Button)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 191 | 192 | #line default 193 | #line hidden 194 | return; 195 | case 8: 196 | 197 | #line 117 "..\..\..\View\LibraryView.xaml" 198 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 199 | 200 | #line default 201 | #line hidden 202 | 203 | #line 117 "..\..\..\View\LibraryView.xaml" 204 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 205 | 206 | #line default 207 | #line hidden 208 | return; 209 | } 210 | this._contentLoaded = true; 211 | } 212 | } 213 | } 214 | 215 | -------------------------------------------------------------------------------- /MyMediaPlayer/ViewModel/PlaylistViewModel.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Win32; 2 | using MyMediaPlayer.Helper; 3 | using MyMediaPlayer.Model; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.ObjectModel; 7 | using System.IO; 8 | using System.Linq; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | using System.Xml; 12 | using System.Xml.Serialization; 13 | 14 | namespace MyMediaPlayer.ViewModel 15 | { 16 | public class PlaylistViewModel : BaseViewModel 17 | { 18 | public ObservableCollection listPlaylist { get; set; } 19 | public ObservableCollection currentPlaylist { get; set; } 20 | public PlaylistModel selectedPlaylist { get; set; } 21 | 22 | private string playlistName; 23 | public string PlaylistName 24 | { 25 | get { return playlistName; } 26 | set 27 | { 28 | playlistName = value; 29 | RaisePropertyChanged("PlaylistName"); 30 | } 31 | } 32 | public RelayCommand AddPlaylistCommand { get; set; } 33 | public RelayCommand AddMediaCommand { get; set; } 34 | public RelayCommand DeleteMediaCommand { get; set; } 35 | public RelayCommand DeletePlaylistCommand { get; set; } 36 | public RelayCommand SortByTitleCommand { get; set; } 37 | public RelayCommand SortByDurationCommand { get; set; } 38 | public RelayCommand SortByGenresCommand { get; set; } 39 | public RelayCommand SortByAlbumCommand { get; set; } 40 | public RelayCommand SortByArtistsCommand { get; set; } 41 | 42 | public void AddPlaylist(object param) 43 | { 44 | if (this.PlaylistName != "") 45 | this.listPlaylist.Add(new PlaylistModel(this.PlaylistName, new ObservableCollection())); 46 | this.PlaylistName = ""; 47 | } 48 | 49 | public void FillMediaInfos(MediaModel media, String path) 50 | { 51 | media.Title = Path.GetFileNameWithoutExtension(path); 52 | media.Duration = MediaInfo.getDuration(path); 53 | media.Album = MediaInfo.getAlbum(path); 54 | String[] List = MediaInfo.getGenres(path); 55 | if (List != null) 56 | foreach (String Genre in List) 57 | media.Genres += Genre; 58 | List = MediaInfo.getArtists(path); 59 | if (List != null) 60 | foreach (String Artist in List) 61 | media.Artists += Artist; 62 | } 63 | 64 | public void InsertFileListToPlaylist(String[] files) 65 | { 66 | if (this.selectedPlaylist != null) 67 | foreach (String file in files) 68 | { 69 | if (Directory.Exists(file) == false) 70 | { 71 | MediaModel newMedia = new MediaModel(new Uri(file)); 72 | this.FillMediaInfos(newMedia, file); 73 | this.currentPlaylist.Add(newMedia); 74 | this.selectedPlaylist.ListMedias.Add(newMedia); 75 | } 76 | } 77 | } 78 | 79 | public void AddMedia(object param) 80 | { 81 | if (this.selectedPlaylist == null) 82 | return; 83 | OpenFileDialog dialog = new OpenFileDialog(); 84 | dialog.AddExtension = true; 85 | dialog.Multiselect = true; 86 | dialog.DefaultExt = "*.*"; 87 | dialog.Filter = "Media(*.*)|*.*"; 88 | bool? dialogResult = dialog.ShowDialog(); 89 | if (dialogResult.Value && dialogResult.HasValue) 90 | this.InsertFileListToPlaylist(dialog.FileNames); 91 | } 92 | 93 | public void DeleteMedia(object param) 94 | { 95 | var items = (param as ObservableCollection).Cast().ToList(); 96 | foreach (MediaModel elem in items) 97 | for (int i = 0; i < currentPlaylist.Count; i++) 98 | if (currentPlaylist[i] == elem) 99 | { 100 | this.selectedPlaylist.ListMedias.RemoveAt(i); 101 | currentPlaylist.RemoveAt(i); 102 | } 103 | } 104 | 105 | public void DeletePlaylist(object param) 106 | { 107 | var items = (param as ObservableCollection).Cast().ToList(); 108 | foreach (PlaylistModel elem in items) 109 | for (int i = 0; i < listPlaylist.Count; i++) 110 | if (listPlaylist[i] == elem) 111 | listPlaylist.RemoveAt(i); 112 | } 113 | 114 | public void SortByTitle(object param) 115 | { 116 | List tmp = new List(); 117 | var request = from elem in this.currentPlaylist orderby elem.Title select elem; 118 | foreach (MediaModel elem in request) 119 | tmp.Add(elem); 120 | this.currentPlaylist.Clear(); 121 | foreach (MediaModel elem in tmp) 122 | this.currentPlaylist.Add(elem); 123 | } 124 | 125 | public void SortByGenres(object param) 126 | { 127 | List tmp = new List(); 128 | var request = from elem in this.currentPlaylist orderby elem.Genres select elem; 129 | foreach (MediaModel elem in request) 130 | tmp.Add(elem); 131 | this.currentPlaylist.Clear(); 132 | foreach (MediaModel elem in tmp) 133 | this.currentPlaylist.Add(elem); 134 | } 135 | 136 | public void SortByAlbum(object param) 137 | { 138 | List tmp = new List(); 139 | var request = from elem in this.currentPlaylist orderby elem.Album select elem; 140 | foreach (MediaModel elem in request) 141 | tmp.Add(elem); 142 | this.currentPlaylist.Clear(); 143 | foreach (MediaModel elem in tmp) 144 | this.currentPlaylist.Add(elem); 145 | } 146 | 147 | public void SortByArtists(object param) 148 | { 149 | List tmp = new List(); 150 | var request = from elem in this.currentPlaylist orderby elem.Artists select elem; 151 | foreach (MediaModel elem in request) 152 | tmp.Add(elem); 153 | this.currentPlaylist.Clear(); 154 | foreach (MediaModel elem in tmp) 155 | this.currentPlaylist.Add(elem); 156 | } 157 | 158 | public void SortByDuration(object param) 159 | { 160 | List tmp = new List(); 161 | var request = from elem in this.currentPlaylist orderby elem.Duration select elem; 162 | foreach (MediaModel elem in request) 163 | tmp.Add(elem); 164 | this.currentPlaylist.Clear(); 165 | foreach (MediaModel elem in tmp) 166 | this.currentPlaylist.Add(elem); 167 | } 168 | 169 | public void ExportPlayList() 170 | { 171 | try 172 | { 173 | Collection toSerialize = new Collection(); 174 | XmlSerializer writer = new XmlSerializer(typeof(Collection)); 175 | 176 | foreach (PlaylistModel playlist in listPlaylist) 177 | toSerialize.Add(playlist.getSerializer()); 178 | using (Stream fileStream = File.Open("PlayList.xml", FileMode.Create)) 179 | writer.Serialize(fileStream, toSerialize); 180 | } 181 | catch (Exception) 182 | { 183 | return; 184 | } 185 | } 186 | public void ImportPlayList() 187 | { 188 | try 189 | { 190 | XmlSerializer deserialize = new XmlSerializer(typeof(Collection)); 191 | TextReader reader = new StreamReader("PlayList.xml"); 192 | object obj = deserialize.Deserialize(reader); 193 | Collection toDeSerialize = (Collection)obj; 194 | listPlaylist.Clear(); 195 | 196 | foreach (PlaylistModelSerializer playlist in toDeSerialize) 197 | listPlaylist.Add(playlist.getDeSerializer()); 198 | } 199 | catch (Exception) 200 | { 201 | return; 202 | } 203 | } 204 | 205 | public PlaylistViewModel() 206 | { 207 | this.playlistName = ""; 208 | this.listPlaylist = new ObservableCollection(); 209 | this.currentPlaylist = new ObservableCollection(); 210 | AddPlaylistCommand = new RelayCommand(AddPlaylist); 211 | AddMediaCommand = new RelayCommand(AddMedia); 212 | DeleteMediaCommand = new RelayCommand(DeleteMedia); 213 | DeletePlaylistCommand = new RelayCommand(DeletePlaylist); 214 | SortByTitleCommand = new RelayCommand(SortByTitle); 215 | SortByDurationCommand = new RelayCommand(SortByDuration); 216 | SortByAlbumCommand = new RelayCommand(SortByAlbum); 217 | SortByArtistsCommand = new RelayCommand(SortByArtists); 218 | SortByGenresCommand = new RelayCommand(SortByGenres); 219 | } 220 | } 221 | } 222 | -------------------------------------------------------------------------------- /MyMediaPlayer/View/LibraryView.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 35 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 50 | 51 | 52 | 54 | 55 | 56 | 58 | 59 | 60 | 62 | 63 | 64 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 87 | 94 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | PLAY IT ! 119 | 129 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /MyMediaPlayer/View/MediaPlayerView.xaml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 31 | 39 | 47 | 55 | 56 | 64 | 65 | 66 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 112 | 119 | 126 | 127 | 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/PlaylistView.g.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\PlaylistView.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "3869C3C7564191E35E2F5B59754D9717" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using MyMediaPlayer.ViewModel; 13 | using System; 14 | using System.Diagnostics; 15 | using System.Windows; 16 | using System.Windows.Automation; 17 | using System.Windows.Controls; 18 | using System.Windows.Controls.Primitives; 19 | using System.Windows.Data; 20 | using System.Windows.Documents; 21 | using System.Windows.Ink; 22 | using System.Windows.Input; 23 | using System.Windows.Markup; 24 | using System.Windows.Media; 25 | using System.Windows.Media.Animation; 26 | using System.Windows.Media.Effects; 27 | using System.Windows.Media.Imaging; 28 | using System.Windows.Media.Media3D; 29 | using System.Windows.Media.TextFormatting; 30 | using System.Windows.Navigation; 31 | using System.Windows.Shapes; 32 | using System.Windows.Shell; 33 | 34 | 35 | namespace MyMediaPlayer.View { 36 | 37 | 38 | /// 39 | /// PlaylistView 40 | /// 41 | public partial class PlaylistView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 42 | 43 | 44 | #line 26 "..\..\..\View\PlaylistView.xaml" 45 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 46 | internal System.Windows.Controls.Button library; 47 | 48 | #line default 49 | #line hidden 50 | 51 | 52 | #line 33 "..\..\..\View\PlaylistView.xaml" 53 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 54 | internal System.Windows.Controls.Button playlist; 55 | 56 | #line default 57 | #line hidden 58 | 59 | 60 | #line 40 "..\..\..\View\PlaylistView.xaml" 61 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 62 | internal System.Windows.Controls.Button mediaPlayer; 63 | 64 | #line default 65 | #line hidden 66 | 67 | 68 | #line 49 "..\..\..\View\PlaylistView.xaml" 69 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 70 | internal System.Windows.Controls.ListView listMedias; 71 | 72 | #line default 73 | #line hidden 74 | 75 | 76 | #line 146 "..\..\..\View\PlaylistView.xaml" 77 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 78 | internal System.Windows.Controls.ListView listPlaylist; 79 | 80 | #line default 81 | #line hidden 82 | 83 | private bool _contentLoaded; 84 | 85 | /// 86 | /// InitializeComponent 87 | /// 88 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 89 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 90 | public void InitializeComponent() { 91 | if (_contentLoaded) { 92 | return; 93 | } 94 | _contentLoaded = true; 95 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/playlistview.xaml", System.UriKind.Relative); 96 | 97 | #line 1 "..\..\..\View\PlaylistView.xaml" 98 | System.Windows.Application.LoadComponent(this, resourceLocater); 99 | 100 | #line default 101 | #line hidden 102 | } 103 | 104 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 105 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 106 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 107 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 108 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 109 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 110 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 111 | switch (connectionId) 112 | { 113 | case 1: 114 | this.library = ((System.Windows.Controls.Button)(target)); 115 | 116 | #line 26 "..\..\..\View\PlaylistView.xaml" 117 | this.library.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 118 | 119 | #line default 120 | #line hidden 121 | 122 | #line 26 "..\..\..\View\PlaylistView.xaml" 123 | this.library.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 124 | 125 | #line default 126 | #line hidden 127 | return; 128 | case 2: 129 | this.playlist = ((System.Windows.Controls.Button)(target)); 130 | 131 | #line 33 "..\..\..\View\PlaylistView.xaml" 132 | this.playlist.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 133 | 134 | #line default 135 | #line hidden 136 | 137 | #line 33 "..\..\..\View\PlaylistView.xaml" 138 | this.playlist.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 139 | 140 | #line default 141 | #line hidden 142 | return; 143 | case 3: 144 | this.mediaPlayer = ((System.Windows.Controls.Button)(target)); 145 | 146 | #line 40 "..\..\..\View\PlaylistView.xaml" 147 | this.mediaPlayer.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 148 | 149 | #line default 150 | #line hidden 151 | 152 | #line 40 "..\..\..\View\PlaylistView.xaml" 153 | this.mediaPlayer.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 154 | 155 | #line default 156 | #line hidden 157 | return; 158 | case 4: 159 | this.listMedias = ((System.Windows.Controls.ListView)(target)); 160 | 161 | #line 49 "..\..\..\View\PlaylistView.xaml" 162 | this.listMedias.Drop += new System.Windows.DragEventHandler(this.listMedias_Drop); 163 | 164 | #line default 165 | #line hidden 166 | return; 167 | case 5: 168 | 169 | #line 81 "..\..\..\View\PlaylistView.xaml" 170 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 171 | 172 | #line default 173 | #line hidden 174 | 175 | #line 81 "..\..\..\View\PlaylistView.xaml" 176 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 177 | 178 | #line default 179 | #line hidden 180 | return; 181 | case 6: 182 | 183 | #line 91 "..\..\..\View\PlaylistView.xaml" 184 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 185 | 186 | #line default 187 | #line hidden 188 | 189 | #line 91 "..\..\..\View\PlaylistView.xaml" 190 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 191 | 192 | #line default 193 | #line hidden 194 | return; 195 | case 7: 196 | 197 | #line 105 "..\..\..\View\PlaylistView.xaml" 198 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 199 | 200 | #line default 201 | #line hidden 202 | 203 | #line 105 "..\..\..\View\PlaylistView.xaml" 204 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 205 | 206 | #line default 207 | #line hidden 208 | return; 209 | case 8: 210 | 211 | #line 116 "..\..\..\View\PlaylistView.xaml" 212 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 213 | 214 | #line default 215 | #line hidden 216 | 217 | #line 116 "..\..\..\View\PlaylistView.xaml" 218 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 219 | 220 | #line default 221 | #line hidden 222 | return; 223 | case 9: 224 | 225 | #line 134 "..\..\..\View\PlaylistView.xaml" 226 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 227 | 228 | #line default 229 | #line hidden 230 | 231 | #line 134 "..\..\..\View\PlaylistView.xaml" 232 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 233 | 234 | #line default 235 | #line hidden 236 | return; 237 | case 10: 238 | this.listPlaylist = ((System.Windows.Controls.ListView)(target)); 239 | 240 | #line 146 "..\..\..\View\PlaylistView.xaml" 241 | this.listPlaylist.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ListView_SelectionChanged); 242 | 243 | #line default 244 | #line hidden 245 | return; 246 | case 11: 247 | 248 | #line 162 "..\..\..\View\PlaylistView.xaml" 249 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 250 | 251 | #line default 252 | #line hidden 253 | 254 | #line 162 "..\..\..\View\PlaylistView.xaml" 255 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 256 | 257 | #line default 258 | #line hidden 259 | return; 260 | } 261 | this._contentLoaded = true; 262 | } 263 | } 264 | } 265 | 266 | -------------------------------------------------------------------------------- /MyMediaPlayer/obj/Debug/View/PlaylistView.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\View\PlaylistView.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "3869C3C7564191E35E2F5B59754D9717" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // Ce code a été généré par un outil. 5 | // Version du runtime :4.0.30319.18444 6 | // 7 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 8 | // le code est régénéré. 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using MyMediaPlayer.ViewModel; 13 | using System; 14 | using System.Diagnostics; 15 | using System.Windows; 16 | using System.Windows.Automation; 17 | using System.Windows.Controls; 18 | using System.Windows.Controls.Primitives; 19 | using System.Windows.Data; 20 | using System.Windows.Documents; 21 | using System.Windows.Ink; 22 | using System.Windows.Input; 23 | using System.Windows.Markup; 24 | using System.Windows.Media; 25 | using System.Windows.Media.Animation; 26 | using System.Windows.Media.Effects; 27 | using System.Windows.Media.Imaging; 28 | using System.Windows.Media.Media3D; 29 | using System.Windows.Media.TextFormatting; 30 | using System.Windows.Navigation; 31 | using System.Windows.Shapes; 32 | using System.Windows.Shell; 33 | 34 | 35 | namespace MyMediaPlayer.View { 36 | 37 | 38 | /// 39 | /// PlaylistView 40 | /// 41 | public partial class PlaylistView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 42 | 43 | 44 | #line 26 "..\..\..\View\PlaylistView.xaml" 45 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 46 | internal System.Windows.Controls.Button library; 47 | 48 | #line default 49 | #line hidden 50 | 51 | 52 | #line 33 "..\..\..\View\PlaylistView.xaml" 53 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 54 | internal System.Windows.Controls.Button playlist; 55 | 56 | #line default 57 | #line hidden 58 | 59 | 60 | #line 40 "..\..\..\View\PlaylistView.xaml" 61 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 62 | internal System.Windows.Controls.Button mediaPlayer; 63 | 64 | #line default 65 | #line hidden 66 | 67 | 68 | #line 49 "..\..\..\View\PlaylistView.xaml" 69 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 70 | internal System.Windows.Controls.ListView listMedias; 71 | 72 | #line default 73 | #line hidden 74 | 75 | 76 | #line 146 "..\..\..\View\PlaylistView.xaml" 77 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] 78 | internal System.Windows.Controls.ListView listPlaylist; 79 | 80 | #line default 81 | #line hidden 82 | 83 | private bool _contentLoaded; 84 | 85 | /// 86 | /// InitializeComponent 87 | /// 88 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 89 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 90 | public void InitializeComponent() { 91 | if (_contentLoaded) { 92 | return; 93 | } 94 | _contentLoaded = true; 95 | System.Uri resourceLocater = new System.Uri("/MyMediaPlayer;component/view/playlistview.xaml", System.UriKind.Relative); 96 | 97 | #line 1 "..\..\..\View\PlaylistView.xaml" 98 | System.Windows.Application.LoadComponent(this, resourceLocater); 99 | 100 | #line default 101 | #line hidden 102 | } 103 | 104 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 105 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 106 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 107 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 108 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 109 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 110 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 111 | switch (connectionId) 112 | { 113 | case 1: 114 | this.library = ((System.Windows.Controls.Button)(target)); 115 | 116 | #line 26 "..\..\..\View\PlaylistView.xaml" 117 | this.library.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 118 | 119 | #line default 120 | #line hidden 121 | 122 | #line 26 "..\..\..\View\PlaylistView.xaml" 123 | this.library.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 124 | 125 | #line default 126 | #line hidden 127 | return; 128 | case 2: 129 | this.playlist = ((System.Windows.Controls.Button)(target)); 130 | 131 | #line 33 "..\..\..\View\PlaylistView.xaml" 132 | this.playlist.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 133 | 134 | #line default 135 | #line hidden 136 | 137 | #line 33 "..\..\..\View\PlaylistView.xaml" 138 | this.playlist.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 139 | 140 | #line default 141 | #line hidden 142 | return; 143 | case 3: 144 | this.mediaPlayer = ((System.Windows.Controls.Button)(target)); 145 | 146 | #line 40 "..\..\..\View\PlaylistView.xaml" 147 | this.mediaPlayer.MouseEnter += new System.Windows.Input.MouseEventHandler(this.MouseOver); 148 | 149 | #line default 150 | #line hidden 151 | 152 | #line 40 "..\..\..\View\PlaylistView.xaml" 153 | this.mediaPlayer.MouseLeave += new System.Windows.Input.MouseEventHandler(this.MouseLeave); 154 | 155 | #line default 156 | #line hidden 157 | return; 158 | case 4: 159 | this.listMedias = ((System.Windows.Controls.ListView)(target)); 160 | 161 | #line 49 "..\..\..\View\PlaylistView.xaml" 162 | this.listMedias.Drop += new System.Windows.DragEventHandler(this.listMedias_Drop); 163 | 164 | #line default 165 | #line hidden 166 | return; 167 | case 5: 168 | 169 | #line 81 "..\..\..\View\PlaylistView.xaml" 170 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 171 | 172 | #line default 173 | #line hidden 174 | 175 | #line 81 "..\..\..\View\PlaylistView.xaml" 176 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 177 | 178 | #line default 179 | #line hidden 180 | return; 181 | case 6: 182 | 183 | #line 91 "..\..\..\View\PlaylistView.xaml" 184 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 185 | 186 | #line default 187 | #line hidden 188 | 189 | #line 91 "..\..\..\View\PlaylistView.xaml" 190 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 191 | 192 | #line default 193 | #line hidden 194 | return; 195 | case 7: 196 | 197 | #line 105 "..\..\..\View\PlaylistView.xaml" 198 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 199 | 200 | #line default 201 | #line hidden 202 | 203 | #line 105 "..\..\..\View\PlaylistView.xaml" 204 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 205 | 206 | #line default 207 | #line hidden 208 | return; 209 | case 8: 210 | 211 | #line 116 "..\..\..\View\PlaylistView.xaml" 212 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 213 | 214 | #line default 215 | #line hidden 216 | 217 | #line 116 "..\..\..\View\PlaylistView.xaml" 218 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 219 | 220 | #line default 221 | #line hidden 222 | return; 223 | case 9: 224 | 225 | #line 134 "..\..\..\View\PlaylistView.xaml" 226 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 227 | 228 | #line default 229 | #line hidden 230 | 231 | #line 134 "..\..\..\View\PlaylistView.xaml" 232 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 233 | 234 | #line default 235 | #line hidden 236 | return; 237 | case 10: 238 | this.listPlaylist = ((System.Windows.Controls.ListView)(target)); 239 | 240 | #line 146 "..\..\..\View\PlaylistView.xaml" 241 | this.listPlaylist.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ListView_SelectionChanged); 242 | 243 | #line default 244 | #line hidden 245 | return; 246 | case 11: 247 | 248 | #line 162 "..\..\..\View\PlaylistView.xaml" 249 | ((System.Windows.Controls.Grid)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.buttonOver); 250 | 251 | #line default 252 | #line hidden 253 | 254 | #line 162 "..\..\..\View\PlaylistView.xaml" 255 | ((System.Windows.Controls.Grid)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.buttonLeave); 256 | 257 | #line default 258 | #line hidden 259 | return; 260 | } 261 | this._contentLoaded = true; 262 | } 263 | } 264 | } 265 | 266 | --------------------------------------------------------------------------------