- Material Pair에 layout 적용

- Trend Graph에 Force, Velocity 추가
This commit is contained in:
2017-06-23 14:59:08 +09:00
parent 244eab56a6
commit bc27de2ea5
12 changed files with 488 additions and 188 deletions

View File

@@ -4,7 +4,6 @@ using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -26,9 +25,6 @@ namespace friction
Theme.Apply(dgvData);
Theme.Apply(lvColumn);
typeof(DataGridView).InvokeMember("DoubleBuffered",
BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.SetProperty,
null, dgvData, new object[] { true });
dgvData.CellFormatting += DgvData_CellFormatting;
}
@@ -135,7 +131,48 @@ namespace friction
row.Selected = true;
dgvData.FirstDisplayedScrollingRowIndex = row.Index;
}
}
public void SelectRowByForce(string strSpring, string strTable, float fForce, float fRPN)
{
dgvData.ClearSelection();
DataGridViewRow row = dgvData.Rows
.Cast<DataGridViewRow>()
.Where(r =>
r.Cells[Config.COLUMN_NAME.SPRING].Value.Equals(strSpring) &&
r.Cells[Config.COLUMN_NAME.TABLE].Value.Equals(strTable) &&
r.Cells[Config.COLUMN_NAME.RPN].Value.Equals(fRPN) &&
r.Cells[Config.COLUMN_NAME.FORCE].Value.Equals(fForce)
)
.First();
if (row != null)
{
row.Selected = true;
dgvData.FirstDisplayedScrollingRowIndex = row.Index;
}
}
public void SelectRowByVelocity(string strSpring, string strTable, float fVelocity, float fRPN)
{
dgvData.ClearSelection();
DataGridViewRow row = dgvData.Rows
.Cast<DataGridViewRow>()
.Where(r =>
r.Cells[Config.COLUMN_NAME.SPRING].Value.Equals(strSpring) &&
r.Cells[Config.COLUMN_NAME.TABLE].Value.Equals(strTable) &&
r.Cells[Config.COLUMN_NAME.RPN].Value.Equals(fRPN) &&
r.Cells[Config.COLUMN_NAME.VELOCITY].Value.Equals(fVelocity)
)
.First();
if (row != null)
{
row.Selected = true;
dgvData.FirstDisplayedScrollingRowIndex = row.Index;
}
}
}
}