PC端到WinCE端文件互相拷贝
来源:互联网 发布:sql中文破解版下载 编辑:程序博客网 时间:2024/05/22 03:43
电脑端 Windows Mobile 设备中心必须可以连接到手持设备
首先需要引用 OpenNETCF.Desktop.Communication
源代码下载地址如下 https://social.msdn.microsoft.com/Forums/en-US/8344cb0d-3891-4eab-a62b-4af5a7ee32ad/c-opennetcf-copyfiletodevice-copyfilefromdevice-windows-7-wmdc?forum=netfxcompact
测试程序界面如下,在拷贝前需要先点击连接。
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using OpenNETCF.Desktop.Communication;namespace CopyFileToWinCE{ public partial class Form1 : Form { RAPI myrapi = new RAPI (); public Form1() { InitializeComponent(); } private void btnConnect_Click(object sender, EventArgs e) { myrapi.Connect(); while (!myrapi.DevicePresent) { MessageBox.Show("Please connect your device to your PC using ActiveSync and before clicking the OK button.", "No Device Present"); myrapi.Connect(); } } private void btnCopyFile_Click(object sender, EventArgs e) { try { if ((txtCopySource.Text == "") || (txtCopyDestination.Text == "")) { MessageBox.Show("You must provide both a source and destination file.", "Missing File Information"); } else { switch (cmbCopyDirection.Text) { case "": MessageBox.Show("You must select a direction before initiating the copy.", "No Destination Selected"); break; case "from desktop to device": myrapi.CopyFileToDevice(txtCopySource.Text, txtCopyDestination.Text); MessageBox.Show("Your file has been copied.", "Copy Success"); break; case "from device to desktop": myrapi.CopyFileFromDevice(txtCopySource.Text, txtCopyDestination.Text); MessageBox.Show("Your file has been copied.", "Copy Success"); break; } } } catch (Exception ex) { MessageBox.Show("The following error occurred copying the file -" + ex.Message, "Copy Error"); } } }}为程序创建桌面快捷方式
myrapi.CreateDeviceShortcut(@"\Windows\桌面\扫描系统3190.lnk", @"Platform\ScanBarcode\3190\ScanBarcode3190.exe"); myrapi.CreateDeviceShortcut(@"\Windows\桌面\无线扫描系统W3190.lnk", @"Platform\ScanBarcode\W3190\ScanBarcodeW3190.exe");
0 0
- PC端到WinCE端文件互相拷贝
- linux下两台pc互相拷贝文件
- PC操作移动设备windows CE 包括互相拷贝文件
- PC上传下载文件到WinCE设备
- 从PC拷贝文件到磁盘
- 拷贝文件到指定路径 wince C#
- 拷贝文件到指定路径 wince C#
- 将PC端的文件复制到Wince 7的设备中报设备中断的问题
- pc到U盘的文件拷贝小工具源代码
- pc与移动端互相跳转
- 远程桌面无法互相拷贝文件
- pc端WINCE的安装包
- (下载)WinCE注册表编辑器(PC端)
- pc端WINCE的安装包
- PC端通过USB与wince通信
- adb命令从手机端复制文件到PC
- WPD 从便携设备拷贝文件到PC文件不完整的解决办法
- WPD 从便携设备拷贝文件到PC文件不完整的解决办法
- #33 N-Queens
- WPF的ICommand接口的简单实现
- 会用continue
- CountDownLatch认知——同步协调器
- 常用iOS的第三方框架
- PC端到WinCE端文件互相拷贝
- thinkphp模块大致划分(不断更新)
- 为什么Dialog不能用Application的Context
- KGDB with VirtualBox: Debug a Live Kernel
- Oracle 用户加锁与解锁
- BM(Boyer-Moore)算法
- python复制文件到指定目录
- JS实现类似于微博秀的GitHub挂件
- 开始 测试