private void cboTileLayoutLayer_SelectedIndexChanged(object sender, EventArgs e) { if (this.cboTileNameField.Items.Count > 0) { this.cboTileNameField.Items.Clear(); } this.cboTileNameField.Items.AddRange(_utilities.TextFields(this.cboTileLayoutLayer.Text).ToArray()); if (this.cboTileNameField.Items.Count > 0) { this.cboTileNameField.SelectedIndex = 0; } if (this.cboTileNameField.Items.IndexOf("Tilename") > -1) { this.cboTileNameField.SelectedIndex = this.cboTileNameField.Items.IndexOf("Tilename"); } ILayer tilelayoutlayer = _utilities.Layer(this.cboTileLayoutLayer.Text); IFeatureLayer tilelayoutfeaturelayer = tilelayoutlayer as IFeatureLayer; IFeatureSelection tilelayoutfeatureselection = tilelayoutfeaturelayer as IFeatureSelection; if (tilelayoutfeatureselection.SelectionSet.Count > 0) { this.chkUseSelected.Text = "Use selection (" + tilelayoutfeatureselection.SelectionSet.Count.ToString() + ")"; this.chkUseSelected.Checked = true; this.chkUseSelected.Enabled = true; } else { this.chkUseSelected.Text = "Use selection"; this.chkUseSelected.Checked = false; this.chkUseSelected.Enabled = false; } }
private void cbo_layers_SelectedIndexChanged(object sender, EventArgs e) { cbo_fieldname.Items.Clear(); cbo_fieldname.Items.AddRange(_utilitiesArcMap.TextFields(((CustomLayer)cbo_layers.SelectedItem).Layer).ToArray()); }