コード例 #1
0
 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);
 }
コード例 #2
0
ファイル: TextItem.cs プロジェクト: zhanghang080/Drawlatest
        public TxtItemClass(TextItemModel txtItemModel)
        {
            if (null != txtItemModel)
            {
                _iD = txtItemModel.ID.Trim();

                _txtItemName          = txtItemModel.TxtItemName.Trim();
                _FromFieldName        = txtItemModel.TxtItemField.Trim();
                _TxtItemTitleSpace    = StrUtil.StrToDouble(txtItemModel.TxtItemTitleSpace, 0, "文本项标题的纵向距离为非数值型");      //MyNormalOper.GetDoubleValue(ht["TxtItemTitleSpace"].ToString().Trim(), 0, "文本项标题的纵向具体为非数值型");
                _TxtPaiLie            = EnumUtil.GetEnumByStr(txtItemModel.TxtPaiLie, TxtArrangeStyle.TxtHorArrange);
                _TxtPosition          = EnumUtil.GetEnumByStr(txtItemModel.TxtPosition, AttachmentPoint.BottomCenter);  // PositionUtil.GetTxtPositionForCAD(txtItemModel.TxtPosition);
                _TxtDistribution      = EnumUtil.GetEnumByStr(txtItemModel.TxtLayOut.Trim(), Txtdistribution.Txtfocus); // ht["TxtLayOut"].ToString());//分散或集中;
                _TxtJDTop             = txtItemModel.TxtJDTop.Trim();                                                   // ht["TxtJDTop"].ToString().Trim();
                _TxtJDHeigh           = txtItemModel.TxtJDHeigh.Trim();                                                 // ht["TxtJDHeigh"].ToString().Trim();
                _TxtJDBottom          = txtItemModel.TxtJDBottom.Trim();                                                // ht["TxtJDBottom"].ToString().Trim();
                _TxtColor             = StrUtil.StrToInt(txtItemModel.TxtColor, Color.Black.ToArgb(), "文本项颜色为非数值型");    // AutoCADColor.FromColor(SysColor.FromArgb(MyNormalOper.GetIntValue(ht["TxtColor"].ToString(), 0, "文本项颜色为非数值型")));
                _TxtItemFromTableName = txtItemModel.TxtItemFromTbName.Trim();                                          // ht["TxtItemFromTbName"].ToString().Trim();
                _TxtHeaderStartheigh  = StrUtil.StrToDouble(txtItemModel.TxtHeaderStartheigh.Trim(), 8, "文本项的起始位置为非数值型");
                _TxtSize              = StrUtil.StrToDouble(txtItemModel.TxtSize.Trim(), 1.5, "文本项的字高为非数值型");
                _TextOutFrame         = EnumUtil.GetEnumByStr(txtItemModel.TextOutFrame, TxtItemOutFrame.NoFrame);   //PositionUtil.GetTxtItemOutFrameStyle(txtItemModel.TextOutFrame.Trim());
                _TxtOutFrameWidth     = StrUtil.StrToDouble(txtItemModel.TxtOutFrameWidth, -1, "文本项平行纵向外框的宽度为非数值型");
                _TxtOutFrameVerDivPos = EnumUtil.GetEnumByStr(txtItemModel.TxtOutFrameVerDivPos, VerDivPos.LeftPos); //PositionUtil.GetTxtItemOutFrameVerDivPos(txtItemModel.TxtOutFrameVerDivPos);
                _TIOffset             = StrUtil.StrToDouble(txtItemModel.TIOffset, 0, "文本项的相对平移距离为非数值型");
                _TiStyle              = EnumUtil.GetEnumByStr(txtItemModel.TxtItemStyle, TxtItemStyle.TxtStyle);     //GetTxtStyle(txtItemModel.TxtItemStyle);
                _ThinBZPosStyle       = EnumUtil.GetEnumByStr(txtItemModel.ThinBZpos, ThinBZPosStyle.TopPos);        //PositionUtil.GetThinBZPosStyle(txtItemModel.ThinBZpos);
                _txtItemTitlePos      = EnumUtil.GetEnumByStr(txtItemModel.TxtItemTitleHorPos, ItemTitlePos.Mid);    //ItemOper.GetDrawingItemTitlePos(txtItemModel.TxtItemTitleHorPos);
                _depthstyle           = ZuoBiaoOper.GetDepthFieldStyle(_TxtJDTop, _TxtJDBottom, _TxtJDHeigh);
                _TxtDiSubStyle        = txtItemModel.TxtDiSubStyle.Trim();                                           // ht["TxtDiSubStyle"].ToString().Trim();

                if (string.IsNullOrEmpty(txtItemModel.TxtFont.Trim()))
                {
                    _TxtStrFont = txtItemModel.TxtFont.Trim();// ht["TxtFont"].ToString().Trim();
                }
                else
                {
                    _TxtStrFont = "宋体";
                }
            }
        }
コード例 #3
0
        }                                    //附加图片的类型;

        public ImageItemDesignClass(ImageItemModel imageItemModel)
        {
            // TODO: Complete member initialization
            this.ID                 = imageItemModel.ID.Trim();
            this.ImageFromField     = imageItemModel.ImageFromField.Trim();
            this.ImageItemOrder     = StrUtil.StrToInt(imageItemModel.ImageItemOrder, 0, "图片项序号为非整数型");
            this.ImageItemSubStyle  = imageItemModel.ImageItemSubStyle.Trim();
            this.ImageJDBottomField = imageItemModel.ImageJDBottomField.Trim();
            this.ImageJDHeighField  = imageItemModel.ImageJDHeighField.Trim();
            this.ImageJDTopField    = imageItemModel.ImageJDTopField.Trim();
            this.ItemFromTable      = imageItemModel.ItemFromTable.Trim();
            this.ItemName           = imageItemModel.ItemName.Trim();
            this.ImageJDStyle       = ZuoBiaoOper.GetDepthFieldStyle(imageItemModel.ImageJDStyle.Trim());
            this.TitleHorPostion    = EnumUtil.GetEnumByStr(imageItemModel.TitleHorPostion, ItemTitlePos.Mid); //ItemOper.GetDrawingItemTitlePos(imageItemModel.TitleHorPostion.Trim());
            this.TitleTxtStartHeigh = StrUtil.StrToDouble(imageItemModel.TitleTxtStartHeigh.Trim(), 4, "绘图项标题高度为非数值型");
            this.ImageAdditionOne   = imageItemModel.ImageAdditionOne;
            this.ImageAdditionTwo   = imageItemModel.ImageAdditionTwo;
            this.ImageAdditionThree = imageItemModel.ImageAdditionThree;
            this.ImageAdditionFour  = imageItemModel.ImageAdditionFour;
            this.ImageAdditionFive  = imageItemModel.ImageAdditionFive;
            this.ImageAdditionSix   = imageItemModel.ImageAdditionSix;
            this.FormStyle          = imageItemModel.FormStyle;
        }