资源简介
实现秒表的简单功能

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender EventArgs e)
{
}
System.Diagnostics.Stopwatch sw;
private void button2_Click(object sender EventArgs e)
{
sw.Start();
timer1.Start();
}
private void button1_Click(object sender EventArgs e)
{
sw = new System.Diagnostics.Stopwatch();
sw.Start();
timer1.Start();
}
private void timer1_Tick(object sender EventArgs e)
{
TimeSpan ts = sw.Elapsed;
label.Text = string.Format(“{0}日:{1}时:{2}分:{3}秒:{4}毫秒“ ts.Days ts.Hours ts.Minutes ts.Seconds ts.Milliseconds / 10);
}
private void button3_Click(object sender EventArgs e)
{
string[] sMystring;
OpenFileDialog ofdMyofd = new OpenFileDialog();
// ofdMyofd.FileName = “Please Select Picture“;
ofdMyofd.Filter = “b.jpg|*.*“;
if (ofdMyofd.ShowDialog() == DialogResult.OK)
{
sMystring = ofdMyofd.FileNames;
this.BackgroundImage = Image.FromFile(sMystring[0]);
}
}
private void label1_Click(object sender EventArgs e)
{
}
private void button4_Click(object sender EventArgs e)
{
sw.Stop();
TimeSpan ts = sw.Elapsed;
label.Text = string.Format(“{0}日:{1}时:{2}分:{3}秒:{4}毫秒“ ts.Days ts.Hours ts.Minutes ts.Seconds ts.Milliseconds / 10);
}
private void textBox1_TextChanged(object sender EventArgs e)
{
}
private void button5_Click(object sender EventArgs e)
{
listBox1.Items.Add(label.Text);
// this.listBox1.SelectedIndex = this.listBox1.Items.Count - 1;
// this.listBox1.SelectedIndex = -1;
}
private void listBox1_SelectedIndexChanged(object sender EventArgs e)
{
}
private void label1_Click_1(object sender EventArgs e)
{
}
private void button6_Click(object sender EventArgs e)
{
label.Text = “00:00:00“;
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-05-04 19:14 WindowsFormsApplication2\
目录 0 2017-05-04 19:15 WindowsFormsApplication2\WindowsFormsApplication2\
文件 962 2017-05-04 19:14 WindowsFormsApplication2\WindowsFormsApplication2.sln
文件 39936 2017-05-05 21:30 WindowsFormsApplication2\WindowsFormsApplication2.v11.suo
文件 189 2017-05-04 19:14 WindowsFormsApplication2\WindowsFormsApplication2\App.config
目录 0 2017-05-04 19:14 WindowsFormsApplication2\WindowsFormsApplication2\bin\
目录 0 2017-05-04 19:30 WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\
文件 1298944 2017-05-04 20:47 WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.exe
文件 189 2017-05-04 19:14 WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.exe.config
文件 30208 2017-05-04 20:47 WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.pdb
文件 22984 2017-05-06 11:30 WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe
文件 189 2017-05-04 19:14 WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe.config
文件 490 2013-06-18 20:28 WindowsFormsApplication2\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe.manifest
文件 2714 2017-05-04 20:47 WindowsFormsApplication2\WindowsFormsApplication2\Form1.cs
文件 9972 2017-05-04 20:47 WindowsFormsApplication2\WindowsFormsApplication2\Form1.Designer.cs
文件 1934870 2017-05-04 20:47 WindowsFormsApplication2\WindowsFormsApplication2\Form1.resx
目录 0 2017-05-04 19:14 WindowsFormsApplication2\WindowsFormsApplication2\obj\
目录 0 2017-05-05 21:25 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\
文件 1318 2017-05-05 21:25 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 7247 2017-05-04 19:15 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 0 2017-05-04 19:14 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
文件 0 2017-05-04 19:14 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
文件 0 2017-05-04 19:14 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
目录 0 2017-05-04 19:14 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\TempPE\
文件 1374 2017-05-06 11:30 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\WindowsFormsApplication2.csproj.FileListAbsolute.txt
文件 975 2017-05-04 20:47 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\WindowsFormsApplication2.csproj.GenerateResource.Cache
文件 2231 2017-05-04 19:29 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\WindowsFormsApplication2.csprojResolveAssemblyReference.cache
文件 1298944 2017-05-04 20:47 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\WindowsFormsApplication2.exe
文件 1286028 2017-05-04 20:47 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\WindowsFormsApplication2.Form1.resources
文件 30208 2017-05-04 20:47 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\WindowsFormsApplication2.pdb
文件 180 2017-05-04 19:29 WindowsFormsApplication2\WindowsFormsApplication2\obj\Debug\WindowsFormsApplication2.Properties.Resources.resources
............此处省略8个文件信息
- 上一篇:温度采集与控制系统上位机和下位机源工程文件
- 下一篇:网上书店 asp.net
相关资源
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
- C#指纹识别系统程序 报告
评论
共有 条评论