public static void ShowTables(string directoryPath, string[] tables)
        {
            FormViewTable form = new FormViewTable();

            form.DirectoryPath = directoryPath;
            form.Tables        = tables;
            form.ShowDialog();
        }
Beispiel #2
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            var files = GetSelectedFiles("dbc");

            if (files == null || !files.Any())
            {
                MessageBox.Show("Selecione ao menos um arquivo compatível (.dbc)", "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            IEnumerable <FileInfo> dbfs = null;

            FormProgress.Run(() =>
            {
                DiscoverRepository.GetInstance().ExportFiles2DBF(files, f => dbfs = f);
            }, ShowError);

            if (dbfs?.Any() == true)
            {
                var wk = dbfs.First().Directory.FullName;
                FormViewTable.ShowTables(wk, dbfs.Select(f => f.Name).ToArray());
            }
        }