Esempio n. 1
0
        private static void Show()
        {
            var strMsg = string.Empty;

            if (License.Entry.Instance.Verification(EactBomBusiness.Instance.ConfigData.LicenseType, out strMsg))
            {
                Snap.Globals.WorkPart.Bodies.ToList().ForEach(u =>
                {
                    var name = (u.Name ?? string.Empty).ToUpper();
                    if (u.Name != name)
                    {
                        u.Name = name;
                    }
                });
                var ui = new SelectSteelUI();
                ui.Show();
                if (ui.Result == System.Windows.Forms.DialogResult.OK)
                {
                    var win = new FrmEactBom(ui.MouldInfo);
                    win.ShowDialog();
                }
            }
            else
            {
                System.Windows.Forms.MessageBox.Show(strMsg);
            }
        }
 //------------------------------- DIALOG LAUNCHING ---------------------------------
 //
 //    Before invoking this application one needs to open any part/empty part in NX
 //    because of the behavior of the blocks.
 //
 //    Make sure the dlx file is in one of the following locations:
 //        1.) From where NX session is launched
 //        2.) $UGII_USER_DIR/application
 //        3.) For released applications, using UGII_CUSTOM_DIRECTORY_FILE is highly
 //            recommended. This variable is set to a full directory path to a file
 //            containing a list of root directories for all custom applications.
 //            e.g., UGII_CUSTOM_DIRECTORY_FILE=$UGII_ROOT_DIR\menus\custom_dirs.dat
 //
 //    You can create the dialog using one of the following way:
 //
 //    1. Journal Replay
 //
 //        1) Replay this file through Tool->Journal->Play Menu.
 //
 //    2. USER EXIT
 //
 //        1) Create the Shared Library -- Refer "Block Styler programmer's guide"
 //        2) Invoke the Shared Library through File->Execute->NX Open menu.
 //
 //------------------------------------------------------------------------------
 public static void Main()
 {
     try
     {
         theSelectSteelUI = new SelectSteelUI();
         // The following method shows the dialog immediately
         theSelectSteelUI.Show();
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
     }
     finally
     {
         theSelectSteelUI.Dispose();
     }
 }