레이더 그래프에 5가지 상태창 추가
피봇 기능 추가
This commit is contained in:
@@ -22,6 +22,9 @@ namespace friction
|
||||
string m_CurSpring = "";
|
||||
bool m_bShowAlert = false;
|
||||
|
||||
Config.RANGE m_TempRange = Config.TEMP_ALL;
|
||||
Config.RANGE m_HumidRange = Config.HUMID_ALL;
|
||||
|
||||
public PanelRadarGraph(MainForm owner, DataHandler data)
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -30,6 +33,12 @@ namespace friction
|
||||
m_DataHandler = data;
|
||||
|
||||
Theme.Apply(this);
|
||||
Theme.Apply(rbAll);
|
||||
Theme.Apply(rbNormalLow);
|
||||
Theme.Apply(rbNormalHigh);
|
||||
Theme.Apply(rbHighLow);
|
||||
Theme.Apply(rbHighHigh);
|
||||
Theme.Apply(rbLowTemp);
|
||||
|
||||
|
||||
chart.ChartAreas[0].AxisY.Maximum = 10;
|
||||
@@ -38,27 +47,27 @@ namespace friction
|
||||
//chart.Series["SeriesPotential"].Color = Color.FromArgb(255, 180, 180, 180);
|
||||
//chart.Series["SeriesNo"].Color = Color.FromArgb(255, 140, 140, 140);
|
||||
|
||||
chart.Series["SeriesHigh"].Color = Theme.Red;
|
||||
chart.Series["SeriesHigh"].Color = Color.FromArgb(255, 255, 185, 185);
|
||||
chart.Series["SeriesHigh"].Font = new Font(chart.Series["SeriesNo"].Font.FontFamily, 20.0f);
|
||||
|
||||
chart.Series["SeriesPotential"].Color = Theme.Yellow;
|
||||
chart.Series["SeriesPotential"].Color = Color.FromArgb(255, 255, 255, 151);
|
||||
chart.Series["SeriesPotential"].Font = new Font(chart.Series["SeriesNo"].Font.FontFamily, 20.0f);
|
||||
|
||||
chart.Series["SeriesNo"].Color = Theme.Green;
|
||||
chart.Series["SeriesNo"].Color = Color.FromArgb(255, 175, 255, 211);
|
||||
chart.Series["SeriesNo"].Font = new Font(chart.Series["SeriesNo"].Font.FontFamily, 20.0f);
|
||||
|
||||
|
||||
chart.Series["SeriesMax"].Color = Theme.Red;
|
||||
chart.Series["SeriesMax"].Color = Color.FromArgb(255, 192, 0, 0);
|
||||
chart.Series["SeriesMax"]["RadarDrawingStyle"] = "Line";
|
||||
chart.Series["SeriesMax"].BorderWidth = 3;
|
||||
chart.Series["SeriesMax"].Font = new Font(chart.Series["SeriesNo"].Font.FontFamily, 20.0f);
|
||||
|
||||
chart.Series["SeriesAvg"].Color = Theme.Yellow;
|
||||
chart.Series["SeriesAvg"].Color = Color.FromArgb(255, 229, 150, 9);
|
||||
chart.Series["SeriesAvg"]["RadarDrawingStyle"] = "Line";
|
||||
chart.Series["SeriesAvg"].BorderWidth = 3;
|
||||
chart.Series["SeriesAvg"].Font = new Font(chart.Series["SeriesNo"].Font.FontFamily, 20.0f);
|
||||
|
||||
chart.Series["SeriesMin"].Color = Theme.Green;
|
||||
chart.Series["SeriesMin"].Color = Color.FromArgb(255, 79, 98, 40);
|
||||
chart.Series["SeriesMin"]["RadarDrawingStyle"] = "Line";
|
||||
chart.Series["SeriesMin"].BorderWidth = 3;
|
||||
chart.Series["SeriesMin"].Font = new Font(chart.Series["SeriesNo"].Font.FontFamily, 20.0f);
|
||||
@@ -75,8 +84,13 @@ namespace friction
|
||||
chart.ChartAreas[0].AxisY.MajorTickMark.LineColor = Color.FromArgb(150, 0, 0, 0);
|
||||
chart.ChartAreas[0].AxisY.MinorTickMark.Enabled = false;
|
||||
|
||||
chart.ChartAreas[0].AxisX.LabelAutoFitStyle = LabelAutoFitStyles.DecreaseFont;
|
||||
chart.ChartAreas[0].AxisX.IsLabelAutoFit = true;
|
||||
|
||||
foreach (var series in chart.Series)
|
||||
series["AreaDrawingStyle"] = "Polygon";
|
||||
|
||||
panel1.BackColor = Color.Gray;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
@@ -87,17 +101,17 @@ namespace friction
|
||||
public void UpdateGraph()
|
||||
{
|
||||
string strSpring = m_DataHandler.GetCurSpring();
|
||||
if (m_CurSpring == strSpring)
|
||||
return;
|
||||
//if (m_CurSpring == strSpring)
|
||||
// return;
|
||||
|
||||
lbSpring.Text = "Material Spring: " + strSpring;
|
||||
lbSpring.BackColor = Color.Transparent;
|
||||
lbSpring.ForeColor = Theme.Orange;
|
||||
lbSpring.BackColor = Color.Gray;
|
||||
lbSpring.ForeColor = Color.Black;
|
||||
|
||||
foreach (var series in chart.Series)
|
||||
series.Points.Clear();
|
||||
|
||||
List<DataHandler.RADAR_CHART> graphData = m_DataHandler.GetAvgAll(strSpring);
|
||||
List<DataHandler.RADAR_CHART> graphData = m_DataHandler.GetAvgAll(strSpring, m_TempRange, m_HumidRange);
|
||||
|
||||
List<string> xValues = new List<string>();
|
||||
List<float> yValues = new List<float>();
|
||||
@@ -151,5 +165,41 @@ namespace friction
|
||||
m_bShowAlert = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void rbAll_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if(rbAll.Checked == true)
|
||||
{
|
||||
m_TempRange = Config.TEMP_ALL;
|
||||
m_HumidRange = Config.HUMID_ALL;
|
||||
}
|
||||
else if (rbNormalLow.Checked == true)
|
||||
{
|
||||
m_TempRange = Config.TEMP_NORMAL;
|
||||
m_HumidRange = Config.HUMID_LOW;
|
||||
}
|
||||
else if (rbNormalHigh.Checked == true)
|
||||
{
|
||||
m_TempRange = Config.TEMP_NORMAL;
|
||||
m_HumidRange = Config.HUMID_HIGH;
|
||||
}
|
||||
else if (rbHighLow.Checked == true)
|
||||
{
|
||||
m_TempRange = Config.TEMP_HIGH;
|
||||
m_HumidRange = Config.HUMID_LOW;
|
||||
}
|
||||
else if (rbHighHigh.Checked == true)
|
||||
{
|
||||
m_TempRange = Config.TEMP_HIGH;
|
||||
m_HumidRange = Config.HUMID_HIGH;
|
||||
}
|
||||
else if (rbLowTemp.Checked == true)
|
||||
{
|
||||
m_TempRange = Config.TEMP_LOW;
|
||||
m_HumidRange = Config.HUMID_ALL;
|
||||
}
|
||||
|
||||
UpdateGraph();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user