示例#1
0
        public static void ShowObjectGroupingDlg(ConnectionParams cp, ObjectInfo objInfo, string caption)
        {
            if (cp == null)
            {
                throw new Exception("Connection parameters object is null!");
            }

            if (objInfo == null || objInfo.ObjectID <= 0)
            {
                throw new Exception("Objects information is null!");
            }

            frmObjGroupDlg frm = new frmObjGroupDlg();

            frm.Text = caption;
            if (!frm.og.InitializeObjectGrouping(cp, true))
            {
                frm.Dispose();
                return;
            }

            frm._objInfo = objInfo;

            frm.ShowDialog();
        }
示例#2
0
        public static void ShowObjectGroupingDlg(ConnectionParams cp, IList <TreeNode> nodes, string caption, bool isImport)
        {
            if (cp == null)
            {
                throw new Exception("Connection parameters object is null!");
            }

            if (nodes == null || nodes.Count == 0)
            {
                throw new Exception("Objects collection is null or empty!");
            }



            frmObjGroupDlg frm = new frmObjGroupDlg();

            frm.Text = caption;

            if (!frm.og.InitializeObjectGrouping(cp, true))
            {
                frm.Dispose();
                return;
            }

            frm._isImport = isImport;
            frm._nodes    = nodes;
            frm.ShowDialog();
        }