public void Close() { Njit.Common.Popup.Popup popup = this.Parent as Njit.Common.Popup.Popup; if (popup != null) { popup.Close(); } }
private void EditFilter(TreeNode treeNode) { if (control != null) { control.Dispose(); } if (popup != null) { popup.Close(); popup.Dispose(); } control = new Controls.DossierSearchBoxPopup(treeNode.Tag as SearchField); control.OK += controlOKForEdit; popup = new Njit.Common.Popup.Popup(control, true, true, true, false, Njit.Common.Popup.PopupAnimations.Blend, 250, Njit.Common.Popup.PopupAnimations.Blend, 250); popup.Show(Form.MousePosition.X - control.Width, Form.MousePosition.Y); }
private void dossierFieldsTreeView_AfterSelect(object sender, TreeViewEventArgs e) { if (e.Node.Tag is Model.Archive.ArchiveField) { if (control != null) { control.Dispose(); } if (popup != null) { popup.Close(); popup.Dispose(); } control = new Controls.DossierSearchBoxPopup(e.Node.Tag as Model.Archive.ArchiveField, queryTreeView.Nodes.Count > 0); control.OK += controlOK; popup = new Njit.Common.Popup.Popup(control, true, true, true, false, Njit.Common.Popup.PopupAnimations.Slide | Njit.Common.Popup.PopupAnimations.TopToBottom, 200, Njit.Common.Popup.PopupAnimations.Blend, 150); popup.Show(Form.MousePosition.X - control.Width, Form.MousePosition.Y); } }