Пример #1
0
        private void lstdb_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            int index = this.lstdb.IndexFromPoint(e.Location);

            if (index != System.Windows.Forms.ListBox.NoMatches)
            {
                string name = lstdb.Items[index].ToString();

                this.xmlInfo = DbXmlHelper.GetItem(name);
                if (this.xmlInfo != null)
                {
                    var tableList = DbManager.ReadAllTables(this.xmlInfo.Path, this.xmlInfo.Pwd);
                    this.Invoke(new Action <ListBox>(p =>
                    {
                        foreach (var table in tableList)
                        {
                            p.Items.Add(table);
                        }
                    }), this.lstTables);
                }
            }
        }