Skip to content

Commit

Permalink
update 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Milkitic committed Feb 24, 2019
1 parent ca82cd2 commit 9efa87d
Show file tree
Hide file tree
Showing 46 changed files with 122 additions and 14 deletions.
Binary file added OsuPlayer.Wpf/Default/blank.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/default.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/drum-hitclap.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/drum-hitfinish.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/drum-hitnormal.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/drum-hitwhistle.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/drum-sliderslide.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/drum-slidertick.wav
Binary file not shown.
Empty file.
Binary file added OsuPlayer.Wpf/Default/normal-hitclap.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/normal-hitfinish.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/normal-hitnormal.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/normal-hitwhistle.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/normal-sliderslide.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/normal-slidertick.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/normal-sliderwhistle.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/soft-hitclap.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/soft-hitfinish.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/soft-hitnormal.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/soft-hitwhistle.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/soft-sliderslide.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/soft-slidertick.wav
Binary file not shown.
Binary file added OsuPlayer.Wpf/Default/soft-sliderwhistle.wav
Binary file not shown.
4 changes: 2 additions & 2 deletions OsuPlayer.Wpf/Domain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ internal static class Domain
public static string LyricCachePath => Path.Combine(CachePath, "_Lyric");

public static string DefaultPath => Path.Combine(CurrentPath, "Default");
public static string ResourcePath => Path.Combine(CurrentPath, "Resource");
public static string ExternalPath => Path.Combine(CurrentPath, "External");
public static string MusicPath => Path.Combine(CurrentPath, "Music");
public static string BackgroundPath => Path.Combine(CurrentPath, "Background");
public static string PluginPath => Path.Combine(CurrentPath, "Plugins");
public static string PluginPath => Path.Combine(ExternalPath, "Plugins");

public static string OsuPath =>
App.UseDbMode ? new FileInfo(App.Config.General.DbPath).Directory.FullName : null;
Expand Down
File renamed without changes.
Binary file added OsuPlayer.Wpf/External/font/default.ttc
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added OsuPlayer.Wpf/External/plugins/ffmpeg/ffmpeg.exe
Binary file not shown.
Binary file added OsuPlayer.Wpf/External/plugins/ffmpeg/ffplay.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added OsuPlayer.Wpf/External/texture/osu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
110 changes: 109 additions & 1 deletion OsuPlayer.Wpf/OsuPlayer.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,9 @@
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Content Include="External\font\default.ttc">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
Expand Down Expand Up @@ -590,7 +593,112 @@
<Resource Include="Resources\search.png" />
</ItemGroup>
<ItemGroup>
<Content Include="plugins\SoundTouch.dll">
<Content Include="Default\blank.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\default.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\drum-hitclap.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\drum-hitfinish.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\drum-hitnormal.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\drum-hitwhistle.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\drum-sliderslide.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\drum-slidertick.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\drum-sliderwhistle.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\normal-hitclap.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\normal-hitfinish.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\normal-hitnormal.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\normal-hitwhistle.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\normal-sliderslide.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\normal-slidertick.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\normal-sliderwhistle.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\soft-hitclap.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\soft-hitfinish.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\soft-hitnormal.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\soft-hitwhistle.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\soft-sliderslide.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\soft-slidertick.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Default\soft-sliderwhistle.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="External\plugins\ffmpeg\avcodec-58.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="External\plugins\ffmpeg\avdevice-58.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="External\plugins\ffmpeg\avfilter-7.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="External\plugins\ffmpeg\avformat-58.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="External\plugins\ffmpeg\avutil-56.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="External\plugins\ffmpeg\ffmpeg.exe">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="External\plugins\ffmpeg\ffplay.exe">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="External\plugins\ffmpeg\ffprobe.exe">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="External\plugins\ffmpeg\postproc-55.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="External\plugins\ffmpeg\swresample-3.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="External\plugins\ffmpeg\swscale-5.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="External\plugins\SoundTouch.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="External\texture\osu.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion OsuPlayer.Wpf/Pages/Settings/GeneralPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<dms:DMRadioButton IconColor="#FF1E9FFF" Margin="8,0"
x:Name="RadioExit" Content="退出程序"
HorizontalAlignment="Left" Checked="Radio_CheckChanged" />
<dms:DMCheckBox IconColor="#FF1E9FFF" Margin="8,0"
<dms:DMCheckBox IconColor="#FF1E9FFF" Margin="8,10"
x:Name="AsDefault" Content="设置默认选项"
HorizontalAlignment="Left" Checked="AsDefault_CheckChanged"
Unchecked="AsDefault_CheckChanged" />
Expand Down
12 changes: 6 additions & 6 deletions OsuPlayer.Wpf/Windows/LyricWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using OSharp.Beatmap;
using Milky.OsuPlayer.Media.Lyric.Model;
using Milky.OsuPlayer.ViewModels;
using OSharp.Beatmap;
using System;
using System.Collections.Generic;
using System.Diagnostics;
Expand All @@ -15,8 +17,6 @@
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using Milky.OsuPlayer.Media.Lyric.Model;
using Milky.OsuPlayer.ViewModels;
using Brush = System.Drawing.Brush;
using Color = System.Drawing.Color;
using FontFamily = System.Drawing.FontFamily;
Expand Down Expand Up @@ -52,7 +52,7 @@ public LyricWindow(MainWindow mainWindow)
ViewModel = _mainWindow.ViewModel;
InitializeComponent();

FileInfo fi = new FileInfo(Path.Combine(Domain.ResourcePath, "font.ttc"));
FileInfo fi = new FileInfo(Path.Combine(Domain.ExternalPath, "font", "default.ttc"));
if (!fi.Exists) _fontFamily = new FontFamily("等线");
else
{
Expand Down Expand Up @@ -119,7 +119,7 @@ public void SetNewLyric(Lyric lyric, OsuFile osuFile)

_lyricList = lyric?.LyricSentencs ?? new List<Sentence>();
_lyricList.Insert(0,
new Sentence(osuFile.Metadata.ArtistMeta.Unicode + " - " + osuFile.Metadata.TitleMeta.Unicode, 0));
new Sentence(osuFile.Metadata.ArtistMeta.ToUnicodeString() + " - " + osuFile.Metadata.TitleMeta.ToUnicodeString(), 0));
}

public void StartWork()
Expand Down Expand Up @@ -242,7 +242,7 @@ private Size DrawLyric(int index)
//using (Brush bBg = new SolidBrush(Color.FromArgb(48, 0, 176, 255)))
//using (Pen pBg = new Pen(Color.FromArgb(192, 0, 176, 255), 3))
using (Brush b = new TextureBrush(
Image.FromFile(Path.Combine(Domain.ResourcePath, "texture", "2.png"))))
Image.FromFile(Path.Combine(Domain.ExternalPath, "texture", "osu.png"))))
//using (Pen p = new Pen(Color.Red))
using (Pen p2 = new Pen(Color.FromArgb(255, 255, 255), 6))
using (Font f = new Font(_fontFamily, 32))
Expand Down
4 changes: 2 additions & 2 deletions OsuPlayer.Wpf/Windows/MainWindow.Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ private async Task PlayNewFile(string path, bool play)
BeatmapEntry entry = App.Beatmaps.GetBeatmapByIdentity(nowIdentity);
OsuFile osuFile = App.HitsoundPlayer.Osufile;

LblTitle.Content = App.HitsoundPlayer.Osufile.Metadata.TitleMeta.Unicode;
LblArtist.Content = App.HitsoundPlayer.Osufile.Metadata.ArtistMeta.Unicode;
LblTitle.Content = App.HitsoundPlayer.Osufile.Metadata.TitleMeta.ToUnicodeString();
LblArtist.Content = App.HitsoundPlayer.Osufile.Metadata.ArtistMeta.ToUnicodeString();
((ToolTip)NotifyIcon.TrayToolTip).Content =
(string)LblArtist.Content + " - " + (string)LblTitle.Content;
bool isFaved = SetFaved(nowIdentity);
Expand Down
4 changes: 2 additions & 2 deletions OsuPlayer.Wpf/Windows/MainWindow.Surface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public void SetLyric()
{
if (!LyricWindow.IsVisible) return;
if (App.HitsoundPlayer == null) return;
var lyric = App.LyricProvider.GetLyric(App.HitsoundPlayer.Osufile.Metadata.ArtistMeta.Unicode,
App.HitsoundPlayer.Osufile.Metadata.TitleMeta.Unicode, App.MusicPlayer.Duration);
var lyric = App.LyricProvider.GetLyric(App.HitsoundPlayer.Osufile.Metadata.ArtistMeta.ToUnicodeString(),
App.HitsoundPlayer.Osufile.Metadata.TitleMeta.ToUnicodeString(), App.MusicPlayer.Duration);
LyricWindow.SetNewLyric(lyric, App.HitsoundPlayer.Osufile);
LyricWindow.StartWork();
}
Expand Down

0 comments on commit 9efa87d

Please sign in to comment.