Removed up/down sorting feature
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jens True 2021-06-12 13:24:13 +02:00
parent 3a50cf3c38
commit dd53acc6f5
2 changed files with 0 additions and 103 deletions

@ -36,9 +36,6 @@
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.txtDebug = new System.Windows.Forms.TextBox(); this.txtDebug = new System.Windows.Forms.TextBox();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.btnEditList = new System.Windows.Forms.Button();
this.btnMoveUp = new System.Windows.Forms.Button();
this.btnMoveDown = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.checkStartProcedure = new System.Windows.Forms.CheckBox(); this.checkStartProcedure = new System.Windows.Forms.CheckBox();
this.btnAutoStart = new System.Windows.Forms.Button(); this.btnAutoStart = new System.Windows.Forms.Button();
@ -56,7 +53,6 @@
this.lblClock = new System.Windows.Forms.Label(); this.lblClock = new System.Windows.Forms.Label();
this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.entryBindingSource = new System.Windows.Forms.BindingSource(this.components); this.entryBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.panel2.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.grid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.grid)).BeginInit();
this.txtLog.SuspendLayout(); this.txtLog.SuspendLayout();
@ -104,50 +100,12 @@
// //
// panel2 // panel2
// //
this.panel2.Controls.Add(this.btnEditList);
this.panel2.Controls.Add(this.btnMoveUp);
this.panel2.Controls.Add(this.btnMoveDown);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(3, 72); this.panel2.Location = new System.Drawing.Point(3, 72);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(194, 479); this.panel2.Size = new System.Drawing.Size(194, 479);
this.panel2.TabIndex = 9; this.panel2.TabIndex = 9;
// //
// btnEditList
//
this.btnEditList.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F);
this.btnEditList.Location = new System.Drawing.Point(0, 3);
this.btnEditList.Name = "btnEditList";
this.btnEditList.Size = new System.Drawing.Size(185, 37);
this.btnEditList.TabIndex = 3;
this.btnEditList.Text = "Rediger ";
this.btnEditList.UseVisualStyleBackColor = true;
this.btnEditList.Click += new System.EventHandler(this.btnEditList_Click);
//
// btnMoveUp
//
this.btnMoveUp.Enabled = false;
this.btnMoveUp.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F);
this.btnMoveUp.Location = new System.Drawing.Point(0, 46);
this.btnMoveUp.Name = "btnMoveUp";
this.btnMoveUp.Size = new System.Drawing.Size(185, 37);
this.btnMoveUp.TabIndex = 1;
this.btnMoveUp.Text = "Op";
this.btnMoveUp.UseVisualStyleBackColor = true;
this.btnMoveUp.Click += new System.EventHandler(this.btnMoveUp_Click);
//
// btnMoveDown
//
this.btnMoveDown.Enabled = false;
this.btnMoveDown.Font = new System.Drawing.Font("Microsoft Sans Serif", 18.25F);
this.btnMoveDown.Location = new System.Drawing.Point(0, 89);
this.btnMoveDown.Name = "btnMoveDown";
this.btnMoveDown.Size = new System.Drawing.Size(185, 37);
this.btnMoveDown.TabIndex = 2;
this.btnMoveDown.Text = "Ned";
this.btnMoveDown.UseVisualStyleBackColor = true;
this.btnMoveDown.Click += new System.EventHandler(this.btnMoveDown_Click);
//
// panel1 // panel1
// //
this.panel1.Controls.Add(this.checkStartProcedure); this.panel1.Controls.Add(this.checkStartProcedure);
@ -333,7 +291,6 @@
this.lblClock.TabIndex = 16; this.lblClock.TabIndex = 16;
this.lblClock.Text = "--:--:--"; this.lblClock.Text = "--:--:--";
this.lblClock.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblClock.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblClock.Click += new System.EventHandler(this.lblClock_Click);
// //
// nameDataGridViewTextBoxColumn // nameDataGridViewTextBoxColumn
// //
@ -361,7 +318,6 @@
this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.HelpButtonClicked += new System.ComponentModel.CancelEventHandler(this.Form1_HelpButtonClicked); this.HelpButtonClicked += new System.ComponentModel.CancelEventHandler(this.Form1_HelpButtonClicked);
this.Load += new System.EventHandler(this.Form1_Load); this.Load += new System.EventHandler(this.Form1_Load);
this.panel2.ResumeLayout(false);
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.panel1.PerformLayout(); this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.grid)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.grid)).EndInit();
@ -382,8 +338,6 @@
private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox txtDebug; private System.Windows.Forms.TextBox txtDebug;
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button btnMoveUp;
private System.Windows.Forms.Button btnMoveDown;
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button btnAutoStart; private System.Windows.Forms.Button btnAutoStart;
private System.Windows.Forms.Button btnStop; private System.Windows.Forms.Button btnStop;
@ -392,7 +346,6 @@
private System.Windows.Forms.TableLayoutPanel txtLog; private System.Windows.Forms.TableLayoutPanel txtLog;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.ComboBox comboSoundTime; private System.Windows.Forms.ComboBox comboSoundTime;
private System.Windows.Forms.Button btnEditList;
private System.Windows.Forms.DataGridViewButtonColumn Complete; private System.Windows.Forms.DataGridViewButtonColumn Complete;
private System.Windows.Forms.DataGridViewTextBoxColumn nameDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn nameDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewButtonColumn DNF; private System.Windows.Forms.DataGridViewButtonColumn DNF;

@ -72,9 +72,6 @@ namespace Tidstagning
if (!btnStop.Enabled) if (!btnStop.Enabled)
return; return;
if (btnMoveUp.Enabled)
return;
if (e.RowIndex >= 0 && e.ColumnIndex == grid.Columns["DNF"].Index) if (e.RowIndex >= 0 && e.ColumnIndex == grid.Columns["DNF"].Index)
{ {
entries[e.RowIndex].DNF(); entries[e.RowIndex].DNF();
@ -101,42 +98,10 @@ namespace Tidstagning
} }
private void btnMoveUp_Click(object sender, EventArgs e)
{
if (grid.SelectedRows.Count == 1)
{
int idx = grid.SelectedRows[0].Index;
if (idx == 0)
return;
Entry entry = entries[idx];
entries.Remove(entry);
entries.Insert(idx - 1, entry);
grid.ClearSelection();
grid.Rows[idx - 1].Selected = true;
}
}
private void btnMoveDown_Click(object sender, EventArgs e)
{
if (grid.SelectedRows.Count == 1)
{
int idx = grid.SelectedRows[0].Index;
if (idx == grid.Rows.Count - 1 )
return;
Entry entry = entries[idx];
entries.Remove(entry);
entries.Insert(idx + 1, entry);
grid.ClearSelection();
grid.Rows[idx + 1].Selected = true;
}
}
private void btnAutoStart_Click(object sender, EventArgs e) private void btnAutoStart_Click(object sender, EventArgs e)
{ {
if (txtHeader.Text == "") if (txtHeader.Text == "")
{ {
MessageBox.Show("Udfyld løbs titel"); MessageBox.Show("Udfyld løbs titel");
return; return;
} }
@ -215,30 +180,9 @@ namespace Tidstagning
countdowntimer.Start(); countdowntimer.Start();
} }
private void btnEditList_Click(object sender, EventArgs e)
{
if (btnMoveUp.Enabled)
{
btnEditList.Text = "Rediger";
btnMoveUp.Enabled = false;
btnMoveDown.Enabled = false;
}
else
{
btnEditList.Text = "Aktiv";
btnMoveUp.Enabled = true;
btnMoveDown.Enabled = true;
}
}
private void Clock_Tick(object sender, EventArgs e) private void Clock_Tick(object sender, EventArgs e)
{ {
lblClock.Text = DateTime.Now.ToString("HH:mm:ss"); lblClock.Text = DateTime.Now.ToString("HH:mm:ss");
} }
private void lblClock_Click(object sender, EventArgs e)
{
}
} }
} }