コード例 #1
0
        public void DeleteSelection()
        {
            DeleteTextAction action = new DeleteTextAction(
                this, this.SelectionStart, this.SelectionLength);

            RunAction(action);
        }
コード例 #2
0
        public void DeleteSelection()
        {
            DeleteTextAction action = new DeleteTextAction(
                this, this.SelectionStart, this.SelectionLength);

            RunAction(action);
        }
コード例 #3
0
            public override bool TryToMerge(IAction followingAction)
            {
                DeleteTextAction next = followingAction as DeleteTextAction;

                if (next != null && next.Textbox == this.Textbox)
                {
                    if (next.selectionEnd == this.selectionStart)
                    {
                        this.selectionStart  -= next.selectionLength;
                        this.selectionLength += next.selectionLength;
                        this.deletedText      = next.deletedText + this.deletedText;
                        next.Execute();
                        return(true);
                    }
                    else if (next.selectionStart == this.selectionStart)
                    {
                        this.selectionLength += next.selectionLength;
                        this.deletedText     += next.deletedText;
                        next.Execute();
                        return(true);
                    }
                }
                return(false);
            }