Skip to content

Commit

Permalink
🎉🎉🎉 Fix lag when scroll list music & Fix missing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tvc12 committed Feb 28, 2019
1 parent 30d6c3f commit 234645f
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Music/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration>
<configSections>

<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="Music.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>

Expand Down
9 changes: 6 additions & 3 deletions Music/Music.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Bunifu_UI_v1.52">
<HintPath>..\..\..\UI for Visual Studio 2017\Bunifu_UI_v1.52.dll</HintPath>
<HintPath>..\packages\Bunifu_UI_v1.52.dll</HintPath>
</Reference>
<Reference Include="Fizzler, Version=1.1.21209.0, Culture=neutral, PublicKeyToken=4ebff4844e382110, processorArchitecture=MSIL">
<HintPath>..\packages\Fizzler.1.1.0\lib\net35\Fizzler.dll</HintPath>
Expand All @@ -71,8 +71,8 @@
<Reference Include="HtmlAgilityPack, Version=1.8.4.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.8.4\lib\Net45\HtmlAgilityPack.dll</HintPath>
</Reference>
<Reference Include="MaterialSkin">
<HintPath>..\..\..\UI for Visual Studio 2017\MaterialSkin.0.2.1\lib\MaterialSkin.dll</HintPath>
<Reference Include="MaterialSkin, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialSkin.0.2.1\lib\MaterialSkin.dll</HintPath>
</Reference>
<Reference Include="MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=MSIL">
<HintPath>..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.dll</HintPath>
Expand Down Expand Up @@ -103,6 +103,9 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="TFlowLayoutPanel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="uAbout.cs">
<SubType>UserControl</SubType>
</Compile>
Expand Down
8 changes: 7 additions & 1 deletion Music/SongInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ internal void SetPath(string filePath)
{
if (file != null)
file.Dispose();
this.file = TagLib.File.Create(filePath);
try
{
this.file = TagLib.File.Create(filePath);
}catch
{

}
}

#endregion
Expand Down
36 changes: 36 additions & 0 deletions Music/TFlowLayoutPanel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Music
{
class TFlowLayoutPanel : FlowLayoutPanel
{
public TFlowLayoutPanel() : base()
{
this.DoubleBuffered = true;
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
}

protected override void OnScroll(ScrollEventArgs se)
{
this.Invalidate();
base.OnScroll(se);
}

protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000; // WS_CLIPCHILDREN
return cp;
}
}
}
}
1 change: 1 addition & 0 deletions Music/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<package id="Fizzler" version="1.1.0" targetFramework="net461" />
<package id="Fizzler.Systems.HtmlAgilityPack" version="1.1.1" targetFramework="net461" />
<package id="HtmlAgilityPack" version="1.8.4" targetFramework="net461" />
<package id="MaterialSkin" version="0.2.1" targetFramework="net461" />
<package id="MetroModernUI" version="1.4.0.0" targetFramework="net461" />
<package id="taglib" version="2.1.0.0" targetFramework="net461" />
</packages>
4 changes: 2 additions & 2 deletions Music/uMyMusic.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Music/uNowPlaying.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Music/uPlaylist.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Music/uPlaylistDetail.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Music/uResults.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added packages/Bunifu_UI_v1.52.dll
Binary file not shown.

0 comments on commit 234645f

Please sign in to comment.