示例#1
0
        AlertInfo output = null;                                        //警报窗口
        public void AlertForm_input(string info)                        //显示警报信息
        {
            if (output == null || output.IsDisposed == true)            //如果子窗口为空或者被窗口释放了
            {
                output = new AlertInfo((ParentForm)this.Parent.Parent); //警告信息提示窗口
                output.ShowInfo.Text = info;                            //把警告信息传递到AlertInfo中去

                output.Show();                                          //显示警告窗口
            }
            else
            {
                output.ShowInfo.Text = info;
            }
        }
示例#2
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();
     }
 }