private void cboFields_SelectedIndexChanged(object sender, EventArgs e) { if (this.bool_0) { IHatchInputValue hatchInterval = this.ihatchClass_0.HatchInterval; if (this.cboFields.SelectedItem is FieldWrap) { hatchInterval.Field = (this.cboFields.SelectedItem as FieldWrap).Field.Name; } } }
public void Init() { if (this.ihatchClass_0 != null) { this.bool_0 = false; IHatchInputValue hatchInterval = this.ihatchClass_0.HatchInterval; if (hatchInterval.Value is DBNull) { this.txtHatchInterval.Text = "0"; } else { this.txtHatchInterval.Text = hatchInterval.Value.ToString(); } if (hatchInterval.Field == "") { this.radioGroup1.SelectedIndex = 0; } else { this.radioGroup1.SelectedIndex = 1; } this.txtHatchInterval.Enabled = this.radioGroup1.SelectedIndex == 0; this.cboFields.Enabled = this.radioGroup1.SelectedIndex == 1; int num = -1; for (int i = 0; i < this.ifields_0.FieldCount; i++) { IField field = this.ifields_0.get_Field(i); if ((((field.Type == esriFieldType.esriFieldTypeInteger) || (field.Type == esriFieldType.esriFieldTypeSmallInteger)) || (field.Type == esriFieldType.esriFieldTypeDouble)) || (field.Type == esriFieldType.esriFieldTypeSingle)) { this.cboFields.Properties.Items.Add(new FieldWrap(field)); if (field.Name == hatchInterval.Field) { num = this.cboFields.Properties.Items.Count - 1; } } } if (num == -1) { num = 0; } if (this.cboFields.Properties.Items.Count > 0) { this.cboFields.SelectedIndex = num; } this.bool_0 = true; } }