- [CommandMethod("t_1")]
- public void Test1()
- {
- var db = Application.DocumentManager.MdiActiveDocument;
- var ed = db.Editor;
- var opts = new PromptKeywordOptions("\n选择颜色[红色(R)/绿色(G)/蓝色(B)]", "R G B");
- opts.Keywords.Default = "B";
- opts.AllowNone = true;
- var res = ed.GetKeywords(opts);
- if (res.Status == PromptStatus.OK)
- ed.WriteMessage("你选择了{0}", res.StringResult);
- }
|