public static frmObjectReferencesViewer CreateObjectReferencesViewer(string caption, string objName, ConnectionParams cp, string dbName, RefDetail refDetail, bool autoLoad)
        {
            frmObjectReferencesViewer frm = new frmObjectReferencesViewer();

            frm.TabText = caption;
            frm.Text    = caption;
            frm.ObjectRefList.Initialize(objName, cp, dbName, refDetail);
            if (autoLoad)
            {
                frm.ObjectRefList.LoadData();
            }

            return(frm);
        }
        public static void ShowViewer(frmObjectReferencesViewer frm)
        {
            if (frm == null)
            {
                return;
            }

            if (Program.MainForm.DockPanel.DocumentStyle == DocumentStyle.SystemMdi)
            {
                frm.MdiParent = Program.MainForm;
                frm.Show();
                frm.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            }
            else
            {
                frm.Show(Program.MainForm.DockPanel);
            }
        }
Ejemplo n.º 3
0
        private void OnAnyReferenceClick(object sender, EventArgs e)
        {
            FireBeforeContextMenuActionExecuted(sender, ObjectExplorerAction.References);

            TreeNode node = SelectedNode;

            if (node == null)
            {
                return;
            }
            node = SelectedNode;
            if (node == null)
            {
                return;
            }

            NodeData data = NodeDataFactory.GetNodeData(node.Tag);

            frmObjectReferencesViewer frm = ObjectReferenceViewerFactory.CreateObjectReferencesViewer("References {" + data.Name + "}", data.Name, data.ConnParams, data.DBName, RefDetail.Any, true);

            ObjectReferenceViewerFactory.ShowViewer(frm);
            FireAfterContextMenuActionExecuted(sender, ObjectExplorerAction.References);
        }