开发者

Will Window Phone 7 beep if it has messages

I'd like to have my HTC HD7 Windows phone bee开发者_运维百科p every 15 minutes if there are messages. Is that possible?


You've got a couple of options.

You have access to the Vibrate mechanism like so:

VibrateController vibrate = VibrateController.Default; 
vibrate.Start(TimeSpan.FromMilliseconds(1000)); 

or you can play a sound:

using Microsoft.Xna.Framework; 
using Microsoft.Xna.Framework.Audio;

Stream stream = TitleContainer.OpenStream("sounds/bonk.wav"); 
SoundEffect effect = SoundEffect.FromStream(stream); 
FrameworkDispatcher.Update(); 
effect.Play(); 

Doing either of these inside a Timer event would do what you're looking for.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜