- 리포트 기능 추가(Trend Graph 제외)
- AboutBox 추가
This commit is contained in:
66
MainForm.cs
66
MainForm.cs
@@ -23,6 +23,8 @@ namespace friction
|
||||
PanelRadarGraph m_RadarGraphPanel = null;
|
||||
PanelTrendGraph m_TrendGraphPanel = null;
|
||||
|
||||
Report m_Report = null;
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -126,7 +128,7 @@ namespace friction
|
||||
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private void resultTableToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
@@ -157,10 +159,64 @@ namespace friction
|
||||
m_TrendGraphPanel.UpdateGraph();
|
||||
}
|
||||
|
||||
private void allToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog sfd = new SaveFileDialog();
|
||||
sfd.Filter = "엑셀 파일 (*.xlsx)|*.xlsx|엑셀 파일 (*.xls)|*.xls|전체|*";
|
||||
DialogResult result = sfd.ShowDialog();
|
||||
string strFilePath = "";
|
||||
if (result == DialogResult.OK)
|
||||
strFilePath = sfd.FileName;
|
||||
else
|
||||
return;
|
||||
|
||||
|
||||
|
||||
m_Report = new Report();
|
||||
m_Report.FilePath = strFilePath;
|
||||
m_Report.MaterialSpring = m_DataHandler.GetCurSpring();
|
||||
m_Report.MaterialTable = m_DataHandler.GetCurTable();
|
||||
m_Report.AnalysisData = m_AnalysisPanel.GetData();
|
||||
|
||||
m_Report.RadarChart = m_RadarGraphPanel.CopyChart();
|
||||
|
||||
m_Report.Export();
|
||||
|
||||
//OpenPanel(m_TrendGraphPanel);
|
||||
//m_TrendGraphPanel.CopyChart(PanelTrendGraph.GRAPH_TYPE.HUMIDITY);
|
||||
}
|
||||
|
||||
public void OnChartUpdate(Bitmap bm, PanelTrendGraph.GRAPH_TYPE Type)
|
||||
{
|
||||
switch(Type)
|
||||
{
|
||||
case PanelTrendGraph.GRAPH_TYPE.HUMIDITY:
|
||||
m_Report.TrendChartByHumidity = bm;
|
||||
m_TrendGraphPanel.CopyChart(PanelTrendGraph.GRAPH_TYPE.TEMPERATURE);
|
||||
break;
|
||||
|
||||
case PanelTrendGraph.GRAPH_TYPE.TEMPERATURE:
|
||||
m_Report.TrendChartByTemperature = bm;
|
||||
m_TrendGraphPanel.CopyChart(PanelTrendGraph.GRAPH_TYPE.FORCE);
|
||||
break;
|
||||
|
||||
case PanelTrendGraph.GRAPH_TYPE.FORCE:
|
||||
m_Report.TrendChartByForce = bm;
|
||||
m_TrendGraphPanel.CopyChart(PanelTrendGraph.GRAPH_TYPE.VELOCITY);
|
||||
break;
|
||||
|
||||
case PanelTrendGraph.GRAPH_TYPE.VELOCITY:
|
||||
m_Report.TrendChartByVelocity = bm;
|
||||
m_Report.Export();
|
||||
m_Report = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
//AboutWindow aboutWindow = new AboutWindow();
|
||||
//aboutWindow.Show();
|
||||
AboutBox aboutWindow = new AboutBox();
|
||||
aboutWindow.ShowDialog();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -209,6 +265,8 @@ namespace friction
|
||||
#region Events from panels
|
||||
public void OnApplyData(string strSpring, string strTable)
|
||||
{
|
||||
Console.WriteLine("[MainForm::OnApply] start");
|
||||
|
||||
m_DataHandler.SetSelectedMaterial(strSpring, strTable);
|
||||
|
||||
if (strTable == "All")
|
||||
@@ -231,6 +289,8 @@ namespace friction
|
||||
}
|
||||
|
||||
m_AnalysisPanel.UpdateData(m_DataHandler);
|
||||
|
||||
Console.WriteLine("[MainForm::OnApply] end");
|
||||
}
|
||||
|
||||
public void OnRadarSelectTable(string strTable)
|
||||
|
||||
Reference in New Issue
Block a user