当前位置: 编程技术>移动开发
本页文章导读:
▪怎么在Visual Studio 2010旗舰版本下安装Window Phone 7 简体中文开发环境 如何在Visual Studio 2010旗舰版本下安装Window Phone 7 简体中文开发环境
微软官方提供的Window Phone 7 开发工具包是VisualStudio 2010 Express for Window Phone7 (学习版或快捷版),使用该版本有个问题是,.........
▪ 音效服务以及震动效能的实现 音效服务以及震动功能的实现
头文件:
#import <UIKit/UIKit.h>
#include <AudioToolbox/AudioToolbox.h>
@interface SoundViewController : UIViewController {
IBOutlet UISwitch *swcallback;
IBOutlet UIPickerView *soundPic.........
▪ 运用命令安装apk的方法 使用命令安装apk的方法
使用命令安装apk的方法,
第一步,将应用防止在android-sdk文件夹下面的\platform-tools文件夹里面。这里距离example.apk
第二步,cmd进入进入plateform-tools目录
第三步,adb insta.........
[1]怎么在Visual Studio 2010旗舰版本下安装Window Phone 7 简体中文开发环境
来源: 互联网 发布时间: 2014-02-18
如何在Visual Studio 2010旗舰版本下安装Window Phone 7 简体中文开发环境
微软官方提供的Window Phone 7 开发工具包是VisualStudio 2010 Express for Window Phone7 (学习版或快捷版),使用该版本有个问题是,不能打开传统的Visual Studio工程(如:WinForm、WebServer、WebForm等),如果能够把在Visual Studio 2010旗舰版本下安装Window Phone 7开发环境成为了开发人员新爱。安装环境必须是Windows 7操作系统。
处理步骤如下:
1、 安装VisualStudio 2010旗舰版本;
首先安装Visual Studio 2010旗舰版本,安装Visual Studio 2010旗舰过程就不再过多介绍了。
2、 为VisualStudio 2010旗舰版本打补丁VS SP1;
安装Visual Studio 2010旗舰后必须为VS打补丁
http://www.microsoft.com/downloads/zh-cn/details.aspx?familyid=75568aa6-8107-475d-948a-ef22627e57a5&displaylang=zh-cn
3、安装Windows Phone SDK 7.1。
http://www.microsoft.com/downloads/zh-cn/details.aspx?familyid=0a373422-6680-46a7-89e1-e9a468a14259&displaylang=zh-cn
安装成功新建项目的图片:
微软官方提供的Window Phone 7 开发工具包是VisualStudio 2010 Express for Window Phone7 (学习版或快捷版),使用该版本有个问题是,不能打开传统的Visual Studio工程(如:WinForm、WebServer、WebForm等),如果能够把在Visual Studio 2010旗舰版本下安装Window Phone 7开发环境成为了开发人员新爱。安装环境必须是Windows 7操作系统。
处理步骤如下:
1、 安装VisualStudio 2010旗舰版本;
首先安装Visual Studio 2010旗舰版本,安装Visual Studio 2010旗舰过程就不再过多介绍了。
2、 为VisualStudio 2010旗舰版本打补丁VS SP1;
安装Visual Studio 2010旗舰后必须为VS打补丁
http://www.microsoft.com/downloads/zh-cn/details.aspx?familyid=75568aa6-8107-475d-948a-ef22627e57a5&displaylang=zh-cn
3、安装Windows Phone SDK 7.1。
http://www.microsoft.com/downloads/zh-cn/details.aspx?familyid=0a373422-6680-46a7-89e1-e9a468a14259&displaylang=zh-cn
安装成功新建项目的图片:
[2] 音效服务以及震动效能的实现
来源: 互联网 发布时间: 2014-02-18
音效服务以及震动功能的实现
头文件:
#import <UIKit/UIKit.h>
#include <AudioToolbox/AudioToolbox.h>
@interface SoundViewController : UIViewController {
IBOutlet UISwitch *swcallback;
IBOutlet UIPickerView *soundPicker;
NSArray *soundData;
SystemSoundID soundFileObject;
}
@property (nonatomic, retain) UISwitch *swcallback;
@property (nonatomic, retain) UIPickerView *soundPicker;
@property (nonatomic, retain) NSArray *soundData;
@property (readonly) SystemSoundID soundFileObject;
static void completionCallback (SystemSoundID mySSID, void *myself);
- (IBAction) playSystemSound;
- (IBAction) playAlertSound;
- (IBAction) vibrate;
- (IBAction) StopPlaySound;
- (void) GetPlaysound;
@end
实现文件:
#import "SoundViewController.h"
@implementation SoundViewController
@synthesize swcallback, soundPicker, soundData, soundFileObject;
-(IBAction) StopPlaySound{
AudioServicesRemoveSystemSoundCompletion(self.soundFileObject);
}
-(void) GetPlaysound{
[self StopPlaySound];
NSInteger row = [soundPicker selectedRowInComponent:0];
NSString *soundfilename;
switch (row) {
case 0:
soundfilename = @"1.wav";
break;
case 1:
soundfilename = @"2.wav";
break;
case 2:
soundfilename = @"3.wav";
break;
default:
break;
}
NSString *Path = [[NSBundle mainBundle] bundlePath];
NSURL *soundfileURL = [NSURL fileURLWithPath:[Path stringByAppendingPathComponent:soundfilename]];
AudioServicesCreateSystemSoundID((CFURLRef)soundfileURL, &soundFileObject);
if ([swcallback isOn]){
AudioServicesAddSystemSoundCompletion(soundFileObject, NULL, NULL, completionCallback, (void *) self);
}
}
static void completionCallback(SystemSoundID mySSID, void *myself){
AudioServicesPlaySystemSound(mySSID);
}
- (IBAction) playSystemSound{
[self GetPlaysound];
AudioServicesPlaySystemSound(self.soundFileObject);
}
-(IBAction) playAlertSound{
[self GetPlaysound];
AudioServicesPlayAlertSound(self.soundFileObject);
}
- (IBAction) vibrate{
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}
- (void)viewDidLoad{
[super viewDidLoad];
NSArray *array = [[NSArray alloc] initWithObjects:@"音效1", @"音效2", @"音效3", nil];
self.soundData = array;
[array release];
}
- (void)dealloc{
[super dealloc];
AudioServicesDisposeSystemSoundID(self.soundFileObject);
}
#pragma mark -
#pragma mark soundPicker Data Soure
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{
return 1;
}
- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{
return [soundData count];
}
#pragma mark -
#pragma mark soundPicker Delegate
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{
return [soundData objectAtIndex:row];
}
@end
效果图:
[3] 运用命令安装apk的方法
来源: 互联网 发布时间: 2014-02-18
使用命令安装apk的方法
使用命令安装apk的方法,
第一步,将应用防止在android-sdk文件夹下面的\platform-tools文件夹里面。这里距离example.apk
第二步,cmd进入进入plateform-tools目录
第三步,adb install xxx.apk
完成。
卸载方法:
adb uninstall com.xxx.xxx
最新技术文章: