radar chart와 map 화면 동시에 띄워놓고 더블클릭했을 때 반영되도록 수정
This commit is contained in:
@@ -58,6 +58,7 @@ namespace friction
|
||||
|
||||
string m_strCurSpring = "";
|
||||
string m_strCurTable = "";
|
||||
string m_strPrevTable = "";
|
||||
|
||||
List<string> m_ColumnsNames = new List<string>();
|
||||
List<string> m_ActiveColumns = new List<string>();
|
||||
@@ -144,6 +145,7 @@ namespace friction
|
||||
|
||||
m_TableList = (from r in m_Data.AsEnumerable()
|
||||
select r[Config.COLUMN_NAME.TABLE]).Distinct().Cast<string>().ToList();
|
||||
m_strPrevTable = m_TableList[0];
|
||||
|
||||
m_ColumnsNames = (from c in m_Data.Columns.Cast<DataColumn>()
|
||||
select c.ColumnName).ToList<string>();
|
||||
@@ -172,6 +174,7 @@ namespace friction
|
||||
public void SetSelectedMaterial(string strSpring, string strTable)
|
||||
{
|
||||
m_strCurSpring = strSpring;
|
||||
m_strPrevTable = m_strCurTable;
|
||||
m_strCurTable = strTable;
|
||||
}
|
||||
|
||||
@@ -282,7 +285,7 @@ namespace friction
|
||||
string strQuery = string.Format("[{0}]='{1}' and [{2}]='{3}'", Config.COLUMN_NAME.SPRING, strSpring, Config.COLUMN_NAME.TABLE, strTable);
|
||||
DataRow[] rows = m_Data.Select(strQuery);
|
||||
|
||||
if(rows.Length > 0)
|
||||
if (rows.Length > 0)
|
||||
{
|
||||
result.m_iCnt = rows.Length;
|
||||
result.m_fAvgRPN = rows.Average(r => (float)r[Config.COLUMN_NAME.RPN]);
|
||||
@@ -299,8 +302,6 @@ namespace friction
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
#endregion
|
||||
@@ -327,6 +328,11 @@ namespace friction
|
||||
return m_SpringList;
|
||||
}
|
||||
|
||||
public string GetPrevTable()
|
||||
{
|
||||
return m_strPrevTable;
|
||||
}
|
||||
|
||||
public List<string> GetTableList()
|
||||
{
|
||||
return m_TableList;
|
||||
|
||||
22
MainForm.cs
22
MainForm.cs
@@ -197,7 +197,7 @@ namespace friction
|
||||
private void trendGraphToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (m_DataHandler.GetCurTable() == "All")
|
||||
OnApplyData(this, m_DataHandler.GetCurSpring(), m_DataHandler.GetTableList()[0]);
|
||||
OnApplyData(this, m_DataHandler.GetCurSpring(), m_DataHandler.GetPrevTable());
|
||||
|
||||
OpenPanel(m_TrendGraphPanel);
|
||||
m_TrendGraphPanel.UpdateGraph();
|
||||
@@ -232,7 +232,7 @@ namespace friction
|
||||
if(m_DataHandler.GetCurTable() != "" && m_DataHandler.GetCurTable() != "All")
|
||||
{
|
||||
if (m_DataHandler.GetCurTable() == "All")
|
||||
OnApplyData(this, m_DataHandler.GetCurSpring(), m_DataHandler.GetTableList()[0]);
|
||||
OnApplyData(this, m_DataHandler.GetCurSpring(), m_DataHandler.GetPrevTable());
|
||||
|
||||
OpenPanel(m_TrendGraphPanel);
|
||||
m_TrendGraphPanel.CopyChart(PanelTrendGraph.GRAPH_TYPE.HUMIDITY);
|
||||
@@ -323,10 +323,8 @@ namespace friction
|
||||
if (m_DataHandler.GetCurTable() == "All")
|
||||
{
|
||||
string strSpring = m_DataHandler.GetCurSpring();
|
||||
List<string> tableList = m_DataHandler.GetTableList();
|
||||
|
||||
if(tableList.Count > 0)
|
||||
OnApplyData(this, strSpring, tableList[0]);
|
||||
string strTable = m_DataHandler.GetPrevTable();
|
||||
OnApplyData(this, strSpring, strTable);
|
||||
}
|
||||
|
||||
OpenPanel(m_TrendGraphPanel);
|
||||
@@ -352,6 +350,12 @@ namespace friction
|
||||
{
|
||||
if (m_TrendGraphPanel != null)
|
||||
m_TrendGraphPanel.UpdateGraph();
|
||||
|
||||
if (m_RadarGraphPanel != null && m_RadarGraphPanel.Visible == true)
|
||||
{
|
||||
OnApplyData(this, strSpring, "All");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (sender != m_MaterialPanel)
|
||||
@@ -550,11 +554,7 @@ namespace friction
|
||||
public void OnTrendGraphActivated()
|
||||
{
|
||||
if (m_DataHandler.GetCurTable() == "All")
|
||||
{
|
||||
List<string> tableList = m_DataHandler.GetTableList();
|
||||
if(tableList.Count > 0)
|
||||
OnApplyData(this, m_DataHandler.GetCurSpring(), tableList[1]);
|
||||
}
|
||||
OnApplyData(this, m_DataHandler.GetCurSpring(), m_DataHandler.GetPrevTable());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user