在一段时间的等待之后,Microsoft终于在其下载中心开放了《Windows Mobile 6.5 开发者工具包》的下载。这对于广大Windows Mobile爱好者来说,无疑是一个好消息,就当是一个迟到的儿童节礼物吧。
Windows Mobile 6.5 Developer Tool Kit包括的组件:
l 说明文档
l 示例代码
l 头文件和库文件
l 模拟器镜像
l Visual Studio中创建Windows Mobile 6.5应用的工具
Windows Mobile 6.5 Developer Tool Kit包含Professional版本和Standard版本。目前,模拟器镜像的语言有6种,包括CHS(简体中文)、USA(英语)、GER(德语)、FRA(法语)、ITA(意大利语)和ESN(西班牙语)。Windows Mobile 6.5 Developer Tool Kit包括的模拟器镜像种类(主要是平台和分辨率的区别,和安装的Professional版本和Standard版本相关):
l Windows Mobile 6.5 Professional Square Emulator
l Windows Mobile 6.5 Professional QVGA Emulator
l Windows Mobile 6.5 Professional WQVGA Emulator
l Windows Mobile 6.5 Professional VGA Emulator
l Windows Mobile 6.5 Professional WVGA Emulator
l Windows Mobile 6.5 Standard Square Emulator
l Windows Mobile 6.5 Standard QVGA Emulator
对于广大开发人员来说,最具吸引力的应该就是其中的Windows Mobile 6.5 Gesture API,这可以在开发包中找到相关的例程,在”%"Windows Mobile 6.5 Developer Tool Kit"Samples" folder”目录下。当然,这个Gesture API也只是支持Windows Mobile Classic 和 Professional平台,因为大家知道,Classic是不支持触摸的。
我下载了一个中文的Windows Mobile 6.5 Developer Professional Tool Kit,尝试使用了一下Windows Mobile 6.5 Professional Emulator,截了一些图片上来。
/**
* 建索引
* @throws Exception
*/
public static void createIndex() throws Exception {
Document doc1 = new Document();
Field field = null;
field = new Field("name", "word1 word2 word3", Field.Store.YES,
Field.Index.TOKENIZED);
doc1.add(field);
field = new Field("title", "doc1", Field.Store.YES, Field.Index.TOKENIZED);
doc1.add(field);
Document doc2 = new Document();
field = new Field("name", "word4 word5", Field.Store.YES,
Field.Index.TOKENIZED);
doc2.add(field);
field = new Field("title", "doc2", Field.Store.YES, Field.Index.TOKENIZED);
doc2.add(field);
Document doc3 = new Document();
field = new Field("name", "word1 word2 word6", Field.Store.YES,
Field.Index.TOKENIZED);
doc3.add(field);
field = new Field("title", "doc3", Field.Store.YES, Field.Index.TOKENIZED);
doc3.add(field);
/**
* 为测试MultiFieldQueryParser而添加的文档
*/
Document doc4 = new Document();
field = new Field("name", "word1 word2 word3", Field.Store.YES,
Field.Index.TOKENIZED);
doc4.add(field);
field = new Field("title", "doc1 word1", Field.Store.YES, Field.Index.TOKENIZED);
doc4.add(field);
/**
* 对MultiFieldQueryParser更深理解
*/
Document doc5 = new Document();
field = new Field("title", "北京2008年奥运会", Field.Store.YES,
Field.Index.TOKENIZED);
doc5.add(field);
field = new Field("name", "这是一届创造奇迹、超越梦想的…….", Field.Store.YES, Field.Index.TOKENIZED);
doc5.add(field);
Document doc6 = new Document();
field = new Field("title", "北京2008年奥运会", Field.Store.YES,
Field.Index.TOKENIZED);
doc6.add(field);
field = new Field("name", "这是一届创造奇迹、超越梦想的奥运会…….", Field.Store.YES, Field.Index.TOKENIZED);
doc6.add(field);
IndexWriter writer = new IndexWriter("e:\\java\\index",
new StandardAnalyzer(), true);
writer.addDocument(doc1);
writer.addDocument(doc2);
writer.addDocument(doc3);