More cleanup
This commit is contained in:
parent
49a0604aef
commit
36e6129bf7
@ -65,7 +65,7 @@ namespace Tidstagning
|
|||||||
|
|
||||||
private void grid_Click(object sender, DataGridViewCellEventArgs e)
|
private void grid_Click(object sender, DataGridViewCellEventArgs e)
|
||||||
{
|
{
|
||||||
if (btnStop.Enabled != true)
|
if (!btnStop.Enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (btnMoveUp.Enabled)
|
if (btnMoveUp.Enabled)
|
||||||
@ -76,7 +76,6 @@ namespace Tidstagning
|
|||||||
entries[e.RowIndex].DNF();
|
entries[e.RowIndex].DNF();
|
||||||
liste.WriteDNF(entries[e.RowIndex]);
|
liste.WriteDNF(entries[e.RowIndex]);
|
||||||
|
|
||||||
int index = e.RowIndex;
|
|
||||||
grid.ClearSelection();
|
grid.ClearSelection();
|
||||||
grid.CurrentCell = null;
|
grid.CurrentCell = null;
|
||||||
entries.RemoveAt(e.RowIndex);
|
entries.RemoveAt(e.RowIndex);
|
||||||
@ -84,8 +83,7 @@ namespace Tidstagning
|
|||||||
if (e.RowIndex >= 0 && e.ColumnIndex == grid.Columns["Complete"].Index) {
|
if (e.RowIndex >= 0 && e.ColumnIndex == grid.Columns["Complete"].Index) {
|
||||||
entries[e.RowIndex].Complete();
|
entries[e.RowIndex].Complete();
|
||||||
liste.WriteComplete(entries[e.RowIndex]);
|
liste.WriteComplete(entries[e.RowIndex]);
|
||||||
|
|
||||||
int index = e.RowIndex;
|
|
||||||
grid.ClearSelection();
|
grid.ClearSelection();
|
||||||
grid.CurrentCell = null;
|
grid.CurrentCell = null;
|
||||||
entries.RemoveAt(e.RowIndex);
|
entries.RemoveAt(e.RowIndex);
|
||||||
@ -95,11 +93,8 @@ namespace Tidstagning
|
|||||||
countdowntimer.Start();
|
countdowntimer.Start();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//grid.
|
|
||||||
grid.Refresh();
|
grid.Refresh();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnMoveUp_Click(object sender, EventArgs e)
|
private void btnMoveUp_Click(object sender, EventArgs e)
|
||||||
@ -158,7 +153,6 @@ namespace Tidstagning
|
|||||||
|
|
||||||
private void btnStop_Click(object sender, EventArgs e)
|
private void btnStop_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//btnAutoStart.Enabled = true;
|
|
||||||
btnStop.Enabled = false;
|
btnStop.Enabled = false;
|
||||||
|
|
||||||
horn.Close();
|
horn.Close();
|
||||||
@ -208,7 +202,7 @@ namespace Tidstagning
|
|||||||
|
|
||||||
private void btnTest_Click(object sender, EventArgs e)
|
private void btnTest_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (btnStop.Enabled != true)
|
if (!btnStop.Enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
horn.Set(0x00, 0x01);
|
horn.Set(0x00, 0x01);
|
||||||
@ -236,9 +230,5 @@ namespace Tidstagning
|
|||||||
{
|
{
|
||||||
lblClock.Text = DateTime.Now.ToString("HH:mm:ss");
|
lblClock.Text = DateTime.Now.ToString("HH:mm:ss");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,13 +17,12 @@ namespace Tidstagning
|
|||||||
string[] parts = parse.Split(',');
|
string[] parts = parse.Split(',');
|
||||||
this.tid = TimeSpan.Parse(parts[0]);
|
this.tid = TimeSpan.Parse(parts[0]);
|
||||||
this.Duration = Int32.Parse(parts[1]);
|
this.Duration = Int32.Parse(parts[1]);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Relay horn;
|
Relay horn;
|
||||||
ResultList log;
|
ResultList log;
|
||||||
List<Signal> signaler;
|
readonly List<Signal> signaler;
|
||||||
Timer cooldownTimer;
|
Timer cooldownTimer;
|
||||||
Timer timer;
|
Timer timer;
|
||||||
Int16 idx = 0;
|
Int16 idx = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user