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

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

            if (spForm != null)
            {
                spForm.Close();
                spForm = null;
            }
        }
Beispiel #2
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.GH_SubForm for Cancel/Ok buttons

            //See DummySubForm for example

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

            spForm          = new GH_ShadowPanel(thisForm, _type);
            spForm.TopLevel = false;
            thisForm.Controls.Add(spForm);
            spForm.Show();
            spForm.BringToFront();
        }