fixed stopwatch
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user