Exemple #1
0
 public DBTableInfo(ParentForm parent, OleDbConnection conn)
 {
     if (conn.State == ConnectionState.Open)
     {
         InitializeComponent();
         this.OleConn = conn;
         leftpanelShowTable(conn);
     }
     else
     {
         AlertForm_input("查询出错,请先连接数据库");
     }
 }
Exemple #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();
        }
Exemple #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();
     }
 }
Exemple #4
0
        public ChildForm(ParentForm parent)
        {
            InitializeComponent();

            this.MdiParent = parent;
        }