资源简介
此资源能实现对wav格式歌曲的波形进行绘制并能播放,利用scrollWindows的图像平移技术使得CPU占用率很低。

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace test
{
public partial class Form1 : Form
{
audioPro.map map1 = null; //申明一个画板
string wavWorkPath = “G:\\FireSys_Cb\\Programs_pc\\wavPro\\wavWork\\“;
public Form1()
{
InitializeComponent();
InitMap();
map1.deScaleChange+=new audioPro.map.deScaleEventHandler(map1_deScaleChange);
}
private void map1_deScaleChange(int x)
{
this.textBox1.Text = x.ToString();
}
public void InitMap()
{
audioPro.mapDescription mapDescription1 = new audioPro.mapDescription();
mapDescription1.backColor = Color.White;
mapDescription1.foreColor = Color.MidnightBlue;
mapDescription1.markFillColor = Color.Yellow;
mapDescription1.nonWorkColor = Color.DarkGray;
mapDescription1.markHeight = 15;
mapDescription1.tscaleHeight = 20;
mapDescription1.wavHeight = 200;
mapDescription1.Adiv = 200; //首先除以200
mapDescription1.offsetY = Convert.ToInt16( 100 + mapDescription1.markHeight);
map1 = new audioPro.map(mapDescription1);
map1.Location = new System.Drawing.Point(50 0);
map1.Width = this.Width - 60;
map1.Anchor = ( Anchorstyles.Right | Anchorstyles.Left | Anchorstyles.Top );
map1.Parent = this;
this.map1.MouseMove+=new MouseEventHandler(map1_MouseMove);
}
private void map1_MouseMove(object sender MouseEventArgs e)
{
this.textBox2.Text = e.X.ToString() + “ “ + e.Y.ToString();
}
private void button5_Click(object sender EventArgs e)
{
string strtmp;
strtmp = System.IO.Directory.GetCurrentDirectory();
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = “H:\\娱乐\\音乐“;
openFileDialog.Filter = “wav音频文件|*.wav“;
openFileDialog.RestoreDirectory = true;
openFileDialog.FilterIndex = 1;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
string sourcePath=openFileDialog.FileName;
string targetPath = wavWorkPath + sourcePath.Remove(0 sourcePath.LastIndexOf(‘\\‘) + 1);
map1.initWav(targetPath sourcePath true);
}
}
private void Form1_MouseDown(object sender MouseEventArgs e)
{
}
private void button2_Click(object sender EventArgs e)
{
map1.play();
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 29696 2009-12-16 18:41 test\test\bin\Debug\audioPro.dll
文件 48640 2009-12-16 18:41 test\test\bin\Debug\audioPro.pdb
文件 196608 2009-11-23 17:02 test\test\bin\Debug\AxInterop.Microsoft.Vbe.Interop.Forms.dll
文件 61440 2009-12-15 15:31 test\test\bin\Debug\AxInterop.WMPLib.dll
文件 331776 2009-12-15 15:31 test\test\bin\Debug\Interop.WMPLib.dll
文件 11264 2009-12-16 18:41 test\test\bin\Debug\test.exe
文件 30208 2009-12-16 18:41 test\test\bin\Debug\test.pdb
文件 14328 2009-12-17 11:38 test\test\bin\Debug\test.vshost.exe
文件 490 2007-07-21 01:33 test\test\bin\Debug\test.vshost.exe.manifest
目录 0 2009-12-08 17:18 test\test\bin\Debug
目录 0 2009-12-08 17:18 test\test\bin
文件 3285 2009-12-14 13:41 test\test\Form1.cs
文件 6917 2009-12-14 13:41 test\test\Form1.Designer.cs
文件 5814 2009-12-14 13:41 test\test\Form1.resx
文件 196608 2009-11-23 17:02 test\test\obj\Debug\AxInterop.Microsoft.Vbe.Interop.Forms.dll
目录 0 2009-12-09 17:31 test\test\obj\Debug\Refactor
文件 20881 2009-12-16 18:41 test\test\obj\Debug\ResolveAssemblyReference.cache
目录 0 2009-12-08 17:18 test\test\obj\Debug\TempPE
文件 2329 2009-12-17 11:38 test\test\obj\Debug\test.csproj.FileListAbsolute.txt
文件 847 2009-12-14 13:41 test\test\obj\Debug\test.csproj.GenerateResource.Cache
文件 545 2009-11-23 17:02 test\test\obj\Debug\test.csproj.ResolveComReference.cache
文件 11264 2009-12-16 18:41 test\test\obj\Debug\test.exe
文件 180 2009-12-16 18:41 test\test\obj\Debug\test.Form1.resources
文件 30208 2009-12-16 18:41 test\test\obj\Debug\test.pdb
文件 180 2009-12-16 18:41 test\test\obj\Debug\test.Properties.Resources.resources
目录 0 2009-12-16 18:41 test\test\obj\Debug
目录 0 2009-12-08 17:18 test\test\obj
文件 485 2009-11-23 16:43 test\test\Program.cs
文件 1346 2009-11-23 16:43 test\test\Properties\AssemblyInfo.cs
文件 2858 2009-11-23 16:43 test\test\Properties\Resources.Designer.cs
............此处省略49个文件信息
相关资源
- Asp.net学生信息管理系统源码
- asp.net C#购物车源代码
- ASP.NET实验室预约管理系统
- 020ASP.NET车辆综合管理系统.zip
- c# 高校档案信息管理系统
- asp.net中c#做的躲避小游戏,希望大家
- ASP.NET C# 工资管理系统
- 一款漂亮的灯光闪烁的圣诞树(C# V
- C#笔试题大全C#面试集合包括了,.ne
- ASP.NET客户管理系统(毕业设计 C#
- 在线求职系统(C#ASP.NET源码)
- .NET C# Custom Form Designer (附源碼)
- C#冒泡排序动态演示程序(看了就会)
- 酒店管理系统(c#.net源码)
- asp.net 在线考试系统及论文
- winform实时获取网卡网速全部源码,获
- ASP.Net文件上传管理源码
- ArcGIS Runtime SDK for .NET
- C# .NET5.0(net core)基于WPF(XAML)开发
- Quartz.NET定时任务框架
- .net core 动态生成 Word文档(word Expor
- 《OA企业办公自动化》asp.net 源码(附
- .net 检测新版本-自动升级程序
- tcp和udp(Mina.net)
- asp.netc#开发规范
- ADO.NET操作EXCEL
- asp.net 大文件上传(带进度条)
- 通过程序自动填充并提交ASP.NET表单(
- ASP.NET 基础编程文档(PPT电子教案)
-
ASP.NET_xm
l深入编程技术
评论
共有 条评论