//------------------------------------------------------------------------------ //Constructor for NX Styler class //------------------------------------------------------------------------------ public TechDoc() { try { theSession = Session.GetSession(); // theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "Начало"); theUI = UI.GetUI(); theDlxFileName = "TechDoc.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)); theDialog.AddCloseHandler(new NXOpen.BlockStyler.BlockDialog.Close(close_cb)); } catch (Exception ex) { //---- Enter your exception handling code here ----- throw ex; } }