added orai, TODO: stopwatch

This commit is contained in:
szabomarton
2024-03-11 10:54:11 +01:00
parent b610fd6dcd
commit a2430c2cd9
28 changed files with 780 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
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 WindowsFormsApp1
{
public partial class Form1 : Form
{
DateTime start = new DateTime();
DateTime stop = new DateTime();
TimeSpan duration = new TimeSpan();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
start = DateTime.Now;
timer1.Enabled = true;
button1.Enabled = false;
}
private void button2_Click(object sender, EventArgs e)
{
stop = DateTime.Now;
duration = stop - start;
label1.Text = duration.ToString();
timer1.Enabled = false;
button1.Enabled = true;
}
private void label1_Click(object sender, EventArgs e)
{
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
textBox1.Text = DateTime.Now.ToString("HH:mm:ss:fff");
}
}
}