private void ChartThemes_Load(object sender, System.EventArgs e) { bar1.FillSampleValues(); bar1.ColorEach = true; // Add all available themes to ListBox1. themeEditor = new Steema.TeeChart.Editors.ThemeEditor(tChart1.Chart, null); object[] objectCollection; //object[] objectCollection = new object[lbThemes.Items.Count]; //lbThemes.Items.CopyTo(objectCollection,0); themeEditor.AddChartThemes(out objectCollection); lbThemes.Items.Clear(); lbThemes.Items.Add(Texts.Current); lbThemes.Items.AddRange(objectCollection); lbThemes.SelectedIndex = 0; }
/// <summary> /// User has selected a node in the tree - display an editor for it. /// </summary> private void OnTreeNodeSelect(object sender, TreeViewEventArgs e) { PropertyPanel.Controls.Clear(); Form f; if (e.Node.Text == "Chart") { f = new Steema.TeeChart.Editors.GeneralEditor(Chart.Chart.Chart, PropertyPanel); } else if (e.Node.Text == "Panel") { f = new Steema.TeeChart.Editors.PanelEditor(Chart.Chart.Panel, PropertyPanel); } else if (e.Node.Text == "Left") { f = new Steema.TeeChart.Editors.AxisEditor(Chart.Chart.Axes.Left, PropertyPanel); } else if (e.Node.Text == "Top") { f = new Steema.TeeChart.Editors.AxisEditor(Chart.Chart.Axes.Top, PropertyPanel); } else if (e.Node.Text == "Right") { f = new Steema.TeeChart.Editors.AxisEditor(Chart.Chart.Axes.Right, PropertyPanel); } else if (e.Node.Text == "Bottom") { f = new Steema.TeeChart.Editors.AxisEditor(Chart.Chart.Axes.Bottom, PropertyPanel); } else if (e.Node.Text == "Titles") { f = new Steema.TeeChart.Editors.TitleEditor(Chart.Chart.Chart, PropertyPanel); } else if (e.Node.Text == "Left wall") { f = new Steema.TeeChart.Editors.WallEditor(Chart.Chart.Walls.Left, PropertyPanel); } else if (e.Node.Text == "Right wall") { f = new Steema.TeeChart.Editors.WallEditor(Chart.Chart.Walls.Right, PropertyPanel); } else if (e.Node.Text == "Back wall") { f = new Steema.TeeChart.Editors.WallEditor(Chart.Chart.Walls.Back, PropertyPanel); } else if (e.Node.Text == "Bottom wall") { f = new Steema.TeeChart.Editors.WallEditor(Chart.Chart.Walls.Bottom, PropertyPanel); } else if (e.Node.Text == "Legend") { f = new Steema.TeeChart.Editors.LegendEditor(Chart.Chart.Chart, PropertyPanel); } else if (e.Node.Text == "3D") { f = new Steema.TeeChart.Editors.AspectEditor(Chart.Chart.Chart, PropertyPanel); } // else if (e.Node.Text == "Tools") // f = new Steema.TeeChart.Editors.Tools.ToolsEditor(Chart.Chart.Chart, PropertyPanel); else if (e.Node.Text == "Themes") { f = new Steema.TeeChart.Editors.ThemeEditor(Chart.Chart.Chart, PropertyPanel); } else if (e.Node.Parent == Tree.Nodes[0].Nodes[0]) { // series node. Series S = Chart.Chart.Series.WithTitle(e.Node.Text); f = new Steema.TeeChart.Editors.SeriesEditor(S, PropertyPanel); TabControl TabControl1 = (TabControl)f.Controls[0]; TabControl1.TabPages.RemoveByKey("TabSource"); } else { f = null; } if (f != null) { f.Parent = PropertyPanel; f.Dock = DockStyle.Fill; f.Show(); } }