private void clearDefaultCurrentComponentConfigurationToolStripMenuItem_Click(object sender, EventArgs e) { if (cbxChart.SelectedIndex >= 0 && cbxChart.SelectedIndex < list.Count) { BaseChartComponent c = list[cbxChart.SelectedIndex]; BaseChartComponent.ClearDefaultConfiguration(c.GetType()); } }
private void setCurrentComponentConfigurationToDefaultToolStripMenuItem_Click(object sender, EventArgs e) { if (cbxChart.SelectedIndex >= 0 && cbxChart.SelectedIndex < list.Count) { BaseChartComponent c = list[cbxChart.SelectedIndex]; string sXml = chart1.SaveConfigurationOfChartToString(); BaseChartComponent.SetDefaultConfiguration(c.GetType(), sXml); } }
private void chbxIndependentZero_CheckedChanged(object sender, EventArgs e) { if (cbxChart.SelectedIndex >= 0 && cbxChart.SelectedIndex < list.Count) { BaseChartComponent c = list[cbxChart.SelectedIndex]; AxileBase axile = c as AxileBase; if (c != null) { this.chbxIndependentZero.CheckedChanged -= new System.EventHandler(this.chbxIndependentZero_CheckedChanged); axile.SecondDataMemberIndependentZero = chbxIndependentZero.Checked; chbxIndependentZero.Checked = axile.SecondDataMemberIndependentZero; this.chbxIndependentZero.CheckedChanged += new System.EventHandler(this.chbxIndependentZero_CheckedChanged); } } }
private void loadCurrentComponentToolStripMenuItem_Click(object sender, EventArgs e) { if (cbxChart.SelectedIndex >= 0 && cbxChart.SelectedIndex < list.Count) { BaseChartComponent c = list[cbxChart.SelectedIndex]; OpenFileDialog op = new OpenFileDialog(); op.Title = "Load Component Config"; op.Filter = "All file|*.*"; op.FilterIndex = 0; if (op.ShowDialog() == DialogResult.OK) { c.LoadConfigurationOfComponentFromFile(op.FileName); } } }
private void saveCurrentComponentToolStripMenuItem_Click(object sender, EventArgs e) { if (cbxChart.SelectedIndex >= 0 && cbxChart.SelectedIndex < list.Count) { BaseChartComponent c = list[cbxChart.SelectedIndex]; SaveFileDialog sv = new SaveFileDialog(); sv.Title = "Save Component Config"; sv.Filter = "All file|*.*"; sv.FilterIndex = 0; if (sv.ShowDialog() == DialogResult.OK) { c.SaveConfigurationOfComponent(sv.FileName); } } }