More cleanup

This commit is contained in:
Jens True 2020-08-06 21:39:34 +02:00
parent 49a0604aef
commit 36e6129bf7
2 changed files with 5 additions and 16 deletions

@ -65,7 +65,7 @@ namespace Tidstagning
private void grid_Click(object sender, DataGridViewCellEventArgs e)
{
if (btnStop.Enabled != true)
if (!btnStop.Enabled)
return;
if (btnMoveUp.Enabled)
@ -76,7 +76,6 @@ namespace Tidstagning
entries[e.RowIndex].DNF();
liste.WriteDNF(entries[e.RowIndex]);
int index = e.RowIndex;
grid.ClearSelection();
grid.CurrentCell = null;
entries.RemoveAt(e.RowIndex);
@ -85,7 +84,6 @@ namespace Tidstagning
entries[e.RowIndex].Complete();
liste.WriteComplete(entries[e.RowIndex]);
int index = e.RowIndex;
grid.ClearSelection();
grid.CurrentCell = null;
entries.RemoveAt(e.RowIndex);
@ -95,11 +93,8 @@ namespace Tidstagning
countdowntimer.Start();
}
//grid.
grid.Refresh();
}
private void btnMoveUp_Click(object sender, EventArgs e)
@ -158,7 +153,6 @@ namespace Tidstagning
private void btnStop_Click(object sender, EventArgs e)
{
//btnAutoStart.Enabled = true;
btnStop.Enabled = false;
horn.Close();
@ -208,7 +202,7 @@ namespace Tidstagning
private void btnTest_Click(object sender, EventArgs e)
{
if (btnStop.Enabled != true)
if (!btnStop.Enabled)
return;
horn.Set(0x00, 0x01);
@ -236,9 +230,5 @@ namespace Tidstagning
{
lblClock.Text = DateTime.Now.ToString("HH:mm:ss");
}
}
}

@ -17,13 +17,12 @@ namespace Tidstagning
string[] parts = parse.Split(',');
this.tid = TimeSpan.Parse(parts[0]);
this.Duration = Int32.Parse(parts[1]);
}
}
Relay horn;
ResultList log;
List<Signal> signaler;
readonly List<Signal> signaler;
Timer cooldownTimer;
Timer timer;
Int16 idx = 0;