private void DirAna(string dir) { if (!MyUtils.Utils.CheckDirExists(dir)) { return; } model.JTCYTablePath = ""; model.JSYDTablePath = ""; model.NFTablePath = ""; model.ZdinfoMDBPath = ""; model.QZ_BSMDBPath = ""; DirPagerCustom dirPagerCustom = new DirPagerCustom(dir); pagerPage.AddObject(dirPagerCustom); DirClass dirClass = new DirClass(dir); foreach (string path in dirClass.FindFileAll()) { string name = System.IO.Path.GetFileName(path); if (name.Contains("家庭")) { model.JTCYTablePath = path; } else if (name.Contains("建设")) { model.JSYDTablePath = path; } else if (name.Contains("房")) { model.NFTablePath = path; } else if (name.Contains("宗地") && name.EndsWith(".mdb")) { model.ZdinfoMDBPath = path; } else if (name.Contains("两表") && name.EndsWith(".mdb")) { model.QZ_BSMDBPath = path; } else if (name.Contains("地籍") && name.EndsWith(".dwg")) { model.DWGPath = path; } } }
private void AddDirFile_Click(object sender, RoutedEventArgs e) { string dir = FileUtils.SelectDir(); if (!Utils.IsStrNull(dir)) { model.Dir = dir; DirClass dirClass = new DirClass(dir); if (model.IsDiGuiChaZhao) { AddFile(dirClass.FindFileAll()); } else { AddFile(dirClass.Files); } } }