• 大小: 64KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-29
  • 语言: C#
  • 标签: 电子琴  

资源简介

电子琴(C#),发音依靠的是winmm.dll,如果需要自己写一个电子琴,这个很有参考意义。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace PianoDemo
{
    public partial class Form1 : Form
    {
        public PianoBoard MB;
        public Form1()
        {
            InitializeComponent();
            MB = new PianoBoard(thisKeyboard1);
            comboBox1.Items.Clear();
            int i = 0;
            foreach (string x in Enum.GetNames(typeof(PianoToneType)))
            {
                comboBox1.Items.Add(“(“+ i .ToString(“000“)+“)“ + x);
                i++;
            }
            comboBox1.SelectedIndex = 0;
        }

        private void comboBox1_SelectedIndexChanged(object sender EventArgs e)
        {
            MB.Set((PianoToneType)Enum.Toobject(typeof(PianoToneType) comboBox1.SelectedIndex));
        }

        private void trackBar1_ValueChanged(object sender EventArgs e)
        {
            MB.Vol(trackBar1.Value);
        }


    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      22528  2014-03-22 16:46  PianoDemo\PianoDemo\bin\Debug\PianoDemo.exe

     文件      48640  2014-03-22 16:46  PianoDemo\PianoDemo\bin\Debug\PianoDemo.pdb

     文件      11608  2014-03-22 16:46  PianoDemo\PianoDemo\bin\Debug\PianoDemo.vshost.exe

     文件        490  2010-03-17 22:39  PianoDemo\PianoDemo\bin\Debug\PianoDemo.vshost.exe.manifest

     文件       1062  2014-03-22 16:46  PianoDemo\PianoDemo\Form1.cs

     文件       4151  2014-03-22 16:46  PianoDemo\PianoDemo\Form1.Designer.cs

     文件       5817  2014-03-22 16:46  PianoDemo\PianoDemo\Form1.resx

     文件       5479  2014-03-22 16:46  PianoDemo\PianoDemo\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        630  2014-03-22 16:46  PianoDemo\PianoDemo\obj\x86\Debug\GenerateResource-ResGen.read.1.tlog

     文件       1050  2014-03-22 16:46  PianoDemo\PianoDemo\obj\x86\Debug\GenerateResource-ResGen.write.1.tlog

     文件       1227  2014-03-22 16:46  PianoDemo\PianoDemo\obj\x86\Debug\PianoDemo.csproj.FileListAbsolute.txt

     文件      22528  2014-03-22 16:46  PianoDemo\PianoDemo\obj\x86\Debug\PianoDemo.exe

     文件        180  2014-03-22 16:46  PianoDemo\PianoDemo\obj\x86\Debug\PianoDemo.Form1.resources

     文件      48640  2014-03-22 16:46  PianoDemo\PianoDemo\obj\x86\Debug\PianoDemo.pdb

     文件        180  2014-03-22 15:29  PianoDemo\PianoDemo\obj\x86\Debug\PianoDemo.Properties.Resources.resources

     文件       6442  2014-03-22 16:18  PianoDemo\PianoDemo\Pianobase.cs

     文件      13370  2014-03-22 16:15  PianoDemo\PianoDemo\PianoBoard.cs

     文件       3506  2014-03-22 15:29  PianoDemo\PianoDemo\PianoDemo.csproj

     文件        143  2014-03-17 21:43  PianoDemo\PianoDemo\PianoDemo.csproj.user

     文件        470  2014-03-16 17:12  PianoDemo\PianoDemo\Program.cs

     文件       1370  2014-03-16 17:12  PianoDemo\PianoDemo\Properties\AssemblyInfo.cs

     文件       2869  2014-03-16 17:12  PianoDemo\PianoDemo\Properties\Resources.Designer.cs

     文件       5612  2014-03-16 17:12  PianoDemo\PianoDemo\Properties\Resources.resx

     文件       1095  2014-03-16 17:12  PianoDemo\PianoDemo\Properties\Settings.Designer.cs

     文件        249  2014-03-16 17:12  PianoDemo\PianoDemo\Properties\Settings.settings

     文件        869  2014-03-17 21:43  PianoDemo\PianoDemo.sln

    ..A..H.     19456  2014-03-19 20:38  PianoDemo\PianoDemo.suo

     目录          0  2014-03-17 21:43  PianoDemo\PianoDemo\obj\x86\Debug\TempPE

     目录          0  2014-03-22 16:47  PianoDemo\PianoDemo\obj\x86\Debug

     目录          0  2014-03-17 21:43  PianoDemo\PianoDemo\obj\x86\Release

............此处省略11个文件信息

评论

共有 条评论