Example #1
0
        public void CloseSubForm()
        {
            //Closes subform and exists SubForm mode.
            //is automatically called when Cancel/Ok is pressed in SubForm.

            S.GET <UI_CoreForm>().UnlockSideBar();

            if (spForm != null)
            {
                ((ISubForm)spForm.subForm).OnHidden();
                spForm.subForm = null;
                spForm.Hide();
                spForm = null;
            }
        }
Example #2
0
        public void CloseSubForm()
        {
            //Closes subform and exists SubForm mode.
            //is automatically called when Cancel/Ok is pressed in SubForm.

            if (UI_ShadowPanel.subForm != null)
            {
                UI_ShadowPanel.subForm.Close();
                UI_ShadowPanel.subForm = null;
            }

            if (spForm != null)
            {
                spForm.Close();
                spForm = null;
            }
        }
Example #3
0
        public void ShowSubForm(string _type)
        {
            //sets program to SubForm mode, darkens screen and displays flating form.
            //Start by giving type of Form class. Implement interface SubForms.UI_SubForm for Cancel/Ok buttons

            //See DummySubForm for example

            if (spForm != null)
            {
                CloseSubForm();
            }

            spForm          = new UI_ShadowPanel(thisForm, _type);
            spForm.TopLevel = false;
            thisForm.Controls.Add(spForm);
            spForm.Show();
            spForm.BringToFront();
        }
Example #4
0
        public void OpenSubForm(ISubForm reqForm, bool lockSidebar = false)
        {
            //sets program to SubForm mode, darkens screen and displays flating form.
            //Start by giving type of Form class. Implement interface SubForms.UI_SubForm for Cancel/Ok buttons

            //See DummySubForm for example

            if (lockSidebar)
            {
                S.GET <UI_CoreForm>().LockSideBar();
            }

            if (spForm != null)
            {
                CloseSubForm();
            }

            spForm          = new UI_ShadowPanel(this, reqForm);
            spForm.TopLevel = false;
            this.Controls.Add(spForm);

            spForm.Show();
            spForm.BringToFront();
        }