private void EditModelInitFrame() { LineRoadDesignClass lrDesign = LineRoadDesign.GetLineRoadDesignStrucById(currLineRoadId); if (null == lrDesign) { return; } this.Text = "修改线道信息"; ComboDicOper.CreateBindSource(new LineRoadStyleDic(), lrDesign.LineRoadStyle.ToString(), this.cb_LineRoadStyle); ComboDicOper.CreateBindSource(new CeWangStyleDic(), CeWangStyleEnum.None.ToString(), this.cb_CeWangStyle); //1,测网设计; if (lrDesign.Cewang.ifAdd) { LineRoadCeWang tmpcewang = lrDesign.Cewang; this.rb_CeWangYes.Checked = true; this.chb_cWHeng.Checked = tmpcewang.ifHeng; this.chb_cwZong.Checked = tmpcewang.ifZong; this.tb_CeWangFixLen.Text = tmpcewang.cewangfixlen.ToString(); this.tb_CeWangSepNum.Text = tmpcewang.cewangsepnum.ToString(); this.tb_CWDuiShuMin.Text = tmpcewang.duishuminvalue.ToString(); this.tb_CWDuiShuParam.Text = tmpcewang.duishuParam.ToString(); ComboDicOper.CreateBindSource(new CeWangStyleDic(), tmpcewang.cewangstyle.ToString(), this.cb_CeWangStyle); } else { this.rb_CeWangNo.Checked = true; } //2,线道样式 this.tb_LineGroupWidth.Text = lrDesign.LineRoadWidth.ToString(); this.tb_LineRoadName.Text = lrDesign.LineRoadName.ToString(); this.chb_ifLeftSecondKD.Checked = lrDesign.IfLeftSecondKD; this.chb_ifRightSecondKD.Checked = lrDesign.IfRightSecondKD; this.chb_ifZhengMiLine.Checked = lrDesign.IfzhengMiLine; this.tb_titleStartHeight.Text = lrDesign.LineroadTitleHeight.ToString(); //3,线道头左侧线 this.chk_IfDrawTitleLeft.Checked = lrDesign.TitleLeftFrameLineChecked; ComboDicOper.CreateBindSource(new LineLeftKindDic(), lrDesign.LeftLineStyle.ToString(), this.cb_leftline); this.tb_leftlineLength.Text = lrDesign.LeftLineLength.ToString(); //4,线道所包含的绘图项 List <DrawItemName> noSelectDINameLst = GetNoSelectedDINames(); FillDrawItemListBox(noSelectDINameLst, this.lb_WaitSelect); List <DrawItemName> lrDIS = lrDesign.Drawingitems; FillDrawItemListBox(lrDIS, this.lb_selected); }
private void EditLineRoadDesign() { LineRoadDesignClass lrDesign = LineRoadDesign.GetLineRoadDesignStrucById(currLineRoadId); if (null == lrDesign) { return; } LineRoadDesignClass tmplr = CreateLRDesignStrucByFrm(currLineRoadId); LineRoadDesign.UpdateLineRoadDesignStruc(tmplr); }
private void SetLineRoadDesign() { List <LineRoadDesignClass> tmp = new List <LineRoadDesignClass>(); for (int i = 0; i < this.mf.lb_LineRoadDesign.Items.Count; i++) { // List<lineroad> string tmpLrId = this.mf.GetLineRoadIdByDesignStr(this.mf.lb_LineRoadDesign.Items[i].ToString()); LineRoadDesignClass tmpstruc = LineRoadDesign.GetLineRoadDesignStrucById(tmpLrId); tmp.Add(tmpstruc); } LineRoadDesign.LineRoadDesginLst = tmp; }
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("请选择删除线道"); } }