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