windows mobile开发循序渐进(7)windows mobile device center连接windows mobile 5.0及简单移动程序开发
2010-05-06 16:48
573 查看
这段时间一直忙着一个收尾项目,仍然是和之前接收的项目一样,按照预先设计的方案做出来的软件,一旦客户要求增加新的功能或者更改,就有可能对之前的核心部分重新考虑,正在思考有没有好的办法可以用最少的时间来调整这部分内容。
1,打开仿真设备管理器,连接上windows mobile 5,按照以前的设置,现在需要改变的就是windows mobile device center的连接设置里选择DMA。
2,注意在仿真程序属性中选择外围设备的连接方式是”为串行端口…”
3,如果连接顺利现在已经可以在你的电脑中看到设备的图标了,里面有移动设备的各类文件,当然,后来我们会将数据库放进去供移动设备访问。
代码很简单,和winform的编程类似,SQL语句也比较类似。
1 using System;
2 using System.Linq;
3 using System.Collections.Generic;
4 using System.Text;
5 using System.Data;
6 using System.Data.SqlServerCe;
7 namespace MyMobileTaskList
8 {
9 class DB
10 {
11 public static string ConString = "Data Source=MyTask.sdf";
12
13 public static DataTable GetDataSet(string strSql)
14 {
15 SqlCeConnection con = new SqlCeConnection(ConString);
16 con.Open();
17 SqlCeDataAdapter sda = new SqlCeDataAdapter(strSql, con);
18 DataSet ds = new DataSet();
19 sda.Fill(ds);
20 con.Close();
21 return ds.Tables[0];
22 }
23
24 public static void InsertData(string strSql)
25 {
26 SqlCeConnection con = new SqlCeConnection(ConString);
27 con.Open();
28 SqlCeCommand cmd = new SqlCeCommand(strSql, con);
29 cmd.ExecuteNonQuery();
30 con.Close();
31 }
32
33 }
34 }
35
接下来准备做个像样点的程序,就是数据库的优化方面有些困惑,还有任务列表的现实方式得考虑一下了。
在网络上搜了一下,没有找到合适的Demo来练习开发,希望有这方面的例子的朋友分享一下,谢谢!
email:wengyuli@gmail.com
一,windows mobile device center连接windows mobile 5.0
上次由于装了windows 7,将ActiveSync升级到了windows mobile device center,却出现了连接问题,今天尝试了一下,终于可以顺利连接上,方法如下:1,打开仿真设备管理器,连接上windows mobile 5,按照以前的设置,现在需要改变的就是windows mobile device center的连接设置里选择DMA。
2,注意在仿真程序属性中选择外围设备的连接方式是”为串行端口…”
3,如果连接顺利现在已经可以在你的电脑中看到设备的图标了,里面有移动设备的各类文件,当然,后来我们会将数据库放进去供移动设备访问。
二,简单的移动应用程序
一个简单的任务列表TaskList程序,有三个窗口,一个列表窗口,一个添加任务窗口,一个显示任务窗口。代码很简单,和winform的编程类似,SQL语句也比较类似。
1 using System;
2 using System.Linq;
3 using System.Collections.Generic;
4 using System.Text;
5 using System.Data;
6 using System.Data.SqlServerCe;
7 namespace MyMobileTaskList
8 {
9 class DB
10 {
11 public static string ConString = "Data Source=MyTask.sdf";
12
13 public static DataTable GetDataSet(string strSql)
14 {
15 SqlCeConnection con = new SqlCeConnection(ConString);
16 con.Open();
17 SqlCeDataAdapter sda = new SqlCeDataAdapter(strSql, con);
18 DataSet ds = new DataSet();
19 sda.Fill(ds);
20 con.Close();
21 return ds.Tables[0];
22 }
23
24 public static void InsertData(string strSql)
25 {
26 SqlCeConnection con = new SqlCeConnection(ConString);
27 con.Open();
28 SqlCeCommand cmd = new SqlCeCommand(strSql, con);
29 cmd.ExecuteNonQuery();
30 con.Close();
31 }
32
33 }
34 }
35
接下来准备做个像样点的程序,就是数据库的优化方面有些困惑,还有任务列表的现实方式得考虑一下了。
在网络上搜了一下,没有找到合适的Demo来练习开发,希望有这方面的例子的朋友分享一下,谢谢!
email:wengyuli@gmail.com
相关文章推荐
- windows mobile开发循序渐进(7)windows mobile device center连接windows mobile 5.0及简单移动程序开发
- windows mobile开发循序渐进(6)windows mobile device center 使用问题
- windows mobile开发循序渐进(6)windows mobile device center 使用问题
- 提供一个Windows mobile Native UI 程序,循序渐进开发,并附有代码!
- 提供一个Windows mobile Native UI 程序,循序渐进开发,并附有代码!
- 提供一个Windows mobile Native UI 程序,循序渐进开发,并附有代码!
- windows mobile开发循序渐进(2)WM5仿真模拟器与电脑主机连接
- 使用Windows Mobile Test Framework进行Windows Mobile程序的自动化测试 - (1)微软Windows Mobile Test Framework简介
- windows mobile开发循序渐进(2)WM5仿真模拟器与电脑主机连接 [转]
- 使用Windows Mobile Device Center进行手机的同步
- 如何在windows上使用eclipse远程连接hadoop进行程序开发
- 最简单的Windows win32 API 程序开发方法
- Hadoop学习笔记(九):如何在windows上使用eclipse远程连接hadoop进行程序开发
- windows下socket开发tcp程序 简单例子
- Windows Mobile 5.0 (4) -- Mobile程序部署
- 使用Seam Framework + JBoss 5.0 开发第一个Web应用 - 简单投票程序
- 使用Seam Framework + JBoss 5.0 开发第一个Web应用 - 简单投票程序
- windows上使用eclipse远程连接hadoop进行程序开发没有权限访问问题
- 基于.net compact framework 2.0,C#开发windows mobile 5.0程序遇到的一些问题及解决办法
- Windows上使用Eclipse远程连接Hadoop进行程序开发