public SubMainChartOptions(ChartController chartController) { InitializeComponent(); this.chartController = chartController; boxLineStyle.Items.AddRange(Enum.GetNames(typeof(OxyPlot.LineStyle))); boxLineStyle.SelectedIndex = 0; boxMarkerStyle.Items.AddRange(Enum.GetNames(typeof(OxyPlot.MarkerType))); boxMarkerStyle.Items.Remove("Custom"); boxMarkerStyle.SelectedIndex = 0; boxGroupMode.Items.AddRange(Enum.GetNames(typeof(GroupMode))); boxGroupMode.SelectedIndex = 0; // boxAxisXStyle.Items.AddRange(Enum.GetNames(typeof(OxyPlot.LineStyle))); boxAxisXStyle.SelectedIndex = boxAxisXStyle.FindString(chartController.AxisXStyle.ToString()); numericAxisXWidth.Value = chartController.AxisXWidth; numericAxisYWidth.Value = chartController.AxisYWidth; boxAxisYStyle.Items.AddRange(Enum.GetNames(typeof(OxyPlot.LineStyle))); boxAxisYStyle.SelectedIndex = boxAxisYStyle.FindString(chartController.AxisYStyle.ToString()); boxLegendPosition.Items.AddRange(Enum.GetNames(typeof(OxyPlot.Legends.LegendPosition))); boxLegendPosition.SelectedIndex = boxLegendPosition.FindString(chartController.LegendPosition.ToString()); // if (chartController.AxisXColor.Name == "0") { buttonAxisXColorDefault_Click(null, null); } else { buttonAxisXColor.BackColor = chartController.AxisXColor; buttonAxisXColor.Text = ""; } if (chartController.AxisYColor.Name == "0") { buttonAxisYColorDefault_Click(null, null); } else { buttonAxisYColor.BackColor = chartController.AxisYColor; buttonAxisYColor.Text = ""; } // }
public Chart(ProjectManager pm, ChartController chartController) { InitializeComponent(); // typeof(Control).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, gridData, new object[] { true }); // model = new ChartModel(pm); this.chartController = chartController; listKeywords.Items.Clear(); InitChart(); }