资源简介
gps授时校时系统,需要gps模块支持。

代码片段和文件信息
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 System.IO.Ports;
using System.Runtime.InteropServices;
using System.Threading;
namespace gps授时
{
public partial class 时钟芯片授时校验系统 : Form
{
static SerialPort sp = new SerialPort();
static SerialPort sp1 = new SerialPort();
string indata = “2001-01-01 00:00:00“;
string indata1 = “无GPS信号,请检查!“;
string indata2 = “2001-01-01 00:00:00.000“;
string indata3 = “2001-01-01 00:00:00.000“;
string indata4 = “2001-01-01 00:00:00“;
TimeSpan wucha;
TimeSpan shicha;
bool z = false;
bool s = false;
//调用Kernel32.DLL
[DllImport(“Kernel32.dll“)]
public static extern void GetLocalTime(SystemTime st);
[DllImport(“Kernel32.dll“)]
public static extern void SetLocalTime(SystemTime st);
[StructLayout(LayoutKind.Sequential)]
public class SystemTime
{
public ushort wYear;
public ushort wMonth;
public ushort wDayOfWeek;
public ushort wDay;
public ushort Whour;
public ushort wMinute;
public ushort wSecond;
public ushort wMilliseconds;
}
public 时钟芯片授时校验系统()
{
InitializeComponent();
this.FormClosing += new FormClosingEventHandler(Form1_FormClosing);
comboBox1.Enabled = false;
comboBox2.Enabled = false;
dateTimePicker1.Enabled = false;
button2.Enabled = false;
button3.Enabled = false;
button4.Enabled = false;
button5.Enabled = false;
button7.Enabled = false;
button8.Enabled = false;
}
private void button1_Click(object sender EventArgs e)
{
string[] ports = SerialPort.GetPortNames();
comboBox1.Items.Clear();
comboBox2.Items.Clear();
foreach (string port in ports)
{
comboBox1.Items.Add(port);
comboBox2.Items.Add(port);
}
comboBox1.Enabled = true;
comboBox2.Enabled = true;
dateTimePicker1.Enabled = false;
button2.Enabled = false;
button3.Enabled = false;
button4.Enabled = false;
button5.Enabled = false;
}
private void comboBox1_SelectedIndexChanged(object sender EventArgs e)
{
// Allow the user to set the appropriate properties.
sp.Close();
sp.PortName = comboBox1.Text;
sp.BaudRate = 115200;
sp.Parity = Parity.None;
sp.DataBits = 8;
sp.StopBits = StopBits.One;
sp.Handsh
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 225280 2012-11-01 23:15 gps授时\gps授时\bin\Debug\gps授时.exe
文件 32256 2012-11-01 23:15 gps授时\gps授时\bin\Debug\gps授时.pdb
文件 11600 2012-11-01 23:14 gps授时\gps授时\bin\Debug\gps授时.vshost.exe
文件 2423 2012-11-01 20:45 gps授时\gps授时\bin\Debug\gps授时.vshost.exe.manifest
文件 1 2012-10-31 20:58 gps授时\gps授时\ClassDiagram1.cd
文件 99678 2012-11-01 20:42 gps授时\gps授时\Clock.ico
文件 14114 2012-11-01 23:10 gps授时\gps授时\Form1.cs
文件 30123 2012-11-01 23:06 gps授时\gps授时\Form1.Designer.cs
文件 156426 2012-11-01 22:35 gps授时\gps授时\Form1.resx
文件 5930 2012-11-01 20:45 gps授时\gps授时\gps授时.csproj
文件 523 2012-10-31 21:06 gps授时\gps授时\gps授时.csproj.user
文件 5420 2012-11-01 12:03 gps授时\gps授时\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6494 2012-11-01 23:17 gps授时\gps授时\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 565 2012-11-01 23:17 gps授时\gps授时\obj\x86\Debug\gps授时.csproj.FileListAbsolute.txt
文件 975 2012-11-01 23:15 gps授时\gps授时\obj\x86\Debug\gps授时.csproj.GenerateResource.Cache
文件 225280 2012-11-01 23:15 gps授时\gps授时\obj\x86\Debug\gps授时.exe
文件 32256 2012-11-01 23:15 gps授时\gps授时\obj\x86\Debug\gps授时.pdb
文件 180 2012-11-01 23:15 gps授时\gps授时\obj\x86\Debug\gps授时.Properties.Resources.resources
文件 100244 2012-11-01 23:15 gps授时\gps授时\obj\x86\Debug\gps授时.时钟芯片授时校验系统.resources
文件 515 2012-10-31 22:04 gps授时\gps授时\Program.cs
文件 2423 2012-11-01 20:45 gps授时\gps授时\Properties\app.manifest
文件 1350 2012-10-31 20:53 gps授时\gps授时\Properties\AssemblyInfo.cs
文件 2870 2012-10-31 20:53 gps授时\gps授时\Properties\Resources.Designer.cs
文件 5612 2012-10-31 20:53 gps授时\gps授时\Properties\Resources.resx
文件 1096 2012-10-31 20:53 gps授时\gps授时\Properties\Settings.Designer.cs
文件 249 2012-10-31 20:53 gps授时\gps授时\Properties\Settings.settings
文件 869 2012-10-31 20:53 gps授时\gps授时.sln
..A..H. 24064 2012-11-01 23:18 gps授时\gps授时.suo
..A..H. 44032 2012-11-01 17:10 gps授时\gps授时.v11.suo
目录 0 2012-10-31 20:53 gps授时\gps授时\obj\x86\Debug\TempPE
............此处省略11个文件信息
相关资源
- 武汉大学 科傻GPS 静态后处理软件
- 开源的nmealib
- 相干与非相干实现捕获与跟踪GPS
- 天文钟GPS对时程序
- 用切比雪夫多项式标准化GPS卫星轨道
- 起算点点位不同对GPS-RTK测高的影响
- GPS-RTK技术在公婆泉矿区详查中的应用
-
A web-ba
sed interview platform with geospat - 根据GPS数据计算航向公式
- Excel在GPS坐标转换计算中的应用
- GPS-RTK技术及EPSW全息测绘软件在沉陷治
- 基于GPS数据的露天矿道路网自动提取
- 基于GPS-RTK与全站仪的城市道路改扩建
- GPS-RTK、全站仪联合作业在化石沟铜矿
- 基于GPS一机多天线技术的尾矿坝全自
- GPS技术在山区边坡监测中的应用
- GPS-RTK与全站仪联合作业在山谷型采石
- 论变形监测技术的现状与发展趋势
- GPS技术在大采深采区建筑物变形监测
- 探讨GPS技术在地形复杂矿山变形监测
- 全球地名地址及GPS坐标数据库
- 工作/生活照片归档管理/Exif查看器/
- gps程序、算法
- STM32+陀螺仪+GPS代码
- 基于单片机的GPS定位及显示系统设计
- GPS模拟仿真GPS卫星定位模拟仿真
- GPS数据转换X.Y坐标
- 伊敏露天矿三期卡车调度系统应用效
- STM32+BC20通过HTTP传输GPS北斗定位到湖畔
- NemaStudio1.36 NMEA模拟工具软件最新+注册
评论
共有 条评论