public void closeForm() { if (Parent is ReflectForm) { ReflectForm parentForm = (ReflectForm)Parent; parentForm.Close(); } }
private void showRForm(ReflectForm newForm, string name) { try { newForm.Show(); } catch (ObjectDisposedException ex) { newForm = new ReflectForm(); newForm.ScriptIdent = name; newForm.Name = name; newForm.Show(); this.addObject(name, newForm, true); } }
private ReflectForm getForm(ReflectionScriptDefines refObject, Object parent) { ReflectForm newForm; newForm = (ReflectForm)this.getExistingObject(refObject.name); string objToken = refObject.name; if (newForm == null) { newForm = new ReflectForm(); } newForm.ScriptIdent = refObject.name; newForm.Name = objToken; if (parent is MdiForm) { MdiForm mdi = (MdiForm)parent; mdi.addSubWindow(newForm, refObject.name); } else if (parent is Form) { this.showRForm(newForm, refObject.name); } else if (parent is ReflectionScript) { ReflectionScript parScr = (ReflectionScript)parent; if (parScr.SetupBoolValue(ReflectionScript.SETUP_PREVIEW)) { this.showRForm(newForm, refObject.name); } } else { this.showRForm(newForm, refObject.name); } this.addObject(refObject.name, newForm); return(newForm); }