|
马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
用UG UIStyler生成一个简单的对话框,产生的C#.net代码如下
但是,这个 private NXOpen.UIStyler.UnknownType change对话框;
是什么意思?有人知道吗?
public class UG5UICTest
{
// class members
private static Session theSession;
private static UI theUI;
public static UG5UICTest theUG5UICTest;
private Dialog theDialog;
private NXOpen.UIStyler.UnknownType change对话框;
private NXOpen.UIStyler.LabelItem changeLabel0;
private NXOpen.UIStyler.IntegerItem changeInt2;
public static bool isDisposeCalled;
……
private void InitializeUIStylerDialog()
{
try
{
//------------------------------------------------------------------------------
// The following code snippets initializes all the styler items and associate
// respective callbacks. Attributes of the styler item can be accessed and
// modified only after calling Show() or RegisterWithUiMenu().
//------------------------------------------------------------------------------
change对话框 = (NXOpen.UIStyler.UnknownType)theDialog.GetStylerItem("对话框", Dialog.ItemType.UnknownType);
change对话框.AddOkayHandler(new NXOpen.UIStyler.UnknownType.Okay(apply_ok), false);
change对话框.AddApplyHandler(new NXOpen.UIStyler.UnknownType.Apply(apply_apply), false);
change对话框.AddCancelHandler(new NXOpen.UIStyler.UnknownType.Cancel(apply_cancel), false);
changeLabel0 = (NXOpen.UIStyler.LabelItem)theDialog.GetStylerItem("LABEL_0", Dialog.ItemType.LabelItem);
changeInt2 = (NXOpen.UIStyler.IntegerItem)theDialog.GetStylerItem("INT_2", Dialog.ItemType.IntegerItem);
changeInt2.AddActivateHandler(new NXOpen.UIStyler.IntegerItem.Activate(Input_cb), false);
}
…… |
|