资源简介
一个点定位的C#程序,支持蓝牙传输
代码片段和文件信息
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WM50_Cricket
{
public partial class Form1 : Form
{
//傍侩 函荐甸 矫累
Random tmp_rand;
double tmp_drand_val;
int x = 0 y = 0;
int itick;
bool isPacketEnd;
bool isAutoSend;
string[][] rcv_buf = new string[7][];
string temp_buf;
string[] dist_str = new string[3];
string[][] xy = new string[3][];
Point[] _s = new Point[4];
Point console_p = new Point();
//傍侩 函荐甸 场
public Form1() { InitializeComponent(); }
private void Form1_Load(object sender EventArgs e)
{
//picturebox 捞亥飘 眠啊
pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(pictureBox1_Paint);
//檬扁拳 单捞磐甫 唱穿绢 傍侩函荐俊 历厘
itick = 1;
isPacketEnd = false;
isAutoSend = false;
temp_buf = null;
txt_console.Visible = false;
menuItem3.Enabled = false;
menuItem6.Enabled = false;
set_xy(txt_location_s1 1);
set_xy(txt_location_s2 2);
set_xy(txt_location_s3 3);
console_p = txt_console.Location;
_s[0].X = 83;
_s[0].Y = 59;
_s[1].X = 18;
_s[1].Y = 145;
_s[2].X = 189;
_s[2].Y = 192;
_s[3].X = 226;
_s[3].Y = 89;
temp_buf = “VR=2.0ID=01:ae:fe:fe:10:00:00:69SP=DB=DR=2313TM=2575TS=54304“;
divide_packet();
}
//荤侩磊 沥狼 窃荐 矫累
string[] id_str = {“17“ “26“ “ae“};
private void divide_packet() {
//VR=2.0ID=01:ae:fe:fe:10:00:00:69SP=1DB=77DR=2313TM=2575TS=54304
int node_id = 0;
string[] tmp_split;
try
{
tmp_split = temp_buf.Split(‘‘);
for (int i = 0; i < 7; i++)
rcv_buf[i] = tmp_split[i].Split(‘=‘);
temp_buf = null;
//SP 趣篮 ID肺 皋矫瘤 备盒
if (rcv_buf[2][1] != ““)
{
node_id = Convert.ToInt16(rcv_buf[2][1]);
}
else
{
int tmp_id;
for (int i = 0; i < 3; i++)
{
tmp_id = rcv_buf[1][1].IndexOf(id_str[i]);
if (tmp_id != -1)
node_id = i + 1;
}
}
dist_str[node_id - 1] = rcv_buf[3][1];
show_txt(txt_parsing_value);
if ((dist_str[0] != null) && (dist_str[1] != null) && (dist_str[2] != null))
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2007-12-14 02:55 WM50_Cricket\
目录 0 2008-01-16 17:51 WM50_Cricket\WM50_Cricket\
目录 0 2008-01-16 17:53 WM50_Cricket\WM50_Cricket\bin\
文件 37624 2007-12-14 02:57 WM50_Cricket\WM50_Cricket\bin\background.jpg
目录 0 2007-12-17 23:34 WM50_Cricket\WM50_Cricket\bin\Debug\
文件 58880 2008-01-16 17:51 WM50_Cricket\WM50_Cricket\bin\Debug\WM50_Cricket.exe
文件 38400 2008-01-16 17:51 WM50_Cricket\WM50_Cricket\bin\Debug\WM50_Cricket.pdb
目录 0 2008-01-16 17:53 WM50_Cricket\WM50_Cricket\bin\Release\
文件 58368 2008-01-18 02:37 WM50_Cricket\WM50_Cricket\bin\Release\WM50_Cricket.exe
文件 38400 2008-01-18 02:37 WM50_Cricket\WM50_Cricket\bin\Release\WM50_Cricket.pdb
文件 21205 2008-01-16 17:51 WM50_Cricket\WM50_Cricket\Form1.cs
文件 18474 2008-01-16 17:21 WM50_Cricket\WM50_Cricket\Form1.Designer.cs
文件 62267 2008-01-16 17:21 WM50_Cricket\WM50_Cricket\Form1.resx
目录 0 2008-01-16 17:53 WM50_Cricket\WM50_Cricket\obj\
目录 0 2008-01-16 17:51 WM50_Cricket\WM50_Cricket\obj\Debug\
目录 0 2007-12-14 03:17 WM50_Cricket\WM50_Cricket\obj\Debug\Refactor\
文件 5450 2007-12-18 12:37 WM50_Cricket\WM50_Cricket\obj\Debug\ResolveAssemblyReference.cache
目录 0 2007-12-14 02:55 WM50_Cricket\WM50_Cricket\obj\Debug\TempPE\
文件 842 2008-01-16 17:21 WM50_Cricket\WM50_Cricket\obj\Debug\WM50_Cricket.csproj.GenerateResource.Cache
文件 58880 2008-01-16 17:51 WM50_Cricket\WM50_Cricket\obj\Debug\WM50_Cricket.exe
文件 37195 2008-01-16 17:21 WM50_Cricket\WM50_Cricket\obj\Debug\WM50_Cricket.Form1.resources
文件 38400 2008-01-16 17:51 WM50_Cricket\WM50_Cricket\obj\Debug\WM50_Cricket.pdb
文件 180 2007-12-17 23:34 WM50_Cricket\WM50_Cricket\obj\Debug\WM50_Cricket.Properties.Resources.resources
目录 0 2008-01-18 02:37 WM50_Cricket\WM50_Cricket\obj\Release\
文件 5450 2008-01-18 02:37 WM50_Cricket\WM50_Cricket\obj\Release\ResolveAssemblyReference.cache
目录 0 2008-01-16 17:53 WM50_Cricket\WM50_Cricket\obj\Release\TempPE\
文件 842 2008-01-16 17:53 WM50_Cricket\WM50_Cricket\obj\Release\WM50_Cricket.csproj.GenerateResource.Cache
文件 58368 2008-01-18 02:37 WM50_Cricket\WM50_Cricket\obj\Release\WM50_Cricket.exe
文件 37195 2008-01-16 17:53 WM50_Cricket\WM50_Cricket\obj\Release\WM50_Cricket.Form1.resources
文件 38400 2008-01-18 02:37 WM50_Cricket\WM50_Cricket\obj\Release\WM50_Cricket.pdb
文件 180 2008-01-16 17:53 WM50_Cricket\WM50_Cricket\obj\Release\WM50_Cricket.Properties.Resources.resources
............此处省略10个文件信息
评论
共有 条评论