コード例 #1
0
ファイル: secondDialog.cs プロジェクト: Jipsey/ToolHolder
    private NXOpen.BlockStyler.Tree tree_control0;                 // Block type: Tree Control

    //------------------------------------------------------------------------------
    //Constructor for NX Styler class
    //------------------------------------------------------------------------------
    public secondDialog()
    {
        try
        {
            theSession     = Session.GetSession();
            theUI          = UI.GetUI();
            theDlxFileName = "secondDialog.dlx";
            theDialog      = theUI.CreateDialog(theDlxFileName);
            theDialog.AddApplyHandler(new NXOpen.BlockStyler.BlockDialog.Apply(apply_cb));
            theDialog.AddOkHandler(new NXOpen.BlockStyler.BlockDialog.Ok(ok_cb));
            theDialog.AddUpdateHandler(new NXOpen.BlockStyler.BlockDialog.Update(update_cb));
            theDialog.AddCancelHandler(new NXOpen.BlockStyler.BlockDialog.Cancel(cancel_cb));
            theDialog.AddFilterHandler(new NXOpen.BlockStyler.BlockDialog.Filter(filter_cb));
            theDialog.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(initialize_cb));
            theDialog.AddFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.FocusNotify(focusNotify_cb));
            theDialog.AddKeyboardFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.KeyboardFocusNotify(keyboardFocusNotify_cb));
            theDialog.AddEnableOKButtonHandler(new NXOpen.BlockStyler.BlockDialog.EnableOKButton(enableOKButton_cb));
            theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            throw ex;
        }
    }
コード例 #2
0
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public fcfsetting()
 {
     try
     {
         theSession    = Session.GetSession();
         theUI         = UI.GetUI();
         theDialogName = "fcfsetting.dlx";
         theDialog     = theUI.CreateDialog(theDialogName);
         theDialog.AddApplyHandler(new NXOpen.BlockStyler.BlockDialog.Apply(apply_cb));
         theDialog.AddOkHandler(new NXOpen.BlockStyler.BlockDialog.Ok(ok_cb));
         theDialog.AddUpdateHandler(new NXOpen.BlockStyler.BlockDialog.Update(update_cb));
         theDialog.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(initialize_cb));
         theDialog.AddFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.FocusNotify(focusNotify_cb));
         theDialog.AddKeyboardFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.KeyboardFocusNotify(keyboardFocusNotify_cb));
         theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         throw ex;
     }
 }
コード例 #3
0
ファイル: addnew.cs プロジェクト: jerryhethatday/410proj
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public addnew()
 {
     try
     {
         theSession = Session.GetSession();
         theUI = UI.GetUI();
         theDialogName = "addnew.dlx";
         theDialog = theUI.CreateDialog(theDialogName);
         theDialog.AddApplyHandler(new NXOpen.BlockStyler.BlockDialog.Apply(apply_cb));
         theDialog.AddOkHandler(new NXOpen.BlockStyler.BlockDialog.Ok(ok_cb));
         theDialog.AddUpdateHandler(new NXOpen.BlockStyler.BlockDialog.Update(update_cb));
         theDialog.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(initialize_cb));
         theDialog.AddFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.FocusNotify(focusNotify_cb));
         theDialog.AddKeyboardFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.KeyboardFocusNotify(keyboardFocusNotify_cb));
         theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         throw ex;
     }
 }
コード例 #4
0
ファイル: SuperBox.cs プロジェクト: ycchen10/MolexPlugin1899
 private List <NXObject> prtviewFeature = new List <NXObject>(); //预览特征
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public SuperBox()
 {
     try
     {
         theSession     = Session.GetSession();
         theUFSession   = UFSession.GetUFSession();
         theUI          = NXOpen.UI.GetUI();
         theDlxFileName = "SuperBox.dlx";
         theDialog      = theUI.CreateDialog(theDlxFileName);
         theDialog.AddApplyHandler(new NXOpen.BlockStyler.BlockDialog.Apply(apply_cb));
         theDialog.AddOkHandler(new NXOpen.BlockStyler.BlockDialog.Ok(ok_cb));
         theDialog.AddUpdateHandler(new NXOpen.BlockStyler.BlockDialog.Update(update_cb));
         theDialog.AddFilterHandler(new NXOpen.BlockStyler.BlockDialog.Filter(filter_cb));
         theDialog.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(initialize_cb));
         theDialog.AddFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.FocusNotify(focusNotify_cb));
         theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         throw ex;
     }
 }
コード例 #5
0
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public RevolveTrim()
 {
     try
     {
         theSession    = Session.GetSession();
         theUI         = UI.GetUI();
         theDialogName = "RevolveTrim.dlx";
         theDialog     = theUI.CreateDialog(theDialogName);
         theDialog.AddApplyHandler(new NXOpen.BlockStyler.BlockDialog.Apply(ApplyCB));
         theDialog.AddOkHandler(new NXOpen.BlockStyler.BlockDialog.Ok(ok_cb));
         theDialog.AddUpdateHandler(new NXOpen.BlockStyler.BlockDialog.Update(update_cb));
         theDialog.AddCancelHandler(new NXOpen.BlockStyler.BlockDialog.Cancel(cancel_cb));
         theDialog.AddFilterHandler(new NXOpen.BlockStyler.BlockDialog.Filter(filter_cb));
         theDialog.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(InitializeCB));
         theDialog.AddFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.FocusNotify(focusNotify_cb));
         theDialog.AddKeyboardFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.KeyboardFocusNotify(keyboardFocusNotify_cb));
         theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #6
0
    public void buildDialog()
    {
        if (!File.Exists(_tempoDlxFilePath))
        {
            throw new Exception(String.Format("нет файла даилога ! \nпуть: {0}", _tempoDlxFilePath));
        }

        theDialog = theUI.CreateDialog(_tempoDlxFilePath);
        theDialog.AddApplyHandler(new NXOpen.BlockStyler.BlockDialog.Apply(apply_cb));
        theDialog.AddOkHandler(new NXOpen.BlockStyler.BlockDialog.Ok(ok_cb));
        theDialog.AddUpdateHandler(new NXOpen.BlockStyler.BlockDialog.Update(update_cb));
        theDialog.AddCancelHandler(new NXOpen.BlockStyler.BlockDialog.Cancel(cancel_cb));
        //theDialog.AddFilterHandler(new NXOpen.BlockStyler.BlockDialog.Filter(filter_cb));
        theDialog.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(initialize_cb));
        theDialog.AddFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.FocusNotify(focusNotify_cb));
        theDialog.AddKeyboardFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.KeyboardFocusNotify(keyboardFocusNotify_cb));
        theDialog.AddEnableOKButtonHandler(new NXOpen.BlockStyler.BlockDialog.EnableOKButton(enableOKButton_cb));

        //   foreach (var tree in _tree_control0List)
        //   {
        theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
        //  }
    }
コード例 #7
0
ファイル: ano.cs プロジェクト: sadgood/410proj
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public ano()
 {
     try
     {
         theSession    = Session.GetSession();
         theUI         = UI.GetUI();
         theDialogName = "ano.dlx";
         theDialog     = theUI.CreateDialog(theDialogName);
         theDialog.AddApplyHandler(new NXOpen.BlockStyler.BlockDialog.Apply(apply_cb));
         theDialog.AddOkHandler(new NXOpen.BlockStyler.BlockDialog.Ok(ok_cb));
         theDialog.AddUpdateHandler(new NXOpen.BlockStyler.BlockDialog.Update(update_cb));
         theDialog.AddCancelHandler(new NXOpen.BlockStyler.BlockDialog.Cancel(cancel_cb));
         theDialog.AddFilterHandler(new NXOpen.BlockStyler.BlockDialog.Filter(filter_cb));
         theDialog.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(initialize_cb));
         theDialog.AddFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.FocusNotify(focusNotify_cb));
         theDialog.AddKeyboardFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.KeyboardFocusNotify(keyboardFocusNotify_cb));
         theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch
     {
         //---- Enter your exception handling code here -----
         theUI.NXMessageBox.Show("提示", NXMessageBox.DialogType.Warning, "请先打开一个模型在使用本工具");
     }
 }
コード例 #8
0
ファイル: CreateSheet.cs プロジェクト: NWPU-UGNX/096
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public CreateSheet()
 {
     try
     {
         theSession = Session.GetSession();
         theUI = UI.GetUI();
         theDialogName = "CreateSheet.dlx";
         theDialog = theUI.CreateDialog(theDialogName);
         theDialog.AddApplyHandler(new NXOpen.BlockStyler.BlockDialog.Apply(ApplyCB));
         theDialog.AddOkHandler(new NXOpen.BlockStyler.BlockDialog.Ok(ok_cb));
         theDialog.AddUpdateHandler(new NXOpen.BlockStyler.BlockDialog.Update(update_cb));
         theDialog.AddCancelHandler(new NXOpen.BlockStyler.BlockDialog.Cancel(cancel_cb));
         theDialog.AddFilterHandler(new NXOpen.BlockStyler.BlockDialog.Filter(filter_cb));
         theDialog.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(InitializeCB));
         theDialog.AddFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.FocusNotify(focusNotify_cb));
         theDialog.AddKeyboardFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.KeyboardFocusNotify(keyboardFocusNotify_cb));
         theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #9
0
ファイル: RevolveTrim.cs プロジェクト: NWPU-UGNX/capp
    private NXOpen.BlockStyler.UIBlock toggle01; // Block type: Toggle

    #endregion Fields

    #region Constructors

    //------------------------------------------------------------------------------
    //Constructor for NX Styler class
    //------------------------------------------------------------------------------
    public RevolveTrim()
    {
        try
        {
            theSession = Session.GetSession();
            theUI = UI.GetUI();
            theDialogName = "RevolveTrim.dlx";
            theDialog = theUI.CreateDialog(theDialogName);
            theDialog.AddApplyHandler(new NXOpen.BlockStyler.BlockDialog.Apply(ApplyCB));
            theDialog.AddOkHandler(new NXOpen.BlockStyler.BlockDialog.Ok(ok_cb));
            theDialog.AddUpdateHandler(new NXOpen.BlockStyler.BlockDialog.Update(update_cb));
            theDialog.AddCancelHandler(new NXOpen.BlockStyler.BlockDialog.Cancel(cancel_cb));
            theDialog.AddFilterHandler(new NXOpen.BlockStyler.BlockDialog.Filter(filter_cb));
            theDialog.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(InitializeCB));
            theDialog.AddFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.FocusNotify(focusNotify_cb));
            theDialog.AddKeyboardFocusNotifyHandler(new NXOpen.BlockStyler.BlockDialog.KeyboardFocusNotify(keyboardFocusNotify_cb));
            theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
        }
        catch (Exception ex)
        {
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }