Esempio n. 1
0
 protected void SetDeletePucker(CPoint[] selectBg)
 {
     if (this.DeleteSeelctPuckerLineStringAndY.IsNotNull())
     {
         var puckerAction = new PuckerDeleteAction(this.PParser);
         if (selectBg != null)
         {
             puckerAction.SetDrawBgLocal(selectBg);
             puckerAction.SetSurosrPointLocal(selectBg[0]);
         }
         puckerAction.SetPucker(this.DeleteSeelctPuckerLineStringAndY, true);
         this.PParser.AddAction(puckerAction);
     }
 }
Esempio n. 2
0
        //public void SetPucker(int y, bool isInit = false) {
        //    //this.pLineString = ls;
        //    //this.pY = y;
        //    puckerLineStringAndY.Add(new PuckerLineStringAndID(y));
        //    if (isInit) {
        //        this.SetOperationAction();
        //        this.SetDrawBg();
        //        this.SetSurosrPoint();
        //        this.PParser.ClearCouple();
        //        //this.SetSurosrPoint();
        //    }
        //}
        /// <summary>
        /// 设置折叠,不能调用Execute 方法。只是将操作存放到撤销列表中,但该相反操作不放入重做列表中。
        /// </summary>
        /// <param name="puckerLineStringAndY"></param>
        /// <param name="isInit"></param>
        public void SetPucker(List <PuckerLineStringAndID> puckerLineStringAndY, bool isInit = false)
        {
            //this.pY = y;
            this.puckerLineStringAndY = puckerLineStringAndY;
            //if (isInit) {
            //this.SetOperationAction();
            var pucker = new PuckerDeleteAction(this.PParser);

            pucker.IsDeletePucker       = true;
            pucker.puckerLineStringAndY = puckerLineStringAndY;
            pucker.SetDrawBgLocal(new CPoint[] { PStartForExecuteAfterShowSelectPoint, PEndForExecuteAfterShowSelectPoint });
            pucker.SetSurosrPointLocal(PStartForExecuteAfterShowSelectPoint);
            this.PActionOperation = pucker;
            this.SetSelectBg(PStartForExecuteAfterShowSelectPoint, PEndForExecuteAfterShowSelectPoint);
            this.PParser.ClearCouple();
        }
Esempio n. 3
0
        protected override BaseAction GetOperationAciton()
        {
            if (this.IsDeletePucker)
            {
                var nAction = new NoneAction(this.PParser);
                nAction.RedoExecute = CallBackRedoExecute;
                return(nAction);
            }

            var pucker = new PuckerDeleteAction(this.PParser);

            //pucker.IsDeleteCreate = this.IsDeleteCreate;
            pucker.SetPucker(this.puckerLineStringAndY);
            return(pucker);

            //return new NoneAction(this.PParser);
        }