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; } }
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; } }
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(); }
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(); }