Skip to content

Commit

Permalink
播放区加入更多按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
WhatDamon committed Aug 24, 2024
1 parent 68fb415 commit d738717
Show file tree
Hide file tree
Showing 7 changed files with 280 additions and 3 deletions.
19 changes: 19 additions & 0 deletions NCMDumpGUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<AdditionalFiles Remove="app.manifest" />
</ItemGroup>

<ItemGroup>
<None Remove="3gbxve5r.0gz~" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Costura.Fody" Version="5.7.0">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -32,4 +36,19 @@
<PackageReference Include="NAudio" Version="2.2.1" />
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

</Project>
63 changes: 63 additions & 0 deletions Properties/Resources.Designer.cs

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

120 changes: 120 additions & 0 deletions Properties/Resources.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# NCMDumpGUI

> [!CAUTION]
> 此应用只用于学习用途,禁止用于商业或违法用途,请在遵守NCM文件提供平台的服务条款下使用本应用,作者对商业或违法使用本软件造成的任何后果不承担任何责任!
> 此应用只用于学习用途,下载后请在24小时内删除,禁止用于商业或违法用途!请在遵守 NCM 文件提供平台的服务条款下使用本应用,作者对商业或违法使用本软件造成的任何后果不承担任何责任!
>
> 使用本软件转换的音频请在不侵犯著作权的前提下使用。如需商业,请从平台或版权所有人购买对应歌曲
这是一个简单程序,使用到了 `ncmdump` 项目实现 ncm 解密功能

Expand Down Expand Up @@ -33,6 +35,7 @@
- [x] 基本用户界面
- [x] 异常处理
- [x] 批量处理
- [x] 播放
- [ ] 窗口置顶
- [ ] 支持使用 `ncmdump.exe`
- [ ] 更详细的状态信息
Expand All @@ -41,9 +44,18 @@

## 截图

_截图来自 `v1.0.1.2`_

![在 Windows 11 上运行](/screenshots/Windows11.png)
![在 Windows 7 上运行](/screenshots/Windows7.png)

## 依赖

- [ncmdump](https://github.com/taurusxin/ncmdump)(MIT 许可证)
+ [taglib](https://github.com/taglib/taglib)(LGPL 2.1、MPL 1.1 许可证)
- [NAudio](https://github.com/naudio/NAudio)(MIT 许可证)
- [Costura.Fody](https://github.com/Fody/Costura)(MIT 许可证)

## 鸣谢

本项目使用到了 https://github.com/taurusxin/ncmdump 项目中的 `libncmdump.dll`
47 changes: 46 additions & 1 deletion WndMain.Designer.cs

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

17 changes: 16 additions & 1 deletion WndMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected override void WndProc(ref Message m)
case SystemMenuItem.About:
TaskDialog.ShowDialog(this, new TaskDialogPage()
{
Text = "版本:v1.0.2.0\n基于libncmdump开发\n使用MIT许可证开源\n其他依赖:\n · Costura.Fody\n · NAudio\n当前.NET版本:" + Environment.Version.ToString(),
Text = "版本:v1.0.2.1\n基于libncmdump开发\n使用MIT许可证开源\n其他依赖:\n · Costura.Fody\n · NAudio\n当前.NET版本:" + Environment.Version.ToString(),
Heading = "NCMDumpGUI",
Caption = "关于",
Buttons =
Expand Down Expand Up @@ -658,5 +658,20 @@ private void WndMain_FormClosed(object sender, FormClosedEventArgs e)
{
Stop();
}

private void openWithDefaultPlayerToolStripMenuItem_Click(object sender, EventArgs e)
{
Process.Start("explorer", resultAudioPath);
}

private void openFileLocationToolStripMenuItem_Click(object sender, EventArgs e)
{
Process.Start("explorer", $"/select,\"{resultAudioPath}\"");
}

private void playMoreButton_Click(object sender, EventArgs e)
{
playMoreBtnContextMenuStrip.Show(playMoreButton, new Point(0, playMoreButton.Height));
}
}
}
3 changes: 3 additions & 0 deletions WndMain.resx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
<metadata name="playGroupBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="playMoreBtnContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>496, 17</value>
</metadata>
<metadata name="timerTrackBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>311, 17</value>
</metadata>
Expand Down

0 comments on commit d738717

Please sign in to comment.