コード例 #1
0
        /// <summary>
        /// 合并行
        /// </summary>
        /// <param name="upLs"></param>
        /// <param name="nowLs"></param>
        private void MergeLineString(LineString upLs, LineString nowLs)
        {
            LineString changeLine = upLs;

            if (upLs.IsFurl())
            {
                var hideArray = this.PParser.PPucker.PDictPuckerList[upLs.ID];
                changeLine = hideArray.Last();
                //upLs.PLNProperty.IsFurl = false;
                this.PParser.PPucker.ClickPucker(upLs, this.PParser.PCursor.CousorPointForWord.Y);
                this.PParser.PCursor.CousorPointForWord.Y += hideArray.Length;
                this.PParser.PCursor.CousorPointForEdit.Y += hideArray.Length * FontContainer.FontHeight;
            }
            if (nowLs.IsFurl())
            {
                if (changeLine.IsEndRange())
                {
                    //nowLs.PLNProperty.IsFurl = false;
                    this.PParser.PPucker.ClickPucker(nowLs, this.PParser.PCursor.CousorPointForWord.Y);
                }
                else
                {
                    MergeLineStringChangeXY(changeLine);
                    changeLine.Text += this.GetLineStringEffectualText(nowLs);
                    this.SetResetLineString(changeLine);
                    this.RemovePuckerLeavingOnly(nowLs.GetLnpAndId(), changeLine);
                    return;
                }
            }
            MergeLineStringChangeXY(changeLine);
            changeLine.Text += nowLs.Text;
            this.SetResetLineString(changeLine);
        }