C# 斑马手持终端WINCE开发 MC32N0 vs200

本示例展示了一个使用C#在手持终端上进行条码扫描、存储及判断的应用案例。通过VS2008进行开发,支持条码内容验证及重复报警功能。注意,大量数据存储可能导致延迟。

开发语言:C#
实例大小:2.30M
实例类别:常用C#方法
【实例简介】
实现手持终端条码的扫描,储存,判断
条码内容判定,条码是否重码报警
手持终端的当前只能在VS2008 2005上编程 高版本VS不适用 该示例用的VS2008 请用该版本打开和继续适应性开发
储存用的TXT文本 数据10万条以上会有判断延迟出现,需要定期清理txt手动备份
【实例截图】
【核心代码】
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
StreamWriter sw = new StreamWriter(saveFileDialog1.FileName, true);
//sw.WriteLine(listViewMain.Items[4].SubItems[2].Text);
sw.WriteLine(listViewMain.Items[1].SubItems[2].Text);
sw.Close();
}
else
{
StreamWriter sw = new StreamWriter(saveFileDialog1.FileName, true);
//sw.WriteLine(listViewMain.Items[4].SubItems[2].Text);
sw.WriteLine(listViewMain.Items[1].SubItems[2].Text);
sw.Close();
}
//////////////////////////////////////////////////////////
if (textBox3.Text == “OK” && textBox4.Text == “无重码”)
{
listViewMain.Enabled = true;
timer1.Enabled = false;
}
else
{
label5.Visible = true;
label7.Visible = true;
listViewMain.Enabled = false;
reloadLastListView();
//SoundPlayer player = new SoundPlayer();
player.SoundLocation = @“alarm.wav”;
player.Load(); //同步加载声音
player.Play(); //启用新线程播放
//player.PlayLooping(); //循环播放模式
//player.Stop();
}
if (string.Equals(textBox1.Text, data1.ToString()))
{
textBox3.Text = “OK”;
pictureBox1.Visible = true;
pictureBox2.Visible = false;
textBox4.Text = “不检查重码”;
pictureBox3.Visible = false;
pictureBox4.Visible = false;
}
else
{
textBox3.Text = “车种错误”;
pictureBox1.Visible = false;
pictureBox2.Visible = true;
textBox4.Text = “不检查重码”;
pictureBox3.Visible = false;
pictureBox4.Visible = false;
}
if (textBox3.Text == “OK” && textBox4.Text == “不检查重码”)
{
listViewMain.Enabled = true;
timer1.Enabled = false;
}
else if (textBox3.Text == “车种错误” && textBox4.Text == “不检查重码”)
{
label5.Visible = true;
label7.Visible = true;
listViewMain.Enabled = false;
reloadLastListView();
//SoundPlayer player = new SoundPlayer();
//player.SoundLocation = @“alarm.wav”;
player.SoundLocation = @“alarm.wav”;
player.Load(); //同步加载声音
player.Play(); //启用新线程播放
//player.PlayLooping(); //循环播放模式
//player.Stop();
}
内容转载自网站: 阁楼网源 -最干净的资源网站在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值