More cleanup
This commit is contained in:
@ -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);
|
||||
@ -84,8 +83,7 @@ namespace Tidstagning
|
||||
if (e.RowIndex >= 0 && e.ColumnIndex == grid.Columns["Complete"].Index) {
|
||||
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;
|
||||
|
Reference in New Issue
Block a user