دانلود سورس کد کرنومتر با سی شارپ #C

دانلود سورس کد کرنومتر با سی شارپ #C
در این سورس کد که با زبان #C نوشته شده است برنامه یک کرنومتر جالب زمان سنج را میتوانید ببینید.
در این پروژه سی شارپ میتوان درست مثل یک کرنومتر معمولی (stopwatch) کار کرد. با کلیک روی دکمه "start" زمان سنج شروع به کار میکند و میتوان آن را "pause" و یا "stop" کرد. با استفاده از دکمه " New Level" میتوان زمان را ثبت کرد.
برنامه اصلی کرنومتر در سی شارپ #c را می توانید در پایین صفحه دانلود کنید.
سورس کد برنامه که می توانید در صورت لزوم در پروژه هایتان در هر نسحه ویژوال استودیو از آن استفاده کنید:
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;
namespace Stopwatch
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
textBox1.Text = (Int32.Parse(textBox1.Text) + 1).ToString();
if (Int32.Parse(textBox1.Text) > 59)
{
textBox2.Text = (Int32.Parse(textBox2.Text) + 1).ToString();
textBox1.Text = "0";
}
if (Int32.Parse(textBox2.Text) > 59)
{
textBox3.Text = (Int32.Parse(textBox3.Text) + 1).ToString();
textBox2.Text = "0";
}
if (Int32.Parse(textBox3.Text) > 59)
{
textBox4.Text = (Int32.Parse(textBox4.Text) + 1).ToString();
textBox3.Text = "0";
}
}
private void button1_Click(object sender, EventArgs e)
{
timer1.Enabled = true;
}
private void button2_Click(object sender, EventArgs e)
{
timer1.Enabled = false;
}
private void button3_Click(object sender, EventArgs e)
{
timer1.Enabled = false;
textBox1.Text = "0";
textBox2.Text = "0";
textBox3.Text = "0";
textBox4.Text = "0";
listBox1.Items.Clear();
}
private void button4_Click(object sender, EventArgs e)
{
listBox1.Items.Add(textBox4.Text + ":" + textBox3.Text + ":" + textBox2.Text + ":" + textBox1.Text);
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button5_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://WWw.SourceCodes.ir");
}
}
}
سورس پروژه کرنومتر در سی شارپ #c را به صورت رایگان دانلود کنید
حجم فایل :84 KB