///RadioGroup添加项

public void intit()
{
esriGeoAnalysisSlopeEnum m_SlopeType1 = esriGeoAnalysisSlopeEnum.esriGeoAnalysisSlopeDegrees;
esriGeoAnalysisSlopeEnum m_SlopeType2 = esriGeoAnalysisSlopeEnum.esriGeoAnalysisSlopePercentrise;
DevExpress.XtraEditors.Controls.RadioGroupItem item1 = new DevExpress.XtraEditors.Controls.RadioGroupItem(m_SlopeType1, "坡度");
DevExpress.XtraEditors.Controls.RadioGroupItem item2 = new DevExpress.XtraEditors.Controls.RadioGroupItem(m_SlopeType2, "百分比");
this.radioMethed.Properties.Items.Add(item1);
this.radioMethed.Properties.Items.Add(item2);
}

///listbox项的添加删除

private void AddButton_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); //定义打开的默认文件夹位置
ofd.Multiselect = true;
ofd.ShowDialog();
string[] fileNames = ofd.FileNames;
for (int i = 0; i < fileNames.Length; i++)
{
object obj = fileNames[i] as object;
this.listBoxVillage.Items.Add(obj);
}
}

private void DeleteButton_Click(object sender, EventArgs e)
{
this.listBoxVillage.Items.RemoveAt(this.listBoxVillage.SelectedIndex);
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
猜你喜欢
  • 2022-12-23
  • 2021-08-29
  • 2021-11-22
  • 2021-12-01
  • 2022-02-04
  • 2021-11-03
相关资源
相似解决方案