Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
8ca4360101
commit
1d37853346
@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KaraokePlayer", "KaraokePla
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CdgPlayer", "CdgPlayer\CdgPlayer.csproj", "{A5324295-6BD2-4415-92CD-6EA77D708E00}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Herse.Models", "..\herse.models\Herse.Models.csproj", "{BDE9BC7B-DB3D-4A28-9902-B5D8D1965E5C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -31,6 +33,10 @@ Global
|
||||
{A5324295-6BD2-4415-92CD-6EA77D708E00}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A5324295-6BD2-4415-92CD-6EA77D708E00}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A5324295-6BD2-4415-92CD-6EA77D708E00}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BDE9BC7B-DB3D-4A28-9902-B5D8D1965E5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BDE9BC7B-DB3D-4A28-9902-B5D8D1965E5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BDE9BC7B-DB3D-4A28-9902-B5D8D1965E5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BDE9BC7B-DB3D-4A28-9902-B5D8D1965E5C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@ -34,10 +34,6 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="MaterialSkin, Version=0.0.3.3, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>lib\MaterialSkin.dll</HintPath>
|
||||
@ -45,6 +41,7 @@
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing.Design" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@ -398,6 +395,10 @@
|
||||
<Folder Include="lib\presets\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\herse.models\Herse.Models.csproj">
|
||||
<Project>{bde9bc7b-db3d-4a28-9902-b5d8d1965e5c}</Project>
|
||||
<Name>Herse.Models</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\CdgPlayer\CdgPlayer.csproj">
|
||||
<Project>{a5324295-6bd2-4415-92cd-6ea77d708e00}</Project>
|
||||
<Name>CdgPlayer</Name>
|
||||
@ -407,6 +408,11 @@
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>XCOPY "$(ProjectDir)lib" "$(TargetDir)lib\" /S /y /c</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
|
||||
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
|
||||
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
|
||||
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
@ -5,13 +5,13 @@ using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using Herse.Models;
|
||||
namespace KaraokePlayer
|
||||
{
|
||||
public partial class MainForm : MaterialForm
|
||||
{
|
||||
private readonly MaterialSkinManager _materialSkinManager;
|
||||
private List<FileInfo> _fileList;
|
||||
private List<Song> _fileList;
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
@ -36,9 +36,10 @@ namespace KaraokePlayer
|
||||
{
|
||||
var files = GetFiles(browseDialog.SelectedPath, "*.cdg|*.mp4", searchOption: System.IO.SearchOption.AllDirectories);
|
||||
var filtered = files.Where(f => f.Length < 248).ToList();
|
||||
_fileList = filtered.Select(file => new FileInfo(file)).ToList();
|
||||
|
||||
_fileList = filtered.Select(file => new Song(file)).ToList();
|
||||
materialListBox1.DataSource = _fileList;
|
||||
materialListBox1.DisplayMember = "Name";
|
||||
materialListBox1.DisplayMember = "FileName";
|
||||
|
||||
}
|
||||
}
|
||||
@ -55,7 +56,7 @@ namespace KaraokePlayer
|
||||
private void materialSingleLineTextField1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
materialListBox1.DataSource = _fileList.Where(
|
||||
file => Regex.IsMatch(file.Name, materialSingleLineTextField1.Text, RegexOptions.IgnoreCase)).ToList();
|
||||
file => Regex.IsMatch(file.FullPath, materialSingleLineTextField1.Text, RegexOptions.IgnoreCase)).ToList();
|
||||
}
|
||||
|
||||
public static string[] GetFiles(string path, string searchPattern, SearchOption searchOption)
|
||||
@ -70,16 +71,16 @@ namespace KaraokePlayer
|
||||
|
||||
public void playSelectedFile()
|
||||
{
|
||||
FileInfo file = (FileInfo)materialListBox1.SelectedItem;
|
||||
Song file = (Song)materialListBox1.SelectedItem;
|
||||
if (file.Extension.ToLower() == ".cdg")
|
||||
{
|
||||
karaokeCDGPlayer.Play(new Uri(Path.ChangeExtension(file.FullName, ".mp3")));
|
||||
karaokeCDGPlayer.Play(new Uri(Path.ChangeExtension(file.FullPath, ".mp3")));
|
||||
karaokeCDGPlayer.Visible = true;
|
||||
karaokeMP4Player.Visible = false;
|
||||
karaokeMP4Player.Stop();
|
||||
}
|
||||
else {
|
||||
karaokeMP4Player.Play(new Uri(file.FullName));
|
||||
karaokeMP4Player.Play(new Uri(file.FullPath));
|
||||
karaokeMP4Player.Visible = true;
|
||||
karaokeCDGPlayer.Visible = false;
|
||||
karaokeCDGPlayer.Stop();
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="SharpZipLib" version="0.86.0" targetFramework="net46" />
|
||||
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net46" />
|
||||
<package id="Microsoft.Bcl.Compression" version="3.9.85" targetFramework="net46" />
|
||||
</packages>
|
||||
Loading…
Reference in New Issue
Block a user