资源简介
实现秒表的简单功能
代码片段和文件信息
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# 设备管理系统
- c#实现QQ聊天程序(源代码)(分服务
- C#小说阅读
- C#考勤管理系统完整源码[201903]
- 美萍餐饮管理系统,C#,C/S,WinForm,
- RDLC report view 微软的RDLC报表的入门和
- 万得Wind量化接口 C#(PPT和代码)
- C#电子相册
- C#酒店管理系统
- C# VS2010 员工信息管理系统
- C#版Instagram-Toaster滤镜Demo
- 通讯录系统设计C#语言开发
- c# winform超市进销存销售管理系统
- VS2015 Iocomp控件C#源代码和说明书.rar
- 《Visual C#项目开发自学手册》源码第
- 功能强大的C#远程控制软件整个项目代
- c#网络爬虫程序设计源码
- C#自制桌面备忘录自制日历
- DynamicDataDisplay绘图库文件以及说明文
- 一个简单的基于wifi的大棚温湿度监测
- Visual_C#_.NET程序设计教程第2版源代码
- c# Spire.Pdf.dll引用
- C# .NET完美车牌识别系统.
- .net网上成绩查询系统
- C#设备管理系统 机房管理系统
- C#官方中文手册
- C#毕业设计宾馆管理系统
- 记事本c# c#
评论
共有 条评论