private void ObjectsAddedAction(object sender, GH_DocObjectEventArgs e) { foreach (GH_DocumentObject docObj in e.Objects) { if (docObj is NamedViewPPTComponent && docObj != this) { NamedViewPPTComponent pptObj = docObj as NamedViewPPTComponent; string message = GetTransLation(new string[] { "Please place only one NamedViewPPT component per document! Or recompute this component.", "请在每个文档中只放置一个已命名视图幻灯片运算器!或者,重新计算一下此运算器。" }); pptObj.AddRuntimeMessage(GH_RuntimeMessageLevel.Error, message); this.AddRuntimeMessage(GH_RuntimeMessageLevel.Error, message); } } }
public NamedViewPPTComponentAttributes(NamedViewPPTComponent owner) : base(owner) { Owner = owner; }