Exemplo n.º 1
0
        /// <summary>
        /// 解释WordImgCell信息字符串
        /// </summary>
        public static List <WordImgCell> SetWordImgCells(string fields)
        {
            List <WordImgCell> WordImgCells = new List <WordImgCell>();

            if (fields == "")
            {
                return(WordImgCells);
            }
            string[] Field = fields.Split('@');
            for (int i = 0; i < Field.Length; i++)
            {
                string[]    FieldInfo = Field[i].ToString().Split(';');
                WordImgCell wic       = new WordImgCell();
                wic.imgName     = FieldInfo[0].ToString();
                wic.tableIndex  = int.Parse(FieldInfo[1]);
                wic.rowIndex    = int.Parse(FieldInfo[2]);
                wic.columnIndex = int.Parse(FieldInfo[3]);
                wic.imgHeight   = int.Parse(FieldInfo[4]);
                wic.imgWidth    = int.Parse(FieldInfo[5]);
                //wic.inf = FieldInfo[6];
                //wic.infRowIndex = int.Parse(FieldInfo[7]);
                //wic.infColumnIndex = int.Parse(FieldInfo[8]);
                wic.locMapName        = FieldInfo[6];
                wic.locMapRowIndex    = int.Parse(FieldInfo[7]);
                wic.locMapColumnIndex = int.Parse(FieldInfo[8]);
                WordImgCells.Add(wic);
            }
            return(WordImgCells);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 获取WordImgCell信息字符串
 /// </summary>
 /// <returns></returns>
 public static string GetWordImgCells(List <WordImgCell> lwic)
 {
     if (lwic != null)
     {
         string FieldInfo = "";
         for (int i = 0; i < lwic.Count; i++)
         {
             WordImgCell wic = (WordImgCell)lwic[i];
             FieldInfo += wic.imgName + ";";
             FieldInfo += wic.tableIndex.ToString() + ";";
             FieldInfo += wic.rowIndex.ToString() + ";";
             FieldInfo += wic.columnIndex + ";";
             FieldInfo += wic.imgWidth.ToString() + ";";
             FieldInfo += wic.imgHeight.ToString() + ";";
             //FieldInfo += wic.inf + ";";
             //FieldInfo += wic.infRowIndex.ToString() + ";";
             //FieldInfo += wic.infColumnIndex.ToString() + ";";
             FieldInfo += wic.locMapName + ";";
             FieldInfo += wic.locMapRowIndex.ToString() + ";";
             FieldInfo += wic.locMapColumnIndex.ToString() + "@";
         }
         return(FieldInfo.TrimEnd('@'));
     }
     else
     {
         return("");
     }
 }
Exemplo n.º 3
0
        public WordImgCell Copy()
        {
            WordImgCell wic = new WordImgCell();

            wic.columnIndex = this.columnIndex;
            wic.imgHeight   = this.imgHeight;
            wic.imgName     = this.imgName;
            wic.imgWidth    = this.imgWidth;
            //wic.inf = this.inf;
            //wic.infColumnIndex = this.infColumnIndex;
            //wic.infRowIndex = this.infRowIndex;
            wic.locMapColumnIndex = this.locMapColumnIndex;
            wic.locMapName        = this.locMapName;
            wic.locMapRowIndex    = this.locMapRowIndex;
            wic.rowIndex          = this.rowIndex;
            wic.tableIndex        = this.tableIndex;
            return(wic);
        }