Пример #1
0
        private void CheckFilesNames(object sender, RoutedEventArgs e)
        {
            string           fileType         = selectFileType.SelectionBoxItem.ToString();
            string           path             = folderName.Text;
            PaperNameChecker paperNameChecker = new PaperNameChecker();

            paperNameChecker.excelData = FilesController.ExcelToDS(excelName.Text);
            ;
            result.Text = paperNameChecker.CheckFilesNames(fileType, path, 31);

            //result.Text += paperNameChecker.CheckFilesNames("自评表", path, 45);
            //  Console.ReadKey();
        }
        private void CreatZip(object sender, RoutedEventArgs e)
        {
            try
            {
                ZipCreater zipCreater = new ZipCreater();

                zipCreater.excelNumberPosition    = Int32.Parse(excelNumberPosition.Text) - 1;
                zipCreater.excelIdNumberPosition  = Int32.Parse(excelIdNumberPosition.Text) - 1;
                zipCreater.fileNameNumberPosition = Int32.Parse(fileNumberPosition.Text) - 1;
                zipCreater.fileNameNuberLenth     = Int32.Parse(fileNumberLength.Text);
                zipCreater.excelData = FilesController.ExcelToDS(excelName.Text);
                result.Text          = zipCreater.CreateZip(folderName.Text);
            }
            catch (Exception exc)
            {
                result.Text = exc.Message;
            }
        }
Пример #3
0
 private void GetExcel(object sender, RoutedEventArgs e)
 {
     excelName.Text = FilesController.GetExcelName();
 }
Пример #4
0
 private void GetFolder(object sender, RoutedEventArgs e)
 {
     folderName.Text = FilesController.GetFolder();
 }