mirror of https://gitee.com/cf-fz/WebCAD.git
!1386 功能:设置板件纹路快捷命令
parent
9976636d71
commit
7923f52f75
@ -0,0 +1,28 @@
|
||||
import { app } from "../../ApplicationServices/Application";
|
||||
import { EBoardKeyList } from "../../Common/BoardKeyList";
|
||||
import { Board } from "../../DatabaseServices/Entity/Board";
|
||||
import { Command } from "../../Editor/CommandMachine";
|
||||
import { PromptStatus } from "../../Editor/PromptResult";
|
||||
import { LinesType } from "../../UI/Store/BoardInterface";
|
||||
|
||||
export class SetBoardLines implements Command
|
||||
{
|
||||
constructor(private lines: LinesType)
|
||||
{
|
||||
|
||||
}
|
||||
async exec()
|
||||
{
|
||||
let brRes = await app.Editor.GetSelection({
|
||||
Msg: "选择需要设置纹路的板件",
|
||||
Filter: { filterTypes: [Board] },
|
||||
UseSelect: true,
|
||||
});
|
||||
|
||||
if (brRes.Status === PromptStatus.Cancel) return;
|
||||
|
||||
let brs = brRes.SelectSet.SelectEntityList as Board[];
|
||||
for (let br of brs)
|
||||
br.BoardProcessOption[EBoardKeyList.Lines] = this.lines;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue