Exemple #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;
        }
Exemple #2
0
        /// <summary>
        /// Show the form and attach to Bentley Windows Form Adapter as top level form.
        /// </summary>
        /// <param name="unparsed"></param>
        internal void ShowForm(string unparsed = "")
        {
            if (null != Form2Form)
            {
                Form2Form.Focus();
                return;
            }

            Form2Form = new Form2();
            Form2Form.AttachAsTopLevelForm(Program.Addin, true);

            Form2Form.AutoOpen      = true;
            Form2Form.AutoOpenKeyin = "mdl load Form2";

            Form2Form.NETDockable = true;
            Bentley.Windowing.WindowManager windowManager =
                Bentley.Windowing.WindowManager.GetForMicroStation();
            Form2Form.m_windowContent =
                windowManager.DockPanel(Form2Form, Form2Form.Name, Form2Form.Text,
                                        Bentley.Windowing.DockLocation.Floating);

            Form2Form.m_windowContent.CanDockHorizontally = false;
            Form2Form.m_windowContent.ContentCloseQuery  += OnClose;
        }
/// <summary>
/// Show the form if it is not already displayed
/// </summary>
        internal void ShowForm(string unparsed = "")
        {
            if (null != $safeitemrootname$Form)
            {
                $safeitemrootname$Form.Focus();
                return;
            }

            $safeitemrootname$Form = new $safeitemrootname$();
            $safeitemrootname$Form.AttachAsTopLevelForm(Program.Addin, true);

            $safeitemrootname$Form.AutoOpen      = true;
            $safeitemrootname$Form.AutoOpenKeyin = "mdl load $safeitemrootname$";

            $safeitemrootname$Form.NETDockable = true;
            Bentley.Windowing.WindowManager windowManager =
                Bentley.Windowing.WindowManager.GetForMicroStation();
            $safeitemrootname$Form.m_windowContent =
                windowManager.DockPanel($safeitemrootname$Form, $safeitemrootname$Form.Name, $safeitemrootname$Form.Name,
                                        Bentley.Windowing.DockLocation.Floating);

            $safeitemrootname$Form.m_windowContent.CanDockHorizontally = false; // limit to left and right docking
            $safeitemrootname$Form.m_windowContent.ContentCloseQuery  += OnClose;
        }
Exemple #4
0
        /// <summary>
        /// Show the form if it is not already displayed
        /// </summary>
        internal static void ShowForm(Bentley.MicroStation.AddIn addIn, TaggingMode oTagmode)
        {
            //WS: if the form is opened, close it first and then re-open based on tagging mode.
            if (null != s_current)
            {
                s_current.m_windowContent.Close();
                s_current = null;
            }

            s_current = new Tag(addIn, oTagmode);
            s_current.AttachAsTopLevelForm(addIn, true);

            s_current.AutoOpen = true;

            //WS: seems not appropriate here
            //s_current.AutoOpenKeyin = "mdl load GeoTag";

            s_current.NETDockable = true;

            if (oTagmode == TaggingMode.ApplyNewTag)
            {
                s_current.cmbUnit.Enabled    = true;
                s_current.cmbFunCode.Enabled = true;

                s_current.btnApply.Visible   = true;
                s_current.btnRefresh.Visible = true;
                s_current.lblNextNewTag.Text = "Next New Tag";
                s_current.lblTagValue.Text   = "<New Tag>";

                s_current.btnSelect.Visible = false;
                s_current.btnEdit.Visible   = false;
                s_current.btnDrop.Visible   = false;

                s_current.lblApplyOld.Visible = false;
                s_current.lblDrop.Visible     = false;
                s_current.lblSelect.Visible   = false;
            }

            if (oTagmode == TaggingMode.EditOldTag)
            {
                s_current.cmbUnit.Enabled    = false;
                s_current.cmbFunCode.Enabled = false;

                s_current.btnApply.Visible   = false;
                s_current.btnRefresh.Visible = false;

                s_current.lblNextNewTag.Text = "Existing Tag";
                s_current.lblTagValue.Text   = "<Old Tag>";

                s_current.btnSelect.Visible = true;
                s_current.btnEdit.Visible   = true;
                s_current.btnDrop.Visible   = true;

                s_current.lblApplyOld.Visible = true;
                s_current.lblDrop.Visible     = true;
                s_current.lblSelect.Visible   = true;
            }

            BWW windowManager = BWW.GetForMicroStation();

            s_current.m_windowContent = windowManager.DockPanel(s_current, s_current.Name, s_current.Name, Bentley.Windowing.DockLocation.Floating);

            s_current.m_windowContent.CanDockHorizontally = false; // limit to left and right docking
        }