private void AddExcelFile_Click(object sender, RoutedEventArgs e) { string path = FileUtils.SelectSingleExcelFile(); if (Utils.CheckFileExists(path)) { IList <PrintFileModel> fileNameCustoms = SheetToList(path); if (fileNameCustoms != null) { addFilePagerPage.AddObject(fileNameCustoms); } } }
public void AddFile(IList <string> files2) { IList <PrintFileModel> fileNameCustoms = new List <PrintFileModel>(); if (!Utils.CheckListExists(files2)) { return; } for (int a = 0; a < files2.Count; a++) { PrintFileModel fileNameCustom = new PrintFileModel(files2[a]); fileNameCustoms.Add(fileNameCustom); } addFilePagerPage.AddObject(fileNameCustoms); }
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); } } }