Exemplo n.º 1
0
        static Runtime()
        {
            form         = Program.form;
            _excelhandle = new ExcelHandle();
            _excelhandle.CreateExcel();
            _cancellation = new CancellationTokenSource();
            _timer        = new Timer();
            bartimer      = new Timer();

            _timer.AutoReset = true;
            _timer.Elapsed  += Timer_Elapsed;

            bartimer.AutoReset = true;
            bartimer.Elapsed  += Bartimer_Elapsed;
        }
Exemplo n.º 2
0
        internal void ResultHandle(DirectoryInfo directoryInfo)
        {
            if (directoryInfo == null)
            {
                throw new NullReferenceException();
            }
            var         fileInfo = directoryInfo.GetFiles("*TCD*", SearchOption.AllDirectories);
            ExcelHandle excel    = new ExcelHandle();

            excel.CreateExcel();
            int i = 2;

            foreach (var file in fileInfo)
            {
                process.GetWindowPosition(proName, out rect);
                GC9700Handle(file);
                excel.Workbook.Activate();
                excel.Worksheet.Activate();
                excel.Worksheet.Cells[1, i] = file.Name;
                excel.Worksheet.Range[excel.Worksheet.Cells[2, i], excel.Worksheet.Cells[2, i++]].PasteSpecial(Microsoft.Office.Interop.Excel.XlPasteType.xlPasteAll);
            }
        }