eventplaysound.cs

来自「c# 基于windows mobile 访问基站信息源程序」· CS 代码 · 共 37 行

CS
37
字号
using System;
using System.Threading;
using System.Windows.Forms;

using NiceTracker.Libraries;
namespace NiceTracker.Events
{
	/// <summary>
	/// Summary description for EventPlaySound.
	/// </summary>
	public class EventPlaySound : EventBase
	{
		public EventPlaySound()
		{

		}

		public string Filename = "";

		public override void Action()
		{			
			if ( !PPCLib.PlaySound( Filename ) )
				MessageBox.Show( "Unable to play sound file" );
		}

		public override void LoadParameters( EventParameters eventParameters )
		{
			Filename = eventParameters.Get( "Filename" );
		}

		public override void SaveParameters( EventParameters eventParameters )
		{
			eventParameters.Set( "Filename", Filename );
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?