fixed stopwatch

This commit is contained in:
Digi
2024-03-17 19:54:30 +01:00
parent b6df6a1a66
commit a6d8fda3ac
16 changed files with 25 additions and 130 deletions

View File

@@ -10,10 +10,6 @@ using System.Windows.Forms;
namespace WindowsFormsApp1
{
public static class Data
{
public static List<TimeSpan> idok = new List<TimeSpan>();
}
public partial class Form1 : Form
{
DateTime start = new DateTime();
@@ -43,22 +39,21 @@ namespace WindowsFormsApp1
{
stop = DateTime.Now;
duration = stop - start;
label1.Text = duration.ToString();
timer1.Enabled = false;
button1.Enabled = true;
timer2.Stop();
Data.idok.Append(currSpan);
//Data.lasttime = currSpan.ToString();
Data.data.Add(currSpan.ToString());
label2.Text = "";
foreach (var item in Data.idok)
foreach (var item in Data.data)
{
string asd = item.ToString();
label2.Text = label2.Text + asd;
label2.Text += $"{item}\n";
}
//label2.Text = Data.lasttime;
}
private void label1_Click(object sender, EventArgs e)
@@ -94,5 +89,12 @@ namespace WindowsFormsApp1
{
}
public static class Data
{
public static string lasttime = "";
public static List<string> data = new List<string>();
}
}
}