public List <LJJSPoint> AddLegendFrameToFigure() { List <LJJSPoint> ptbasecol = new List <LJJSPoint>(); if (_legendunitheigh > 0.01 && legendunitwidth > 0.01) { for (int i = 0; i < legendrownum; i++) { for (int j = 0; j < _legendcolumn; j++) { LJJSPoint ptbase = new LJJSPoint(_ptstart.XValue + j * legendunitwidth, _ptstart.YValue - i * _legendunitheigh * 2); LegendOper.AddSunStyleRect(ptbase, -2 * _legendunitheigh, legendunitwidth, 0); ptbasecol.Add(ptbase); } } } return(ptbasecol); }
private void SetLegendList() { List <string> txtlist = LegendOper.AyalyseTxtLegendLst(); legendLst = new List <string>(); foreach (string txtstr in txtlist) { string tmpstr = txtstr.Trim(); if (!legendLst.Contains(tmpstr)) { legendLst.Add(tmpstr); } } foreach (string legstr in LegendManage.SymLegendNameLst) { string tmplegstr = legstr.Trim(); if (!legendLst.Contains(tmplegstr)) { legendLst.Add(tmplegstr); } } }
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(); }