Upgrade to FMP Core Ver. 2.0.1, library system

This commit is contained in:
Royce551 2020-07-27 18:19:57 -05:00
parent 7707fbeea5
commit a09c587617
7 changed files with 88 additions and 2 deletions

View file

@ -97,6 +97,10 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Pages\Library\LibraryPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\NotificationPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@ -111,6 +115,9 @@
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Pages\Library\LibraryPage.xaml.cs">
<DependentUpon>LibraryPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\NotificationPage.xaml.cs">
<DependentUpon>NotificationPage.xaml</DependentUpon>
</Compile>

View file

@ -11,7 +11,7 @@
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Background"
<DoubleAnimation Storyboard.TargetName="BackgroundPanel"
Storyboard.TargetProperty="Opacity"
From="0"
To="1.0" Duration="0:0:.25"
@ -21,7 +21,7 @@
</EventTrigger>
</UserControl.Triggers>
<Grid>
<Grid x:Name="Background" Background="#FF2C2F33">
<Grid x:Name="BackgroundPanel" Background="#FF2C2F33">
<Grid.RowDefinitions>
<RowDefinition Height="27"/>
<RowDefinition/>

View file

@ -5,6 +5,22 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="FRESHMusicPlayer 8 Development" Height="512" Width="702" Closed="Window_Closed" PreviewKeyDown="Window_PreviewKeyDown" DragOver="Window_DragOver" Drop="Window_Drop" AllowDrop="True">
<Window.Resources>
<Storyboard x:Key="SlideIn">
<DoubleAnimation
Storyboard.TargetName="RightFrame"
Storyboard.TargetProperty="Width"
From="0" To="235" Duration="0:0:.15"
/>
</Storyboard>
<Storyboard x:Key="SlideOut">
<DoubleAnimation
Storyboard.TargetName="RightFrame"
Storyboard.TargetProperty="Width"
To="0" Duration="0:0:.15"
/>
</Storyboard>
</Window.Resources>
<DockPanel Background="#FF0C6C08">
<!--Menu-->
<DockPanel x:Name="MainBar" Height="25" DockPanel.Dock="Top" Background="#FF141517" >

View file

@ -16,6 +16,9 @@ using System.Runtime.CompilerServices;
using FRESHMusicPlayer.Handlers.Notifications;
using System.Threading;
using System.Windows.Threading;
using System.Windows.Media.Animation;
using System.Windows.Documents;
using System.Collections.Generic;
namespace FRESHMusicPlayer
{
@ -36,6 +39,7 @@ namespace FRESHMusicPlayer
// TODO: i dunno how to pass this to the pages, if there is a way to i can avoid making this static
public static Player Player = new Player();
public static NotificationHandler NotificationHandler = new NotificationHandler();
public static List<string> Library = new List<string>();
public static bool MiniPlayerMode = false;
public MainWindow()
{
@ -48,6 +52,7 @@ namespace FRESHMusicPlayer
Interval = 1000
};
progressTimer.Tick += ProgressTimer_Tick;
Library = DatabaseHandler.ReadSongs();
}
@ -97,14 +102,17 @@ namespace FRESHMusicPlayer
public void ShowAuxilliaryPane(string Uri)
{
RightFrame.Visibility = Visibility.Visible;
if (FindResource("SlideIn") is Storyboard sb) BeginStoryboard(sb);
RightFrame.Source = new Uri(Uri, UriKind.Relative);
RightFrame.NavigationService.RemoveBackEntry();
}
public void HideAuxilliaryPane()
{
if (FindResource("SlideOut") is Storyboard sb) BeginStoryboard(sb);
RightFrame.Visibility = Visibility.Collapsed;
RightFrame.Source = null;
}
#region Tabs
private void ChangeTabs(SelectedMenus tab)
{
@ -302,5 +310,7 @@ namespace FRESHMusicPlayer
});
Player.PlayMusic();
}
}
}

View file

@ -0,0 +1,25 @@
<Page x:Class="FRESHMusicPlayer_WPF_UI_Test.Pages.Library.LibraryPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FRESHMusicPlayer_WPF_UI_Test.Pages.Library"
mc:Ignorable="d"
d:DesignHeight="372" d:DesignWidth="694"
Title="LibraryPage">
<Grid Background="#FF5D5D5D">
<Grid.RowDefinitions>
<RowDefinition Height="8*"/>
<RowDefinition Height="23*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=".5" MinWidth="353"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel x:Name="CategoryPanel" Margin="0,1,0,0" Background="#FF69B578" Grid.RowSpan="2"/>
<StackPanel Grid.Column="1" Margin="0" Grid.Row="1" Background="#FF338BC1"/>
<Grid Grid.Column="1" Margin="0" Background="#FFD5463F"/>
</Grid>
</Page>

View file

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace FRESHMusicPlayer_WPF_UI_Test.Pages.Library
{
/// <summary>
/// Interaction logic for LibraryPage.xaml
/// </summary>
public partial class LibraryPage : Page
{
public LibraryPage()
{
InitializeComponent();
}
}
}