- 리포트 기능 추가(Trend Graph 제외)
- AboutBox 추가
This commit is contained in:
@@ -13,6 +13,7 @@ using LiveCharts.Wpf;
|
||||
using LiveCharts.WinForms;
|
||||
using LiveCharts.Defaults;
|
||||
using System.Windows.Media;
|
||||
using System.Threading;
|
||||
|
||||
namespace friction
|
||||
{
|
||||
@@ -35,6 +36,9 @@ namespace friction
|
||||
string m_CurTable = "";
|
||||
GRAPH_TYPE m_GraphType = GRAPH_TYPE.NONE;
|
||||
|
||||
// for report
|
||||
bool m_bReport = false;
|
||||
|
||||
public PanelTrendGraph(MainForm owner, DataHandler data)
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -382,7 +386,9 @@ namespace friction
|
||||
|
||||
public void UpdateGraph(GRAPH_TYPE Type=GRAPH_TYPE.NONE)
|
||||
{
|
||||
if(Type == GRAPH_TYPE.NONE)
|
||||
Console.WriteLine("[TrendGraph::UpdateGraph] start");
|
||||
|
||||
if (Type == GRAPH_TYPE.NONE)
|
||||
{
|
||||
if (rbHumidity.Checked == true)
|
||||
UpdateGraph(GRAPH_TYPE.HUMIDITY);
|
||||
@@ -392,6 +398,8 @@ namespace friction
|
||||
UpdateGraph(GRAPH_TYPE.FORCE);
|
||||
else if (rbVelocity.Checked == true)
|
||||
UpdateGraph(GRAPH_TYPE.VELOCITY);
|
||||
|
||||
Console.WriteLine("[TrendGraph::UpdateGraph] end");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -420,6 +428,8 @@ namespace friction
|
||||
m_CurSpring = strSpring;
|
||||
m_CurTable = strTable;
|
||||
m_GraphType = Type;
|
||||
|
||||
Console.WriteLine("[TrendGraph::UpdateGraph] end");
|
||||
}
|
||||
|
||||
private void rbHumidity_CheckedChanged(object sender, EventArgs e)
|
||||
@@ -441,5 +451,28 @@ namespace friction
|
||||
{
|
||||
UpdateGraph(GRAPH_TYPE.VELOCITY);
|
||||
}
|
||||
|
||||
public void CopyChart(GRAPH_TYPE Type)
|
||||
{
|
||||
m_bReport = true;
|
||||
trendChart.DisableAnimations = true;
|
||||
UpdateGraph(Type);
|
||||
}
|
||||
|
||||
private void trendChart_UpdaterTick(object sender)
|
||||
{
|
||||
if(m_bReport == true)
|
||||
{
|
||||
Thread.Sleep(1500);
|
||||
|
||||
m_bReport = false;
|
||||
|
||||
Bitmap bm = new Bitmap(Width, Height);
|
||||
DrawToBitmap(bm, new Rectangle(0, 0, Width, Height));
|
||||
m_Owner.OnChartUpdate(bm, m_GraphType);
|
||||
}
|
||||
|
||||
Console.WriteLine("chart updated");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user