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); }
public LineRoadDesignClass(LineRoadModel lineRoadModel) { this.LineRoadId = lineRoadModel.LineRoadDesignDetailID.Trim(); this.LineRoadName = lineRoadModel.LineRoadName; this.LineRoadStyle = GetLineRoadStyleByStr(lineRoadModel.LineRoadStyle); this.LineRoadWidth = StrUtil.StrToDouble(lineRoadModel.LineRoadWidth, 40, LineRoadName + "线道宽度为非数值型"); this.LineroadTitleHeight = StrUtil.StrToDouble(lineRoadModel.LineroadTitleHeight, 20, "线道标题高度为非数值型"); this.IfLeftSecondKD = lineRoadModel.IfLeftSecondKD; this.IfRightSecondKD = lineRoadModel.IfRightSecondKD; this.IfzhengMiLine = lineRoadModel.IfzhengMiLine; this.TitleLeftFrameLineChecked = lineRoadModel.TitleLeftFrameLineChecked; this.LeftLineStyle = GetLineLeftKindByStr(lineRoadModel.LeftLineStyle); this.LeftLineLength = StrUtil.StrToDouble(lineRoadModel.LeftLineLength, 40, "线道左侧箭头线长度为非数值型"); //绘图项设置; List <DrawItemName> drawItemNames = new List <DrawItemName>(); AddDrawItems(ref drawItemNames, lineRoadModel.CurveItemCollections, DrawItemStyle.LineItem); AddDrawItems(ref drawItemNames, lineRoadModel.TextItemCollections, DrawItemStyle.TextItem); AddDrawItems(ref drawItemNames, lineRoadModel.SymbolItemCollections, DrawItemStyle.SymbolItem); AddDrawItems(ref drawItemNames, lineRoadModel.ImageItemCollections, DrawItemStyle.ImageItem); AddDrawItems(ref drawItemNames, lineRoadModel.HcgzItemCollections, DrawItemStyle.HCGZItem); AddDrawItems(ref drawItemNames, lineRoadModel.CurveHasHatchItemCollections, DrawItemStyle.CurveHasHatchItem); AddDrawItems(ref drawItemNames, lineRoadModel.MultiHatchCurveItemCollections, DrawItemStyle.MultiHatchCurveItem); AddDrawItems(ref drawItemNames, lineRoadModel.NormalPuTuItemCollections, DrawItemStyle.NormalPuTuItem); AddDrawItems(ref drawItemNames, lineRoadModel.HatchRectItemCollections, DrawItemStyle.HatchRectItem); this.Drawingitems = drawItemNames; //测网设置; bool ifAddCeWang = lineRoadModel.ifAddCeWang; LineRoadCeWang lineroadcw = new LineRoadCeWang(ifAddCeWang); if (ifAddCeWang) { lineroadcw.ifHeng = lineRoadModel.IfCeWangHeng; lineroadcw.ifZong = lineRoadModel.IfCeWangZong; lineroadcw.cewangfixlen = StrUtil.StrToDouble(lineRoadModel.cewangfixlen, 0, "测网固定间距为非数值型"); lineroadcw.cewangsepnum = StrUtil.StrToInt(lineRoadModel.cewangsepnum, 0, "测网分数为非数值型"); if (null != lineRoadModel.cewangstyle) { lineroadcw.cewangstyle = EnumUtil.GetEnumByStr(lineRoadModel.cewangstyle.Trim(), CeWangStyleEnum.None); } lineroadcw.duishuminvalue = StrUtil.StrToDouble(lineRoadModel.duishuminvalue, 1, "对数最小值为非数值型"); lineroadcw.duishuParam = StrUtil.StrToDouble(lineRoadModel.duishuParam, 35, "对数系数为非数值型"); } this._cewang = lineroadcw; }