/// <summary> /// 撤销删除矩形内直线 /// </summary> /// <param name="rectangle"></param> public void UnDeleteRectLine(MergeRectCommand command) { foreach (PartitionLine line in command.InRectLines) { AddLine(line.Start, line.End, line.Position, line.IsRow); } }
/// <summary> /// 删除矩形内直线 /// </summary> /// <param name="rectangle"></param> public void DeleteRectLine(MergeRectCommand command) { command.InRectLines = FindInRectLine(command.BoundaryRect); foreach (PartitionLine line in command.InRectLines) { DeleteLine(line); } }
public void MergeMutiRects(MergeRectCommand command) { foreach (Rect rect in command.RemovedRects) { rect.IsDeleted = true; } this.X = command.BoundaryRect.X; this.Y = command.BoundaryRect.Y; this.Width = command.BoundaryRect.Width; this.Height = command.BoundaryRect.Height; }
public void PartMutiRects(MergeRectCommand command) { foreach (Rect rect in command.RemovedRects) { rect.IsDeleted = false; } this.X = command.LeftRect.X; this.Y = command.LeftRect.Y; this.Width = command.LeftRect.Width; this.Height = command.LeftRect.Height; }
/// <summary> /// 响应合并矩形命令 /// </summary> void MergeRect_Click(object sender, EventArgs e) { ///判断是否可以合并 List <Rect> dismergableRects = this.ListRect.GetDisMergableRects(); if (!ListRect.IsRectMergable())///可以合并 { // MessageBox.Show("存在锁定或所选矩形无法完成合并!"); MessageService.Show("${res:tmpltDesignTip.recMerge}", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); foreach (Rect rect in dismergableRects) { //DrawRectFlash(rect); } } else { MergeRectCommand mergeRectCommand = new MergeRectCommand(TDPanel); mergeRectCommand.Execute(); } }