public void Add(BaseForm form,BaseForm parentForm) { FormItem formItem = new FormItem{ FormControl = form}; FormItem parentFormItem = null; if (parentForm != null) parentFormItem = new FormItem { FormControl = parentForm, CurrentPage = parentForm.GetCurrentPage(), FormControls = parentForm.GetTableControls()}; FormState formState = new FormState { CurrentForm = formItem, ParentForm = parentFormItem}; Add(form.GUID, formState); }
public void OpenWindow(BaseForm parentForm) { FormItem formItem = new FormItem { FormControl = this, CurrentPage = GetCurrentPage(), FormControls = GetTableControls() }; FormItem parent = null; if (parentForm != null) parent = new FormItem { FormControl = parentForm, FormControls = parentForm.GetTableControls(), CurrentPage = parentForm.GetCurrentPage() }; FormState formState = new FormState { ParentForm = parent, CurrentForm = formItem }; TaskService.Instance.Add(this, parentForm); }