private void simpleButton1_Click(object sender, EventArgs e) { frmAddValues values = new frmAddValues(); IFeatureLayer layer = (this.cboLayers.SelectedItem as LayerObject).Layer as IFeatureLayer; IFields fields = layer.FeatureClass.Fields; IField field = fields.get_Field(fields.FindFieldByAliasName(this.cboFields.SelectedItem.ToString())); values.Layer = (this.cboLayers.SelectedItem as LayerObject).Layer; values.FieldName = field.Name; values.List = this.ilist_0 as ArrayList; values.List = this.ilist_0 as ArrayList; values.GetAllValues = this.bool_0; if (values.ShowDialog() == DialogResult.OK) { string[] items = new string[3]; IQueryFilter queryFilter = new QueryFilterClass(); for (int i = 0; i < values.SelectedItems.Count; i++) { items[0] = values.SelectedItems[i].ToString(); items[1] = values.SelectedItems[i].ToString(); queryFilter.WhereClause = field.Name + " = " + this.ConvertFieldValueToString(field.Type, values.SelectedItems[i]); items[2] = layer.FeatureClass.FeatureCount(queryFilter).ToString(); ListViewItem item = new ListViewItem(items); this.listView1.Items.Add(item); } } this.bool_0 = values.GetAllValues; }
private void btnAddValue_Click(object sender, EventArgs e) { frmAddValues values = new frmAddValues { List = this.ilist_0 as ArrayList, GetAllValues = true }; if (values.ShowDialog() == DialogResult.OK) { ISymbol defaultSymbol = this.itinUniqueValueRenderer_0.DefaultSymbol; object[] objArray = new object[4]; for (int i = 0; i < values.SelectedItems.Count; i++) { ISymbol symbol2 = (defaultSymbol as IClone).Clone() as ISymbol; IColor color = this.ienumColors_0.Next(); if (color == null) { this.ienumColors_0.Reset(); color = this.ienumColors_0.Next(); } this.method_3(symbol2, color); objArray[0] = symbol2; objArray[1] = values.SelectedItems[i].ToString(); objArray[2] = values.SelectedItems[i].ToString(); objArray[3] = "?"; this.itinUniqueValueRenderer_0.AddValue(objArray[1].ToString(), null, symbol2); this.listView1.Add(objArray); } this.btnAddValue.Enabled = this.ilist_0.Count > 0; } }
private void btnAddValue_Click(object sender, EventArgs e) { frmAddValues values = new frmAddValues { Layer = this.igeoFeatureLayer_0, FieldName = this.cboFields.Text, List = this.ilist_0 as ArrayList, UniqueValueRenderer = this.iuniqueValueRenderer_0, GetAllValues = this.bool_1 }; if (values.ShowDialog() == DialogResult.OK) { ISymbol defaultSymbol = this.iuniqueValueRenderer_0.DefaultSymbol; if (defaultSymbol == null) { defaultSymbol = this.method_4(this.igeoFeatureLayer_0.FeatureClass.ShapeType); } ISymbol symbol = null; object[] objArray = new object[4]; string str = "Marker Symbols"; if (this.igeoFeatureLayer_0.FeatureClass.ShapeType == esriGeometryType.esriGeometryPolyline) { str = "Line Symbols"; } else if (this.igeoFeatureLayer_0.FeatureClass.ShapeType == esriGeometryType.esriGeometryPolygon) { str = "Fill Symbols"; } for (int i = 0; i < values.SelectedItems.Count; i++) { if (this.cboLookupStyleset.SelectedIndex != -1) { IStyleGalleryItem item = SymbolFind.FindStyleGalleryItem(values.SelectedItems[i].ToString(), this.m_pSG, this.cboLookupStyleset.Text, str, ""); if (item != null) { symbol = item.Item as ISymbol; } } if (symbol == null) { symbol = (defaultSymbol as IClone).Clone() as ISymbol; } objArray[0] = symbol; objArray[1] = values.SelectedItems[i].ToString(); objArray[2] = values.SelectedItems[i].ToString(); objArray[3] = this.method_3(this.method_1(), (this.cboFields.SelectedItem as FieldWrap).Name, objArray[1].ToString()).ToString(); this.iuniqueValueRenderer_0.AddValue(objArray[1].ToString(), null, symbol); this.listView1.Add(objArray); } } this.bool_1 = values.GetAllValues; }
private void btnAddValue_Click(object sender, EventArgs e) { if (this.cboFields.SelectedIndex != -1) { frmAddValues values = new frmAddValues { Layer = this.ilayer_0, FieldName = (this.cboFields.SelectedItem as FieldWrap).Name, List = this.ilist_0 as ArrayList, UniqueValueRenderer = this.iuniqueValueRenderer_0, GetAllValues = this.bool_1 }; if (values.ShowDialog() == DialogResult.OK) { ISymbol defaultSymbol = this.iuniqueValueRenderer_0.DefaultSymbol; if (defaultSymbol == null) { defaultSymbol = this.method_6((this.ilayer_0 as IGeoFeatureLayer).FeatureClass.ShapeType); } object[] objArray = new object[4]; for (int i = 0; i < values.SelectedItems.Count; i++) { ISymbol symbol2 = (defaultSymbol as IClone).Clone() as ISymbol; IColor color = this.ienumColors_0.Next(); if (color == null) { this.ienumColors_0.Reset(); color = this.ienumColors_0.Next(); } this.method_5(symbol2, color); objArray[0] = symbol2; objArray[1] = values.SelectedItems[i].ToString(); objArray[2] = values.SelectedItems[i].ToString(); objArray[3] = this.method_3(this.method_4(), (this.cboFields.SelectedItem as FieldWrap).Name, objArray[1].ToString()).ToString(); this.iuniqueValueRenderer_0.AddValue(objArray[1].ToString(), null, symbol2); this.listView1.Add(objArray); } } this.bool_1 = values.GetAllValues; } }