独立游戏开发如何入门?


 发布时间:2021-05-08 09:03:23

魔戒电影原声可以说是是运用合唱最多的了。然后里面的语言是辛达林和昆雅,是托尔金自创的语言,而且也是我听过最大气的。然后,英语貌似在合唱语言中算低端的,很少听到,这里有首非英文合唱,the mass 倒是不错。

直接给你个代码吧!using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace MP3File { public partial class frmMain : Form { public frmMain() { InitializeComponent(); } /// /// 浏览MP3文件 /// /// /// private void btn_Open_Click(object sender, EventArgs e) { if (this.oFDlog_Info.ShowDialog() == DialogResult.OK) { this.lV_Info.Items.Clear(); string[] FileNames = this.oFDlog_Info.FileNames; foreach (string FileName in FileNames) { //取得文件大小 FileInfo FileInfo = new FileInfo(FileName); float FileSize = (float)FileInfo.Length / (1024 * 1024); this.axMP_Info.FileName = FileName; //取得作者信息 string Author = this.axMP_Info.GetMediaInfoString(MediaPlayer.MPMediaInfoType.mpClipAuthor); //取得不含路径的文件名 string ShortFileName = FileName.Substring(FileName.LastIndexOf("\\") + 1); ShortFileName = ShortFileName.Substring(0, ShortFileName.Length - 4); //填充歌曲列表 string[] SubItem ={ ShortFileName, Author, FileSize.ToString().Substring(0, 4) + "M", FileName }; ListViewItem Item = new ListViewItem(SubItem); this.lV_Info.Items.Add(Item); this.lV_Info.Items[0].Selected = true; } } } /// /// 播放MP3文件 /// /// /// private void btn_Play_Click(object sender, EventArgs e) { if (this.lV_Info.Items.Count > 0) { if (this.lV_Info.SelectedItems.Count > 0) { int iPos = this.lV_Info.SelectedItems[0].Index; string FileName = this.lV_Info.Items[iPos].SubItems[3].Text.ToString(); this.axMP_Info.FileName = FileName; this.axMP_Info.Play(); } } else { MessageBox.Show("请选择歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } /// /// 暂停播放 /// /// /// private void btn_Pase_Click(object sender, EventArgs e) { if (this.axMP_Info.FileName.Length > 0) this.axMP_Info.Pause(); else { MessageBox.Show("请选择歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } /// /// 上一首歌曲 /// /// /// private void btn_Pre_Click(object sender, EventArgs e) { if (this.lV_Info.Items.Count > 0) { if (this.lV_Info.SelectedItems.Count > 0) { int iPos = this.lV_Info.SelectedItems[0].Index; if (iPos > 0) { this.lV_Info.Items[iPos - 1].Selected = true; string FileName = this.lV_Info.Items[iPos - 1].SubItems[3].Text.ToString(); this.axMP_Info.FileName = FileName; this.axMP_Info.Play(); } else { MessageBox.Show("已经是第一首歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } else { MessageBox.Show("请选择歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } /// /// 下一首歌曲 /// /// /// private void btn_Next_Click(object sender, EventArgs e) { if (this.lV_Info.Items.Count > 0) { if (this.lV_Info.SelectedItems.Count > 0) { int iPos = this.lV_Info.SelectedItems[0].Index; if (iPos < this.lV_Info.Items.Count - 1) { this.lV_Info.Items[iPos + 1].Selected = true; string FileName = this.lV_Info.Items[iPos + 1].SubItems[3].Text.ToString(); this.axMP_Info.FileName = FileName; this.axMP_Info.Play(); } else { MessageBox.Show("已经是最后一首歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } else { MessageBox.Show("请选择歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } /// /// 停止播放 /// /// /// private void btn_Stop_Click(object sender, EventArgs e) { if (this.axMP_Info.FileName.Length > 0) this.axMP_Info.Stop(); else { MessageBox.Show("请选择歌曲!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } } 详细情况 可以留言!。

游戏 C# 入门

上一篇: 苹果mp3随身听,为什么放上mp3歌曲不能播放?

下一篇: 怎样才能把自己的歌免费上传到自己的空间背景音乐里面,获得链接



发表评论:
相关阅读
热点话题
网站首页 | 网站地图

Copyright © 2012-2020 花香歌曲网 版权所有 0.92872