MaterialPair 창에서 엔터로 선택, 스페이스로 체크

This commit is contained in:
2017-08-10 00:59:01 +09:00
parent 9be9aa439a
commit 0d24b2d2d3
2 changed files with 62 additions and 48 deletions

View File

@@ -32,11 +32,11 @@
this.lbFileName = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.lvSpring = new NoDoubleClickAutoCheckListview();
this.lvchSpring = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lvTable = new NoDoubleClickAutoCheckListview();
this.lvchTable = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.lvTable = new friction.NoDoubleClickAutoCheckListview();
this.lvchTable = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lvSpring = new friction.NoDoubleClickAutoCheckListview();
this.lvchSpring = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
@@ -69,50 +69,6 @@
this.label3.TabIndex = 6;
this.label3.Text = "Material Table";
//
// lvSpring
//
this.lvSpring.CheckBoxes = true;
this.lvSpring.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.lvchSpring});
this.lvSpring.Dock = System.Windows.Forms.DockStyle.Fill;
this.lvSpring.FullRowSelect = true;
this.lvSpring.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.lvSpring.Location = new System.Drawing.Point(3, 58);
this.lvSpring.Name = "lvSpring";
this.lvSpring.Size = new System.Drawing.Size(292, 320);
this.lvSpring.TabIndex = 7;
this.lvSpring.UseCompatibleStateImageBehavior = false;
this.lvSpring.View = System.Windows.Forms.View.Details;
this.lvSpring.SizeChanged += new System.EventHandler(this.lvSpring_SizeChanged);
this.lvSpring.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lvSpring_MouseDoubleClick);
//
// lvchSpring
//
this.lvchSpring.Text = "Material Spring";
this.lvchSpring.Width = 308;
//
// lvTable
//
this.lvTable.CheckBoxes = true;
this.lvTable.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.lvchTable});
this.lvTable.Dock = System.Windows.Forms.DockStyle.Fill;
this.lvTable.FullRowSelect = true;
this.lvTable.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.lvTable.Location = new System.Drawing.Point(3, 404);
this.lvTable.Name = "lvTable";
this.lvTable.Size = new System.Drawing.Size(292, 320);
this.lvTable.TabIndex = 8;
this.lvTable.UseCompatibleStateImageBehavior = false;
this.lvTable.View = System.Windows.Forms.View.Details;
this.lvTable.SizeChanged += new System.EventHandler(this.lvTable_SizeChanged);
this.lvTable.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lvTable_MouseDoubleClick);
//
// lvchTable
//
this.lvchTable.Text = "Table";
this.lvchTable.Width = 305;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
@@ -134,6 +90,52 @@
this.tableLayoutPanel1.Size = new System.Drawing.Size(298, 727);
this.tableLayoutPanel1.TabIndex = 9;
//
// lvTable
//
this.lvTable.CheckBoxes = true;
this.lvTable.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.lvchTable});
this.lvTable.Dock = System.Windows.Forms.DockStyle.Fill;
this.lvTable.FullRowSelect = true;
this.lvTable.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.lvTable.Location = new System.Drawing.Point(3, 404);
this.lvTable.Name = "lvTable";
this.lvTable.Size = new System.Drawing.Size(292, 320);
this.lvTable.TabIndex = 8;
this.lvTable.UseCompatibleStateImageBehavior = false;
this.lvTable.View = System.Windows.Forms.View.Details;
this.lvTable.SizeChanged += new System.EventHandler(this.lvTable_SizeChanged);
this.lvTable.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lvTable_KeyDown);
this.lvTable.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lvTable_MouseDoubleClick);
//
// lvchTable
//
this.lvchTable.Text = "Table";
this.lvchTable.Width = 305;
//
// lvSpring
//
this.lvSpring.CheckBoxes = true;
this.lvSpring.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.lvchSpring});
this.lvSpring.Dock = System.Windows.Forms.DockStyle.Fill;
this.lvSpring.FullRowSelect = true;
this.lvSpring.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.lvSpring.Location = new System.Drawing.Point(3, 58);
this.lvSpring.Name = "lvSpring";
this.lvSpring.Size = new System.Drawing.Size(292, 320);
this.lvSpring.TabIndex = 7;
this.lvSpring.UseCompatibleStateImageBehavior = false;
this.lvSpring.View = System.Windows.Forms.View.Details;
this.lvSpring.SizeChanged += new System.EventHandler(this.lvSpring_SizeChanged);
this.lvSpring.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lvSpring_KeyDown);
this.lvSpring.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lvSpring_MouseDoubleClick);
//
// lvchSpring
//
this.lvchSpring.Text = "Material Spring";
this.lvchSpring.Width = 308;
//
// PanelMaterial
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);

View File

@@ -164,6 +164,18 @@ namespace friction
return Compare(x as ListViewItem, y as ListViewItem);
}
}
private void lvSpring_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
SelectSpring(lvSpring.SelectedIndices[0]);
}
private void lvTable_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
SelectTable(lvTable.SelectedIndices[0]);
}
}