diff --git a/src/PlaylistManager/Logic/PlaylistViewModel.cs b/src/PlaylistManager/Logic/PlaylistViewModel.cs index 56bfc62..eac402f 100644 --- a/src/PlaylistManager/Logic/PlaylistViewModel.cs +++ b/src/PlaylistManager/Logic/PlaylistViewModel.cs @@ -27,7 +27,7 @@ public PlaylistViewModel(string header, string infotext) Header = header; InfoText = infotext; playlistPath = $"{PlaylistPaths.MainFolder}\\{Header}{PlaylistPaths.PlaylistEnding}"; - PlaylistEntries = new ObservableCollection(); + PlaylistEntries = new ObservableCollection(LoadPlaylist()); PlaylistEntries.CollectionChanged += PlaylistEntries_CollectionChanged; } @@ -37,14 +37,6 @@ public PlaylistViewModel(string header, string infotext) public ObservableCollection PlaylistEntries { get; private set; } - public void OnLoad() - { - foreach (var item in LoadPlaylist()) - { - PlaylistEntries.Add(item); - } - } - public void DoubleClick(object sender, MouseButtonEventArgs e) { if (sender is PlaylistItem item) diff --git a/src/PlaylistManager/Logic/ViewModel.cs b/src/PlaylistManager/Logic/ViewModel.cs index ed3f48c..3befa1b 100644 --- a/src/PlaylistManager/Logic/ViewModel.cs +++ b/src/PlaylistManager/Logic/ViewModel.cs @@ -16,6 +16,7 @@ public class ViewModel : INotifyPropertyChanged public event MessageBoxRaiseHandler OnMessageBoxRaise; private bool areInformationsVisible; + private bool isStylePickerVisible; private int selectedContainer; public ViewModel(List containers) @@ -23,6 +24,7 @@ public ViewModel(List containers) Containers = new ObservableCollection(containers); OpenWikiLinkCmd = new ActionCommand(x => Process.Start("https://wiki.guildwars2.com/wiki/Customized_soundtrack")); ShowMoreInformationsCmd = new ActionCommand(x => AreInformationsVisible = true); + ShowStyleChangeCmd = new ActionCommand(x => IsStylePickerVisible = true); Directory.CreateDirectory(PlaylistPaths.MainFolder); foreach (var container in containers) @@ -35,6 +37,8 @@ public ViewModel(List containers) public ICommand ShowMoreInformationsCmd { get; set; } + public ICommand ShowStyleChangeCmd { get; set; } + public ObservableCollection Containers { get; private set; } public int SelectedContainer @@ -57,6 +61,16 @@ public bool AreInformationsVisible } } + public bool IsStylePickerVisible + { + get { return isStylePickerVisible; } + set + { + isStylePickerVisible = value; + NotifyPropertyChanged(nameof(IsStylePickerVisible)); + } + } + protected void NotifyPropertyChanged(string prop) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(prop)); diff --git a/src/PlaylistManager/PlaylistManager.csproj b/src/PlaylistManager/PlaylistManager.csproj index 886b117..dd41c91 100644 --- a/src/PlaylistManager/PlaylistManager.csproj +++ b/src/PlaylistManager/PlaylistManager.csproj @@ -37,7 +37,7 @@ 4 - Ressources\02.ico + Resources\02.ico @@ -127,10 +127,13 @@ - + - + + + + diff --git a/src/PlaylistManager/Properties/AssemblyInfo.cs b/src/PlaylistManager/Properties/AssemblyInfo.cs index 06e1980..7020fd2 100644 --- a/src/PlaylistManager/Properties/AssemblyInfo.cs +++ b/src/PlaylistManager/Properties/AssemblyInfo.cs @@ -13,8 +13,8 @@ [assembly: AssemblyCopyright("Copyright © Dreanor 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("1.2.1")] -[assembly: AssemblyFileVersion("1.2.1")] +[assembly: AssemblyVersion("1.2.2")] +[assembly: AssemblyFileVersion("1.2.2")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. diff --git a/src/PlaylistManager/UI/App.xaml b/src/PlaylistManager/UI/App.xaml index e7520d8..7cc9d55 100644 --- a/src/PlaylistManager/UI/App.xaml +++ b/src/PlaylistManager/UI/App.xaml @@ -3,6 +3,15 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Startup="Application_Startup"> - + + + + + + + + + + diff --git a/src/PlaylistManager/UI/PlaylistView.xaml b/src/PlaylistManager/UI/PlaylistView.xaml index ada21b4..f502daa 100644 --- a/src/PlaylistManager/UI/PlaylistView.xaml +++ b/src/PlaylistManager/UI/PlaylistView.xaml @@ -4,20 +4,8 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" - Loaded="UserControl_Loaded" d:DesignHeight="300" d:DesignWidth="300"> - - - - - - - - - - - - + - - - - - - - - - - - +