Пример #1
0
    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
    //------------------------------------------------------------------------------
    //Function Name: RegisterUserDefinedUIBlock
    //Registers itself to the dialog which contains this block
    //------------------------------------------------------------------------------
    public static startDialog RegisterUserDefinedUIBlock(NXOpen.BlockStyler.BlockDialog parentDialog, string blockID)
    {
        startDialog thestartDialog = new startDialog();

        parentDialog.RegisterUserDefinedUIBlock(thestartDialog.theUserDefinedUIBlock, blockID);
        return(thestartDialog);
    }
Пример #3
0
    //------------------------------------------------------------------------------
    //Constructor for NX Styler class
    //------------------------------------------------------------------------------
    public PointManager()
    {
        try
        {
            theSession   = Session.GetSession();
            theUI        = UI.GetUI();
            theUFSession = UFSession.GetUFSession();

            //theSession.ListingWindow.Open();
            //theSession.ListingWindow.WriteLine(AppDomain.CurrentDomain.BaseDirectory);

            theDlxFileName = AppDomain.CurrentDomain.BaseDirectory + @"\PointManager.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.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(initialize_cb));
            theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            throw ex;
        }
    }
Пример #4
0
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Method Name: Dispose
    //------------------------------------------------------------------------------
    public void Dispose()
    {
        if (theUserDefinedUIBlock != null)
        {
            theUserDefinedUIBlock.Dispose();
            theUserDefinedUIBlock = null;
        }
    }
Пример #5
0
 public void Dispose()
 {
     if ((this != null) && (this.NXOpenBlockDialog != null))
     {
         this.NXOpenBlockDialog.Dispose();
         this.NXOpenBlockDialog = null;
     }
 }
Пример #6
0
 //------------------------------------------------------------------------------
 //Method Name: Dispose
 //------------------------------------------------------------------------------
 public void Dispose()
 {
     if (theDialog != null)
     {
         theDialog.Dispose();
         theDialog = null;
     }
 }
Пример #7
0
 //------------------------------------------------------------------------------
 //Method Name: Dispose
 //------------------------------------------------------------------------------
 public void Dispose()
 {
     if (theDialog != null)
     {
         DeleteTempoDLXFile();
         theDialog.Dispose();
         theDialog = null;
     }
 }
 //------------------------------------------------------------------------------
 //Method Name: Dispose
 //------------------------------------------------------------------------------
 public void Dispose()
 {
     if (theDialog != null)
     {
         _dataService = null;
         theDialog.Dispose();
         theDialog = null;
     }
 }
Пример #9
0
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public PositioningManageUI()
 {
     try
     {
         theSession     = Session.GetSession();
         theUI          = UI.GetUI();
         theDlxFileName = "PositioningManageUI.dlx";
         theDialog      = theUI.CreateDialog(theDlxFileName);
         InitEvent(theDialog, initialize_cb);
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         throw ex;
     }
 }
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public RhinoInsidePreferences()
 {
     try
     {
         theDlxFileName = "RhinoInside_Preferences.dlx";
         theDialog      = TheUI.CreateDialog(theDlxFileName);
         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.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         throw ex;
     }
 }
Пример #11
0
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public CheckRegionsUI()
 {
     try
     {
         theSession     = Session.GetSession();
         theUI          = UI.GetUI();
         theDlxFileName = "CheckRegionsUI.dlx";
         InitEvent(theDlxFileName, initialize_cb, (s) =>
         {
             return(theDialog = theUI.CreateDialog(s));
         });
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #12
0
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public ColoredBlock()
 {
     try
     {
         theSession    = Session.GetSession();
         theUI         = UI.GetUI();
         theDialogName = "ColoredBlock.dlx";
         theDialog     = theUI.CreateDialog(theDialogName);
         theDialog.AddApplyHandler(new NXOpen.BlockStyler.BlockDialog.Apply(apply_cb));
         theDialog.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(initialize_cb));
         theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         throw ex;
     }
 }
Пример #13
0
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public SimpleDialog()
 {
     try
     {
         theSession     = Session.GetSession();
         theUI          = UI.GetUI();
         theDlxFileName = @"F:\Store\SANEK\Volume\NXOpen\5_ToolHolder\AllBitmaps\SimpleDialog.dlx";
         theDialog      = theUI.CreateDialog(theDlxFileName);
         theDialog.AddUpdateHandler(new NXOpen.BlockStyler.BlockDialog.Update(update_cb));
         theDialog.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(initialize_cb));
         theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         throw ex;
     }
 }
Пример #14
0
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public EdmDrawUI()
 {
     try
     {
         theSession     = Session.GetSession();
         theUI          = UI.GetUI();
         theDlxFileName = "EdmDrawUI.dlx";
         InitEvent(theDlxFileName, initialize_cb, (s) =>
         {
             return(theDialog = theUI.CreateDialog(s));
         });
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         throw ex;
     }
 }
Пример #15
0
    private NXOpen.BlockStyler.Button button02; // Block type: Button

    //------------------------------------------------------------------------------
    //Constructor for NX Styler class
    //------------------------------------------------------------------------------
    public startDialog()
    {
        try
        {
            theSession            = Session.GetSession();
            theUI                 = UI.GetUI();
            theDlxFileName        = "startDialog.dlx";
            theUserDefinedUIBlock = theUI.CreateDialog(theDlxFileName);
            theUserDefinedUIBlock.AddUpdateHandler(new NXOpen.BlockStyler.BlockDialog.Update(update_cb));
            theUserDefinedUIBlock.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(initialize_cb));
            theUserDefinedUIBlock.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            throw ex;
        }
    }
Пример #16
0
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public CheckRegionsUI()
 {
     try
     {
         theSession     = Session.GetSession();
         theUI          = UI.GetUI();
         theDlxFileName = "CheckRegionsUI.dlx";
         theDialog      = theUI.CreateDialog(theDlxFileName);
         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.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #17
0
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public ElecInterveneUI()
 {
     try
     {
         theSession     = Session.GetSession();
         theUI          = UI.GetUI();
         theDlxFileName = "ElecInterveneUI.dlx";
         theDialog      = theUI.CreateDialog(theDlxFileName);
         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.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         throw ex;
     }
 }
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public SheetMetalDetector()
 {
     try
     {
         theSession     = Session.GetSession();
         theUI          = UI.GetUI();
         lw             = theSession.ListingWindow;
         theDlxFileName = "SheetMetalDetector.dlx";
         theDialog      = theUI.CreateDialog(theDlxFileName);
         theDialog.AddUpdateHandler(new NXOpen.BlockStyler.BlockDialog.Update(update_cb));
         theDialog.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(initialize_cb));
         theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         throw ex;
     }
 }
Пример #19
0
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public OffsetBodyGapVauleUi()
 {
     try
     {
         theSession     = Session.GetSession();
         theUI          = NXOpen.UI.GetUI();
         theDlxFileName = "OffsetBodyGapVauleUi.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.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(initialize_cb));
         theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         throw ex;
     }
 }
        //------------------------------------------------------------------------------
        //Constructor for NX Styler class
        //------------------------------------------------------------------------------
        public ResultProbeGenerator()
        {
            try
            {
                theSession = Session.GetSession();
                theUI      = UI.GetUI();
                // Set path to GUI .dlx file
                if (Environment.GetEnvironmentVariable("UCCREATOR_ENV") == "SIEMENS")
                {
                    theDlxFileName = "ResultProbeGenerator.dlx";
                }
                else
                {
                    //theDlxFileName = @"D:\NX\CAE\UBC\ABC\ResultProbeGenerator\ResultProbeGenerator.dlx";  // IN CPP TC environment as Production tool

                    string PLMHOST      = Environment.GetEnvironmentVariable("PLMHOST");
                    string UGII_VERSION = Environment.GetEnvironmentVariable("UGII_VERSION");

                    if (PLMHOST == "")
                    {
                        theUI.NXMessageBox.Show("PLMHOST NOT FOUND", NXMessageBox.DialogType.Error, "Could not find PLMHOST environment variable!");
                    }
                    if (UGII_VERSION == "")
                    {
                        theUI.NXMessageBox.Show("UGII_VERSION NOT FOUND", NXMessageBox.DialogType.Error, "Could not find UGII_VERSION environment variable!");
                    }

                    theDlxFileName = PLMHOST + @"\plmshare\config\nxcustom\NX-" + UGII_VERSION + @"\site\application\ResultProbeGenerator.dlx";
                }
                theDialog = theUI.CreateDialog(theDlxFileName);
                theDialog.AddUpdateHandler(new NXOpen.BlockStyler.BlockDialog.Update(update_cb));
                theDialog.AddInitializeHandler(new NXOpen.BlockStyler.BlockDialog.Initialize(initialize_cb));
                theDialog.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
            }
            catch (Exception ex)
            {
                //---- Enter your exception handling code here -----
                throw ex;
            }
        }
Пример #21
0
 //------------------------------------------------------------------------------
 //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;
     }
 }
Пример #22
0
 //------------------------------------------------------------------------------
 //Constructor for NX Styler class
 //------------------------------------------------------------------------------
 public MoveComponent()
 {
     try
     {
         theSession     = Session.GetSession();
         theUI          = NXOpen.UI.GetUI();
         workPart       = theSession.Parts.Work;
         theDlxFileName = "MoveComponent.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.AddDialogShownHandler(new NXOpen.BlockStyler.BlockDialog.DialogShown(dialogShown_cb));
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         throw ex;
     }
 }
Пример #23
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;
     }
 }
Пример #24
0
 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;
     }
 }
Пример #25
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));
        //  }
    }
Пример #26
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;
     }
 }
Пример #27
0
 //------------------------------------------------------------------------------
 //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, "请先打开一个模型在使用本工具");
     }
 }
Пример #28
0
 public BlockDialog(string dlxPathName)
 {
     this.NXOpenBlockDialog = UI.GetUI().CreateDialog(dlxPathName);
 }
Пример #29
0
 public static General GetBlock(NXOpen.BlockStyler.BlockDialog dialog, string blockName)
 {
     return(new General(dialog.TopBlock.FindBlock(blockName)));
 }
Пример #30
0
 //------------------------------------------------------------------------------
 //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;
     }
 }
Пример #31
0
 //------------------------------------------------------------------------------
 //Method Name: Dispose
 //------------------------------------------------------------------------------
 public void Dispose()
 {
     if(theDialog != null)
     {
         theDialog.Dispose();
         theDialog = null;
     }
 }
Пример #32
0
    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());
        }
    }
Пример #33
0
 public static Snap.UI.Block.SelectObject GetBlock(NXOpen.BlockStyler.BlockDialog dialog, string name)
 {
     return(new Snap.UI.Block.SelectObject(dialog.TopBlock.FindBlock(name)));
 }
Пример #34
0
 public static NXOpen.BlockStyler.PropertyList GetBlockProperties(this NXOpen.BlockStyler.BlockDialog obj, string block)
 {
     return(null);
 }