private void btnUnSelect_Click(object sender, EventArgs e) { int index = this.SelectFieldslistView.SelectedIndices[0]; ListViewItem item = this.SelectFieldslistView.SelectedItems[0]; this.FieldsListBoxCtrl.Items.Add(item.Tag); ISymbolArray dotDensitySymbol = this.idotDensityRenderer_0.DotDensitySymbol as ISymbolArray; dotDensitySymbol.DeleteSymbol(dotDensitySymbol.get_Symbol(index)); (this.idotDensityRenderer_0 as IRendererFields).DeleteField(item.Text); this.SelectFieldslistView.Items.RemoveAt(index); if (this.SelectFieldslistView.Items.Count == 0) { this.btnUnSelectAll.Enabled = false; } }
private void btnUnSelect_Click(object sender, EventArgs e) { try { int index = this.SelectFieldslistView.SelectedIndices[0]; ListViewItem item = this.SelectFieldslistView.SelectedItems[0]; this.FieldsListBoxCtrl.Items.Add(item.Tag); (this.ichartRenderer_0 as IRendererFields).DeleteField(item.SubItems[1].Text); ISymbolArray chartSymbol = this.ichartRenderer_0.ChartSymbol as ISymbolArray; chartSymbol.DeleteSymbol(chartSymbol.get_Symbol(index)); this.SelectFieldslistView.Items.RemoveAt(index); if (this.SelectFieldslistView.Items.Count == 0) { this.btnUnSelectAll.Enabled = false; } } catch (Exception exception) { MessageBox.Show(exception.ToString()); } }