예제 #1
0
 private void btnRemoveLine_Click(object sender, EventArgs e)
 {
     if (null != lb_LineRoadDesign.SelectedItem)
     {
         if (DialogResult.Yes == MessageBox.Show("确定删除该线道么?", "线道删除确认", MessageBoxButtons.YesNo, MessageBoxIcon.Warning))
         {
             string tmpid = this.GetLineRoadIdByDesignStr(lb_LineRoadDesign.SelectedItem.ToString());
             //1,从线道管理结构中删除该线道内容;
             LineRoadDesign.DeleteLRDesignStrucByID(tmpid);
             //2,从线道设计框中删除该线道内容;
             this.lb_LineRoadDesign.Items.RemoveAt(lb_LineRoadDesign.SelectedIndex);
         }
     }
     else
     {
         MessageBox.Show("请选择删除线道");
     }
 }