资源简介
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MechanicalPiano1._0
{
public partial class Form1 : Form
{
string MusicPath = ““;
public Form1()
{
InitializeComponent();
}
#region//调用windows库
[DllImport(“Kernel32.dll“)]
public static extern bool Beep(int frequency int duration);//蜂鸣器发声
#endregion
private void Form1_Load(object sender EventArgs e)
{
string path = System.Environment.CurrentDirectory;
path = path.Substring(0 path.LastIndexOf(“\\“));
MusicPath = path + “\\music\\“;
//MediaPlayer1.Ctlcontrols.stop(); //停止
//MediaPlayer1.Ctlcontrols.pause(); //暂停
}
private void Form1_KeyDown(object sender KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)//
{
MediaPlayer27.Ctlcontrols.stop(); //停止
MediaPlayer27.URL = MusicPath + “27.mp3“;
MediaPlayer27.Ctlcontrols.play(); //播放
}
if (e.KeyCode == Keys.F1)
{
MediaPlayer28.Ctlcontrols.stop(); //停止
MediaPlayer28.URL = MusicPath + “28.mp3“;
MediaPlayer28.Ctlcontrols.play(); //播放
}
if (e.KeyCode == Keys.F2)
{
MediaPlayer30.Ctlcontrols.stop(); //停止
MediaPlayer30.URL = MusicPath + “30.mp3“;
MediaPlayer30.Ctlcontrols.play(); //播放
}
if (e.KeyCode == Keys.F3)
{
MediaPlayer32.Ctlcontrols.stop(); //停止
MediaPlayer32.URL = MusicPath + “32.mp3“;
MediaPlayer32.Ctlcontrols.play(); //播放
}
if (e.KeyCode == Keys.F4)
{
MediaPlayer33.Ctlcontrols.stop(); //停止
MediaPlayer33.URL = MusicPath + “33.mp3“;
MediaPlayer33.Ctlcontrols.play(); //播放
}
if (e.KeyCode == Keys.F5)
{
MediaPlayer35.Ctlcontrols.stop(); //停止
MediaPlayer35.URL = MusicPath + “35.mp3“;
MediaPlayer35.Ctlcontrols.play(); //播放
}
if (e.KeyCode == Keys.F6)
{
MediaPlayer37.Ctlcontrols.stop(); //停止
MediaPlayer37.URL = MusicPath + “37.mp3“;
MediaPlayer37.Ctlcontrols.play(); //播放
}
if (e.KeyCode == Keys.F7)
{
MediaPlayer39.Ctlcontrols.stop(); //停止
Med
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1023 2020-09-09 19:03 MechanicalPiano1.0\MechanicalPiano1.0.sln
文件 43520 2020-09-14 23:27 MechanicalPiano1.0\MechanicalPiano1.0.v12.suo
目录 0 2020-11-03 20:56 MechanicalPiano1.0\MechanicalPiano1.0\
文件 187 2020-09-09 19:03 MechanicalPiano1.0\MechanicalPiano1.0\App.config
目录 0 2020-11-03 20:56 MechanicalPiano1.0\MechanicalPiano1.0\bin\
目录 0 2020-11-03 20:56 MechanicalPiano1.0\MechanicalPiano1.0\bin\Debug\
文件 53760 2020-09-09 21:45 MechanicalPiano1.0\MechanicalPiano1.0\bin\Debug\AxInterop.WMPLib.dll
文件 330752 2020-09-09 21:44 MechanicalPiano1.0\MechanicalPiano1.0\bin\Debug\Interop.WMPLib.dll
文件 94208 2020-09-12 00:32 MechanicalPiano1.0\MechanicalPiano1.0\bin\Debug\MechanicalPiano1.0.exe
文件 187 2020-09-09 19:03 MechanicalPiano1.0\MechanicalPiano1.0\bin\Debug\MechanicalPiano1.0.exe.config
文件 46592 2020-09-12 00:32 MechanicalPiano1.0\MechanicalPiano1.0\bin\Debug\MechanicalPiano1.0.pdb
文件 24224 2020-09-14 23:19 MechanicalPiano1.0\MechanicalPiano1.0\bin\Debug\MechanicalPiano1.0.vshost.exe
文件 187 2020-09-09 19:03 MechanicalPiano1.0\MechanicalPiano1.0\bin\Debug\MechanicalPiano1.0.vshost.exe.config
文件 490 2019-03-19 12:47 MechanicalPiano1.0\MechanicalPiano1.0\bin\Debug\MechanicalPiano1.0.vshost.exe.manifest
目录 0 2020-11-03 20:56 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\
文件 69509 2011-05-29 13:48 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\01.mp3
文件 63947 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\02.mp3
文件 70635 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\03.mp3
文件 31346 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\04.mp3
文件 31346 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\05.mp3
文件 32600 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\06.mp3
文件 30511 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\07.mp3
文件 31764 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\08.mp3
文件 29257 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\09.mp3
文件 29675 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\10.mp3
文件 30093 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\11.mp3
文件 30093 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\12.mp3
文件 30929 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\13.mp3
文件 30511 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\14.mp3
文件 28839 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\15.mp3
文件 30093 2011-05-29 13:46 MechanicalPiano1.0\MechanicalPiano1.0\bin\music\16.mp3
............此处省略102个文件信息
- 上一篇:C# 取色工具源代码(RGB)
- 下一篇:ASP.NET_xm
l深入编程技术
相关资源
- oid转换
- C# 套打Demo
-
C# 开发BHO(Browser Helper ob
ject)插件 - c# + sqlite demo(增删改查)
- C# 8 Code sample:Using declarations(ef-cor
- modbus通信
- Autofac(IoC依赖注入容器)Demo
- Modbus通讯 串口通讯
- IAP小工具(Ymodem-IAP)源码
- MODBUS通讯(TCP/Rtu)
- Ymodem窗体应用程序
- C# 调用BarTender打印条码DEMO
- asp.net 访问odbc informix源码及配置截图
- 汉王人脸通SDK v3.0 c#接收互联网数据
- C#调用Lucene方法-实现快速搜索
- Unity2D小游戏——炸弹人类似qq堂的小
- .Net C# 小程序卡券demo
- 神思ss628型USB二代身份证DEMOC#
- wpf 搜集整理demo源码(都是c#写的,惊
- C#H264格式视频解码
- winform c# mschart demo 范例
- mod_aspdotnet-2.2(支持apache2.2)
- C#调用SAP RFC 案例demo
- 12306抢票工具--抢票C# Demo
- WinForm C#Demo 会员与消费系统 进销存系
- ODP.NET_Managed_ODAC122cR1
- Protogen编译protobuf demotools.rar
- C# RedisDemo Redisdll 全部DLL
- c#微信支付、微信企业支付到个人,微
- Modbus通讯协议-C#源码
评论
共有 条评论