Пример #1
0
        /// <summary>
        /// Show the form if it is not already displayed
        /// </summary>
        internal static void ShowForm(Bentley.MicroStation.AddIn addIn)
        {
            if (null != s_current)
            {
                return;
            }

            s_current = new GSFStiffenerControl(addIn);
            s_current.AttachAsTopLevelForm(addIn, true);


            s_current.AutoOpen      = true;
            s_current.AutoOpenKeyin = "mdl load GSFStiffener";

            s_current.NETDockable = false;
            Bentley.Windowing.WindowManager windowManager =
                Bentley.Windowing.WindowManager.GetForMicroStation();
            s_current.m_windowContent =
                windowManager.DockPanel(s_current, s_current.Name, s_current.Text,
                                        Bentley.Windowing.DockLocation.Floating);
            AdapterWorkarounds.WCFixedBorder.SetBorderFixed(s_current.m_windowContent);

            s_current.m_windowContent.CanDockHorizontally = false; // limit to left and right docking
            s_current.m_windowContent.CanDockVertically   = false;
        }
Пример #2
0
        private void cmdInsertStiffenerMany(object sender, System.EventArgs e)
        {
            string str1 = this.stiffenerPosNumTextBox.Text;

            GSFStiffenerControl.CloseForm();
            InsertMany(str1);
            GSFStiffenerControl.ShowForm(m_addIn);
        }
Пример #3
0
        /// <summary>Handle the standard Closed event
        /// </summary>
        private void GSFStiffenerControl_Closed(object sender, EventArgs e)
        {
            if (s_current != null)
            {
                tabPage = this.tabControl1.SelectedIndex; //stores last opened tabpage
            }
            s_current.Dispose(true);

            s_current = null;
        }
Пример #4
0
        /// <summary>
        /// Close the form if it is currently displayed
        /// </summary>
        internal static void CloseForm()
        {
            if (s_current == null)
            {
                return;
            }
            s_current.m_windowContent.Close();

            s_current = null;
        }
Пример #5
0
        /// <summary>The AddIn loader creates an instance of a class
        /// derived from Bentley.MicroStation.AddIn and invokes Run.
        /// </summary>
        protected override int Run(System.String[] commandLine)
        {
            s_comApp = BMI.Utilities.ComApp;

            //  Register reload and unload events, and show the form
            this.ReloadEvent   += new ReloadEventHandler(AddInMain_ReloadEvent);
            this.UnloadedEvent += new UnloadedEventHandler(AddInMain_UnloadedEvent);

            GSFStiffenerControl.ShowForm(this);

            return(0);
        }
Пример #6
0
        private void cmdInsertStiffenerOne(object sender, System.EventArgs e)
        {
            PsUnits psUnits            = new PsUnits();
            string  stiffenerLabel     = this.stiffenerNameTextBox.Text;
            string  stiffenerMaterial  = this.stiffenerMaterialComboBox.Text;
            double  stiffenerThickness = psUnits.ConvertToNumeric(this.stiffenerThicknessComboBox.Text);
            int     positionIndex      = this.stiffenerPositionComboBox.SelectedIndex;

            SaveInToTemplate();
            GSFStiffenerControl.CloseForm();
            InsertOne(stiffenerLabel, stiffenerMaterial, stiffenerThickness, positionIndex);
            GSFStiffenerControl.ShowForm(m_addIn);
        }
Пример #7
0
 private void Cancel()
 {
     // PsTransaction psTransaction = new PsTransaction();
     // psTransaction.EraseLongId((long)objId);
     // psTransaction.Close();
     if (!objIds)
     {
         foreach (int objId in objIds)
         {
             long i = (long)objId;
             CommonFunctions.EntityDelete(ref i);
         }
     }
     GSFStiffenerControl.CloseForm();
 }
Пример #8
0
 protected override void OnUnloading(UnloadingEventArgs eventArgs)
 {
     GSFStiffenerControl.CloseForm();
     base.OnUnloading(eventArgs);
 }
Пример #9
0
 /// <summary>Handles MDL LOAD requests after the application has been loaded.
 /// </summary>
 private void AddInMain_ReloadEvent(Bentley.MicroStation.AddIn sender, ReloadEventArgs eventArgs)
 {
     GSFStiffenerControl.ShowForm(this);
 }
Пример #10
0
 private void Ok()
 {
     GSFStiffenerControl.CloseForm();
 }