} //填充设计 public HatchRectDesignClass(HatchRectItemModel hatchRectItemModel) { this.ItemConstructor(hatchRectItemModel.ID, hatchRectItemModel.ItemShowName , hatchRectItemModel.ItemOrder, hatchRectItemModel.ItemSubStyle , hatchRectItemModel.ItemShowNamePosition); this.Color_FromFiled = StrUtil.GetNoNullStr(hatchRectItemModel.Color_FromField); this.ItemFromTable = StrUtil.GetNoNullStr(hatchRectItemModel.ItemFromTable); this.Xfield = StrUtil.GetNoNullStr(hatchRectItemModel.Xfield); this.Y_TopField = StrUtil.GetNoNullStr(hatchRectItemModel.Y_TopField); this.Y_BottomField = StrUtil.GetNoNullStr(hatchRectItemModel.Y_BottomField); this.ItemUnit = StrUtil.GetNoNullStr(hatchRectItemModel.ItemUnit); this.UnitPosition = EnumUtil.GetEnumByStr(hatchRectItemModel.UnitPosition, CJQXUnitPosition.RightPos); this.KDCIfShow = BoolUtil.GetBoolByBindID(hatchRectItemModel.KDCIfShow, true); this.ShowNameVSKDCHeigh = StrUtil.StrToDouble(hatchRectItemModel.ShowNameVSKDCHeigh, 5, "起始位置设计有误,为非数值型"); this.ItemHeaderStartheigh = StrUtil.StrToDouble(hatchRectItemModel.ItemHeaderStartheigh, 3, "起始位置非数值型"); ItemHatch = new LJJSHatch(hatchRectItemModel.FillMode , hatchRectItemModel.IsDrawBoundary , hatchRectItemModel.HatchPenColor , hatchRectItemModel.HatchPenWidth , hatchRectItemModel.FillBKColor , hatchRectItemModel.FillColor , hatchRectItemModel.HatchPattern , hatchRectItemModel.HatchScale , hatchRectItemModel.HatchBlk, ""); hrItemSubStyle = EnumUtil.GetEnumByStr(this.ItemSubStyle, HatchRectItemSubStyle.DirectFill); }
public string JsField; //井深对应的字段; public LineItemStruct(CurveItemModel curveItemModel) { LineItemID = curveItemModel.ID; CurveItemShowName = curveItemModel.CJQXShowName; LIFromTableName = curveItemModel.CJQXFromTableName.Trim(); LineItemUnit = curveItemModel.CJQXUnit.Trim(); LineItemType = EnumUtil.GetEnumByStr(curveItemModel.CJQXlineClass.Trim(), CJQXLineClass.Continus);// CurveItemDesignClass.GetLineClassByText(); KDCIfShow = BoolUtil.GetBoolByBindID(curveItemModel.KDCIfShow, true); LIFromFieldName = curveItemModel.CJQXFieldName.Trim(); JsField = StandardCurveItemBuilder.depth; if (!string.IsNullOrEmpty(curveItemModel.JSField.Trim())) { JsField = curveItemModel.JSField.Trim(); } FirstKDCStartHeigh = StrUtil.StrToDouble(curveItemModel.CJQXHeaderStartheigh.Trim(), "缺少绘图项顶部起始位置数据", "绘图项顶部起始位置数据非数值型"); LINameVSKDCHeigh = StrUtil.StrToDouble(curveItemModel.QXNameVSKDCHeigh.Trim(), 4, "曲线项名称与宽度尺的距离值为非数值型"); UnitPosition = EnumUtil.GetEnumByStr(curveItemModel.UnitPosition.Trim(), CJQXUnitPosition.AtRight); LineItemTitlePos = EnumUtil.GetEnumByStr(curveItemModel.QXItemTitlePosition, ItemTitlePos.Mid); //ItemOper.GetDrawingItemTitlePos(curveItemModel.QXItemTitlePosition.Trim()); LineItemChaoJie = EnumUtil.GetEnumByStr(curveItemModel.CJQXChaoJie.Trim(), CJQXChaoJie.BiaoZhu); LiSubClass = curveItemModel.LIDISubStyle.Trim(); }
public static void SetFrameDesginByFrameModel(FrameModel frameModel) { //比例尺; FrameDesign.CorTxtColor = frameModel.ScaleValueColor; FrameDesign.CorTxtFont = frameModel.ScaleValueFont; FrameDesign.CorTxtHeit = StrUtil.StrToDouble(frameModel.ScaleValueHeight, 8, "比例尺文本高度为非数值型"); FrameDesign.CorValue = frameModel.ScaleValue; FrameDesign.XCoordinate = StrUtil.StrToDouble(BiLiChiOper.GetXValueStr(frameModel.ScaleValue), "比例尺X值为空", "比例尺X值为非数值型"); FrameDesign.YCoordinate = StrUtil.StrToDouble(BiLiChiOper.GetYValueStr(frameModel.ScaleValue), "比例尺X值为空", "比例尺X值为非数值型"); //图例设计 FrameDesign.LegendPos = frameModel.LegendPos; //图例设计位置 FrameDesign.LegendStyle = frameModel.LegendStyle; //图例设计类型 FrameDesign.LegendColumnNum = StrUtil.StrToInt(frameModel.LegendColumnNum, 5, ""); //图例设计列数 FrameDesign.LegendUnitHeigh = StrUtil.StrToDouble(frameModel.LegendUnitHeigh, 10, "图例设计单位高度为非数值型"); //图例设计单位高度 FrameDesign.LegendTbAndField = frameModel.LegendTbAndField; //获得图例查询所涉及的表和字段; FrameDesign.IfAddLegend = BoolUtil.GetBoolByBindID(frameModel.IfAddLegend, true); // BoolUtil.GetBoolBySFStr(frameModel.IfAddLegend,true); //绘图项文字; if (!string.IsNullOrEmpty(frameModel.PictureItemFont)) { FrameDesign.PictureItemFont = frameModel.PictureItemFont; } if (!string.IsNullOrEmpty(frameModel.PictureItemTxtHeight)) { FrameDesign.PictureItemTxtHeight = StrUtil.StrToDouble(frameModel.PictureItemTxtHeight, 4, "绘图项文字的高度为非数值型"); } //图幅设计 FrameDesign.JdSpace = StrUtil.StrToDouble(frameModel.JDSpace, 20, "井段间距为非数值型"); FrameDesign.PictureFrameLineWidth = StrUtil.StrToDouble(frameModel.PictureFrameLineWidth, "缺少外框线宽", "外框线宽为非数值型"); //外框线宽 FrameDesign.LineRoadTitleBarHeigh = StrUtil.StrToDouble(frameModel.LineRoadTitleBarHeigh, "缺少线道标题栏高度", "线道标题栏高度为非数值型"); //线道标题栏高度 //刻度尺 if (!string.IsNullOrEmpty(frameModel.ScaleLabelTxtFont)) { FrameDesign.ScaleLabelTxtFont = frameModel.ScaleLabelTxtFont; } if (!string.IsNullOrEmpty(frameModel.ScaleLabelTxtHeight)) { FrameDesign.ScaleLabelTxtHeight = frameModel.ScaleLabelTxtHeight; } //图头文字 FrameDesign.HeaderContent = frameModel.PictureHeaderName; FrameDesign.PictureHeaderTXTStyle = frameModel.PictureHeaderTXTStyle; FrameDesign.HeadBigTxtHeight = StrUtil.StrToDouble(frameModel.HeadBigTxtHeight, 18, "图头字高为非数值型"); FrameDesign.HeaderTxtColor = frameModel.HeadBigTxtColor; }
} //间隔多少主刻度标注一次;例如,每两个主刻度标注一次; public JingShenDesignClass(JingShenModel jingShenModel) { ID = jingShenModel.ID.Trim(); MainKDLength = StrUtil.StrToDouble(jingShenModel.MainKDLength, 5, "井深的主刻度设计为非数值型"); MainKDSpace = StrUtil.StrToInt(jingShenModel.MainKDSpace, 5, "井深主刻度间隔设计为非数值型"); BZTxtHeigh = StrUtil.StrToDouble(jingShenModel.BZTxtHeigh, 2, "井深刻度标注文字高度为非数值型"); BZTxtFont = jingShenModel.BZTxtFont; isLeftMainKDShow = BoolUtil.GetBoolByBindID(jingShenModel.isLeftMainKDShow, true); // BoolUtil.GetBoolBySFStr(jingShenModel.isLeftMainKDShow,false); isRightMainKDShow = BoolUtil.GetBoolByBindID(jingShenModel.isRightMainKDShow, false); // BoolUtil.GetBoolBySFStr(jingShenModel.isRightMainKDShow,false); BiaoZhuSpace = 1; }
public LJJSHatch(string fillColor, string isDrawBoundary) { this.FillMode = LJJSFillMode.ModeSolid; this.FillColor = StrUtil.StrToInt(fillColor, Color.White.ToArgb(), "填充颜色设计有误,为非整型"); this.FillBKColor = Color.White.ToArgb(); this.HatchBlk = ""; this.HatchImage = ""; this.HatchPattern = ""; this.HatchScale = 1; this.IsDrawBoundary = BoolUtil.GetBoolByBindID(isDrawBoundary, true); this.PenWidth = 0; }
public LJJSHatch(string fillMode, string isDrawBoundary, string penColor, string penWidth , string fillBKColor, string fillColor, string hatchPattern, string hatchScale, string hatchBlk , string HatchImage) { FillMode = EnumUtil.GetEnumByStr(fillMode, LJJSFillMode.ModeNone); IsDrawBoundary = BoolUtil.GetBoolByBindID(isDrawBoundary, false); PenColor = StrUtil.StrToInt(penColor, Color.White.ToArgb(), "填充边界颜色设计有误,为非整型"); PenWidth = StrUtil.StrToDouble(penWidth, 0, "填充边界线条宽度设计有误,为非整型"); this.FillBKColor = StrUtil.StrToInt(fillBKColor, Color.White.ToArgb(), "填充背景颜色设计有误,为非整型");//如果填充类型为solid,背景色没有作用; this.FillColor = StrUtil.StrToInt(fillColor, Color.White.ToArgb(), "填充颜色设计有误,为非整型"); this.HatchPattern = StrUtil.GetNoNullStr(hatchPattern); this.HatchBlk = StrUtil.GetNoNullStr(hatchBlk); this.HatchImage = StrUtil.GetNoNullStr(HatchImage); this.HatchScale = StrUtil.StrToDouble(hatchScale, 1, "填充设计有误,为非数值型"); }
public SymbolItemDesignStruct(SymbolItemModel symbolItemModel) { ItemField = symbolItemModel.ItemField.Trim(); ItemName = symbolItemModel.ItemName.Trim(); ItemTable = symbolItemModel.ItemTable.Trim(); this.SyblIfHorFill = BoolUtil.GetBoolByBindID(symbolItemModel.SyblIfHorFill.Trim(), false); this.SyBolOffset = StrUtil.StrToDouble(symbolItemModel.SyBolOffset.Trim(), 0, "符号项设置有误"); this.SyHeaderStartheigh = StrUtil.StrToDouble(symbolItemModel.SyHeaderStartheigh.Trim(), 0, "符号项设置有误"); this.SyItemTxtVerSpace = StrUtil.StrToDouble(symbolItemModel.SyItemTxtVerSpace.Trim(), 0, "符号项设置有误"); this.SyJDBottom = symbolItemModel.SyJDBottom.Trim(); this.SyJDHeigh = symbolItemModel.SyJDHeigh.Trim(); this.SyJDTop = symbolItemModel.SyJDTop.Trim(); this.SymbolFramePro = EnumUtil.GetEnumByStr(symbolItemModel.SymbolFrame, SymbolFrame.NoFrame); //SymbolItemClass.GetSymbolFrameStyle(symbolItemModel.SymbolFrame.Trim()); this.SymbolItemColor = StrUtil.StrToInt(symbolItemModel.SymbolItemColor.Trim(), DrawCommonData.BlackColorRGB, "符号项颜色设置有误"); this.SymbolItemTitleHorPos = EnumUtil.GetEnumByStr(symbolItemModel.SymbolItemTitleHorPos, ItemTitlePos.Mid); //ItemOper.GetDrawingItemTitlePos(symbolItemModel.SymbolItemTitleHorPos.Trim()); this.SymbolOrder = StrUtil.StrToInt(symbolItemModel.SymbolOrder, 0, "符号项设置有误"); this.SymDISubStyle = SymbolItemClass.GetSymDISubStyleByStr(symbolItemModel.SymDISubStyle.Trim()); this.SymDepthFieldStyle = ZuoBiaoOper.GetDepthFieldStyle(symbolItemModel.SyJDTop, symbolItemModel.SyJDBottom, symbolItemModel.SyJDHeigh); }
} //三级填充颜色,最靠线道一侧的填充 public MultiHatchCurveDesignClass(MultiHatchCurveItemModel mHatchItem) { this.ItemConstructor(mHatchItem.ID , mHatchItem.ItemShowName, mHatchItem.ItemOrder , "", mHatchItem.ItemShowNamePosition); this.ItemFromTable = StrUtil.GetNoNullStr(mHatchItem.ItemFromTable); this.Xfield = StrUtil.GetNoNullStr(mHatchItem.Xfield); this.Yfield = StandardCurveItemBuilder.GetJSField(mHatchItem.Yfield); this.FenJieValueOne = StrUtil.StrToDouble(mHatchItem.FenJieValueOne, -1, "分界值1为非数值型"); this.FenJieValueTwo = StrUtil.StrToDouble(mHatchItem.FenJieValueTwo, -1, "分界值2为非数值型"); this.ItemUnit = StrUtil.GetNoNullStr(mHatchItem.ItemUnit); this.UnitPosition = EnumUtil.GetEnumByStr(mHatchItem.UnitPosition, CJQXUnitPosition.MidBottomPos); this.KDCIfShow = BoolUtil.GetBoolByBindID(mHatchItem.KDCIfShow, true); this.ShowNameVSKDCHeigh = StrUtil.StrToDouble(mHatchItem.ShowNameVSKDCHeigh, 5, "绘图项题目与刻度尺距离非数值型"); this.ItemHeaderStartheigh = StrUtil.StrToDouble(mHatchItem.ItemHeaderStartheigh, 3, "非数值型"); this.HatchCount = StrUtil.StrToInt(mHatchItem.HatchCount, 1, "填充级数非数值型"); this.HatchOne = new LJJSHatch(mHatchItem.HatchColorOne, bool.FalseString); this.HatchTwo = new LJJSHatch(mHatchItem.HatchColorTwo, bool.FalseString); this.HatchThree = new LJJSHatch(mHatchItem.HatchColorThree, bool.FalseString); }
public static void SetSymbolCodeClassHt() { _symbolcodeclassht.Clear(); DbDataReader dr = SymbolCodeDAL.GetAllSymbolCode(); if (dr.HasRows) { while (dr.Read()) { SymbolCodeClass sycc = new SymbolCodeClass(); sycc.symbolcode = dr["SymbolCode"].ToString().Trim(); sycc.symbolHeigh = StrUtil.StrToDouble(dr["SymbolHeigh"].ToString(), 0, "符号高度的数据为非数值型"); sycc.ifFill = BoolUtil.GetBoolByBindID(dr["IfFill"].ToString(), false); sycc.ifZXEnlarge = BoolUtil.GetBoolByBindID(dr["IfZXEnlarge"].ToString(), false); sycc.symbolWidth = StrUtil.StrToDouble(dr["SymbolWidth"].ToString(), 0, "符号宽度的数据为非数值型"); sycc.legendSequence = StrUtil.StrToInt(dr["xh"].ToString(), sycc.symbolcode + "图例缺少图例序号", sycc.symbolcode + "图例序号为非数值型"); sycc.legendstyle = LegendOper.GetLegendTypeByStr(dr["LegendType"].ToString()); if (sycc.legendstyle == LegendStyle.errStyle) { sycc.legendstyle = LegendStyle.YSTxtStyle; MessageBox.Show(sycc.symbolcode + "图例类型表述错误,请检查符号设置表,系统默认为颜色文本类型符号"); } sycc.symbolChineseName = dr["ysmc"].ToString().Trim(); sycc.legendWidth = StrUtil.StrToDouble(dr["LegendlWidth"].ToString(), 20, sycc.symbolcode + "图例框宽度为非数值型"); try { _symbolcodeclassht.Add(sycc.symbolcode, sycc); } catch { continue; } } } dr.Close(); }