예제 #1
0
 public DBTableInfo(ParentForm parent, OleDbConnection conn)
 {
     if (conn.State == ConnectionState.Open)
     {
         InitializeComponent();
         this.OleConn = conn;
         leftpanelShowTable(conn);
     }
     else
     {
         AlertForm_input("查询出错,请先连接数据库");
     }
 }
예제 #2
0
        public AlertInfo(ParentForm parent)
        {
            InitializeComponent();

            this.MdiParent = parent;
            this.Parent    = parent.DBPanel;                    //设置子窗体的容器为父窗体的panel;
            int width  = (parent.DBPanel.Size.Width - 300) / 2; //动态居中,alertForm的大小为300,300
            int heigth = (parent.DBPanel.Height - 300) / 2;

            this.Anchor   = AnchorStyles.None;
            this.Location = new Point(width, heigth);
            this.BringToFront();//把警告页面放到最上面展示
            this.Activate();
        }
예제 #3
0
 public DBTableInfo(ParentForm parent, OleDbConnection conn)
 {
     if (conn.State == ConnectionState.Open)
     {
         InitializeComponent();
         this.OleConn = conn;
         leftpanelShowTable(conn);
     }
     else
     {
         AlertInfo alert = new AlertInfo(parent);
         alert.ShowInfo.Text = "查询出错,请先连接数据库";
         alert.Show();
     }
 }
예제 #4
0
        public ChildForm(ParentForm parent)
        {
            InitializeComponent();

            this.MdiParent = parent;
        }