private void btnSelect_Click(object sender, EventArgs e) { try { ISymbolArray chartSymbol = this.ichartRenderer_0.ChartSymbol as ISymbolArray; string[] strArray = new string[2]; for (int i = this.FieldsListBoxCtrl.SelectedIndices.Count - 1; i >= 0; i--) { int index = this.FieldsListBoxCtrl.SelectedIndices[i]; FieldWrap wrap = this.FieldsListBoxCtrl.Items[index] as FieldWrap; (this.ichartRenderer_0 as IRendererFields).AddField(wrap.Name, wrap.ToString()); IColor color = this.ienumColors_0.Next(); if (color == null) { this.ienumColors_0.Reset(); color = this.ienumColors_0.Next(); } ISymbol symbol = this.method_5(color); strArray[0] = ""; strArray[1] = wrap.ToString(); ListViewItemEx ex = new ListViewItemEx(strArray) { Style = symbol, Tag = wrap }; this.SelectFieldslistView.Add(ex); chartSymbol.AddSymbol(symbol); this.FieldsListBoxCtrl.Items.RemoveAt(index); } } catch { } this.btnUnSelectAll.Enabled = true; }
private void btnMoveDown_Click(object sender, EventArgs e) { int index = this.SelectFieldslistView.SelectedIndices[0]; ListViewItemEx ex = this.SelectFieldslistView.Items[index] as ListViewItemEx; this.SelectFieldslistView.Items.RemoveAt(index); if ((index + 1) == this.SelectFieldslistView.Items.Count) { this.SelectFieldslistView.Items.Add(ex); } else { this.SelectFieldslistView.Items.Insert(index + 1, ex); } ISymbolArray dotDensitySymbol = this.idotDensityRenderer_0.DotDensitySymbol as ISymbolArray; dotDensitySymbol.MoveSymbol(dotDensitySymbol.get_Symbol(index), index + 1); IRendererFields fields = this.idotDensityRenderer_0 as IRendererFields; fields.ClearFields(); for (int i = 0; i < this.SelectFieldslistView.Items.Count; i++) { ex = this.SelectFieldslistView.Items[i] as ListViewItemEx; FieldWrap tag = ex.Tag as FieldWrap; fields.AddField(tag.Name, tag.ToString()); } }
private void btnMoveUp_Click(object sender, EventArgs e) { int index = this.SelectFieldslistView.SelectedIndices[0]; ListViewItemEx item = this.SelectFieldslistView.Items[index] as ListViewItemEx; this.SelectFieldslistView.Items.RemoveAt(index); this.SelectFieldslistView.Items.Insert(index - 1, item); ISymbolArray chartSymbol = this.ichartRenderer_0.ChartSymbol as ISymbolArray; chartSymbol.MoveSymbol(chartSymbol.get_Symbol(index), index - 1); IRendererFields fields = this.ichartRenderer_0 as IRendererFields; fields.ClearFields(); for (int i = 0; i < this.SelectFieldslistView.Items.Count; i++) { item = this.SelectFieldslistView.Items[i] as ListViewItemEx; FieldWrap tag = item.Tag as FieldWrap; fields.AddField(tag.Name, tag.ToString()); } }