public graphFrm(GraphDataModel graphData) { InitializeComponent(); this.graphData = graphData; canvas = lblPanel.CreateGraphics(); SetPen(Color.Blue, 1); GType = graphData.gType; }
private GraphDataModel.GraphType CheckRadioButton() { GraphDataModel.GraphType result = 0; switch (grpGraphChoices.Controls.OfType <RadioButton>().FirstOrDefault(n => n.Checked).Name) { case "radBar": result = GraphDataModel.GraphType.BarGraph; break; case "radPie": result = GraphDataModel.GraphType.PieChart; break; case "radLine": result = GraphDataModel.GraphType.LineGraph; break; } return(result); }