protected virtual void OnAllFilesDone(FileInfoEventArgs e) { if (AllFilesRead != null) { AllFilesRead(this, e); } }
void extr_FileExtractionStarted(object sender, FileInfoEventArgs e) { l_ExtractProgress.Text = String.Format("Extracting \"{0}\"", e.FileInfo.FileName); l_ExtractProgress.Refresh(); pb_ExtractWork.Increment(1); pb_ExtractWork.Refresh(); }
/// <summary> /// Called when a file has been extracted from a source archive. /// </summary> /// <remarks> /// This notifies listeners that a read-only initialization step has finished. /// </remarks> /// <param name="sender">The object that raised the event.</param> /// <param name="e">An <see cref="EventArgs"/> describing the event arguments.</param> private void FileExtractionFinished(object sender, FileInfoEventArgs e) { CancelProgressEventArgs ceaArgs = new CancelProgressEventArgs((float)e.PercentDone / 100f); ReadOnlyInitProgressUpdated(this, ceaArgs); e.Cancel = ceaArgs.Cancel; }
private void FileExtractionFinishedHandler(object sender, FileInfoEventArgs args) { if (!PassThru) { return; } string relArchivePathName = args.FileInfo.FileName; if (this.FlattenPaths) { string leafName = System.IO.Path.GetFileName(relArchivePathName); string destPath = System.IO.Path.Combine(OutputPath.ProviderPath, leafName); if (args.FileInfo.IsDirectory) { WriteObject(new DirectoryInfo(destPath)); } else { WriteObject(new FileInfo(destPath)); } } else { string destPath = System.IO.Path.Combine(OutputPath.ProviderPath, relArchivePathName); if (args.FileInfo.IsDirectory) { WriteObject(new DirectoryInfo(destPath)); } else { WriteObject(new FileInfo(destPath)); } } }
/// <summary> /// Called when a file is about to be extracted from a source archive. /// </summary> /// <remarks> /// This notifies listeners that a read-only initialization step has started. /// </remarks> /// <param name="sender">The object that raised the event.</param> /// <param name="e">A <see cref="FileNameEventArgs" /> describing the event arguments.</param> private void FileExtractionStarted(object sender, FileInfoEventArgs e) { var ceaArgs = new CancelEventArgs(false); ReadOnlyInitStepStarted(this, ceaArgs); e.Cancel = ceaArgs.Cancel; }
protected virtual void OnFileDone(FileInfoEventArgs e) { if (FileDone != null) { FileDone(this, e); } }
protected virtual void OnFileProgressed(FileInfoEventArgs e) { if (FileProgressed != null) { FileProgressed(this, e); } }
private void OnFileExtractionStarted(object sender, FileInfoEventArgs e) { var extractedFile = Path.GetFileName(e.FileInfo.FileName); CurrentProgressDescription = $"--> Extracting {extractedFile}"; Console.WriteLine(CurrentProgressDescription); SingleFileUnpackProgress = 0; }
private void SetDocumentInfo(Document msWordDoc, FileInfoEventArgs fInfo) { //ToDo (d.Application.StatusBar = $"Reloaded";) тут я каким-то образом должен к загаловку окна добавить уникальный идентификатор и когда юзер нажмет кнопку печати, я получу этот идентификатор и буду точно знать какой документ печатается int countOfPage = msWordDoc.ComputeStatistics(WdStatistic.wdStatisticPages, false); fInfo.Doc = msWordDoc; fInfo.PagesCount = countOfPage; }
void ExtrFileExtractionStarted(object sender, FileInfoEventArgs e) { Dispatcher.Invoke(new SetInfoDelegate(args => { System.Windows.Forms.Application.DoEvents(); _pWindSplash.pb_Extract2.Value += 1; }), e); }
void Operate_OnFilePathError(object sender, FileInfoEventArgs e) { string errorInfo = e.Desc; if (!string.IsNullOrWhiteSpace(errorInfo)) { this.ShowAlert(errorInfo); } this.SetControlDefaultState(false); }
void Operate_OnFileOperateComplete(object sender, FileInfoEventArgs e) { string info = e.Desc; if (!string.IsNullOrWhiteSpace(info)) { this.ShowAlert(info); } this.SetControlDefaultState(true); }
void Operate_OnFileOperate(object sender, FileInfoEventArgs e) { string fileName = e.Desc; if (!string.IsNullOrWhiteSpace(fileName)) { this.tssInfo.Text = fileName; this.tssInfo.ToolTipText = fileName; this.SetProgressValue((int)(e.Rate * 100)); } }
void zmodem_FileInfoEvent(object sender, FileInfoEventArgs e) { Console.WriteLine(e.FileName + " " + e.Size); //fileSize = e.size; //backgroundWorker1.ReportProgress(0); //progress.Minimum = 0; //progress.Maximum = 100; //progress.Value = 0; //progress.Visible = true; //progress.Refresh(); }
private void FileExtractionFinished(object sender, FileInfoEventArgs e) { //pb_totaalfiles.Invoke(new FileInfoEvent((object o, FileInfoEventArgs l) => //{ // pb_totaalfiles.Value += (int)(100 / _sevenZipExtractor.FilesCount); //}),sender,e); pb_compression.Invoke(new InvokeEvent((object o, EventArgs l) => { pb_compression.Value = 100; }), sender, e); }
private void OnFileExtractionFinished(object sender, FileInfoEventArgs e) { SingleFileUnpackProgress = Convert.ToInt32(100); var extractor = sender as SevenZipExtractor; if (extractor != null) { long totalSize = extractor.UnpackedSize; bytesUnpacked += e.FileInfo.Size; OverallProgress = Convert.ToInt32(bytesUnpacked * 100 / (ulong)totalSize); } }
} // состояние загрузки файлов private void Extr_FileExtractionStarted(object sender, FileInfoEventArgs e) { try { label_status_bar.Invoke(new Action(() => label_status_bar.Font = new Font("Arial Narrow", 9.75F, FontStyle.Regular, GraphicsUnit.Point, 204))); label_status_bar.Invoke(new Action(() => label_status_bar.Text = $"Установка: {e.FileInfo.FileName}")); progressBar1.Increment(1); // ЗАПОЛНЕНИЕ ПРОГРЕССА progressBar1.Refresh(); } catch (Exception error) { MessageBox.Show(error.ToString()); } } // процесс распаковки
private void FileExtractFinished(object sender, FileInfoEventArgs e) { if (bgwUnZipper.CancellationPending) { e.Cancel = true; return; } if (e.PercentDone == 100) { //this.Invoke(new MethodInvoker(delegate //{ pb.Value += (int)e.FileInfo.Size; //})); //System.Threading.Thread.Sleep(200); } }
private void WatchDirectory(object o, FileInfoEventArgs e) { switch (e.FileExtension) { case _csv: { GenerateCsvModelAsync(e.FullFileName).ContinueWith(AdditionNewCsv); break; } case _xml: { GenerateXmlModelAsync(e.FullFileName).ContinueWith(AdditionNewXml); break; } } }
private void FileExtractStarted(object sender, FileInfoEventArgs e) { if (bgwUnZipper.CancellationPending) { e.Cancel = true; return; } if (e.PercentDone == 0) { //this.Invoke(new MethodInvoker(delegate //{ lInfo.Text = e.FileInfo.FileName; lInfo.Refresh(); //})); } }
private void FileExtractionStarted(object sender, FileInfoEventArgs e) { //when the next file is being compressed. lbl_commpressing_file.Invoke(new FileInfoEvent((object o, FileInfoEventArgs l) => { lbl_commpressing_file.Text = String.Format(_commpressingFileName, l.FileInfo.FileName); }), sender, e); pb_totaalfiles.Invoke(new FileInfoEvent((object o, FileInfoEventArgs l) => { pb_totaalfiles.Value = l.PercentDone; }), sender, e); pb_compression.Invoke(new InvokeEvent((object o, EventArgs l) => { pb_compression.Value = 0; }), sender, e); }
protected void ProcessStarted(object sender, EventArrivedEventArgs e) { ManagementBaseObject targetInstance = (ManagementBaseObject)e.NewEvent.Properties["TargetInstance"].Value; int id = int.Parse(targetInstance["ProcessId"].ToString()); var path = GetPathOfOpenedDoc(targetInstance, id); Process.GetProcessById(id).Kill(); Document reloadedDoc = GetReloadedFile(path); //reloadedDoc.Close(false, null, null); //reloadedDoc = GetReloadedFile(path); //return; GetWindowThreadProcessId(reloadedDoc.Application.ActiveWindow.Hwnd, out int reloadedProcId); FileInfoEventArgs fInfo = new FileInfoEventArgs(path, reloadedProcId, Path.GetExtension(path), 0); reloadedDoc.Content.Application.DocumentBeforePrint += delegate(Document doc, ref bool cancel) { }; SetDocumentInfo(reloadedDoc, fInfo); OpenWordPrintDialog(reloadedDoc); //msWordDoc.Close(0, null, null); //msWordDoc.Application.Quit(0, null, null); //if (бабок хватает) //msOfficeApp.Print(); //else //{ // запускаем авторизацию //} }
void extractor_FileExtractionFinished(object sender, FileInfoEventArgs e) { }
private void OnFileExtractionFinished(FileInfoEventArgs e) { if (FileExtractionFinished != null) { FileExtractionFinished(this, e); } }
/// <summary> /// Invoke filtered event. /// </summary> private void FilteredFileRaised(FileInfoEventArgs args) { this.FilteredItem?.Invoke(this, args); }
/// <summary> /// Event proxy for FileExtractionFinished. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">The event arguments.</param> private void FileExtractionFinishedEventProxy(object sender, FileInfoEventArgs e) { OnEvent(FileExtractionFinished, e, true); }
static void extr_FileExtractionStarted(object sender, FileInfoEventArgs e) { }
private void Extractor_FileExtractionStarted(object sender, FileInfoEventArgs e) { _extractingfn = e.FileInfo.FileName; logger.Debug("Extracting " + _extractingfn); }
/// <summary> /// Handles the <see cref="SevenZipExtractor.FileExtractionFinished"/> event of /// the archive extractors. /// </summary> /// <remarks> /// This cancels the extraction if the user has cancelled the task. This also updates /// the item progress. /// </remarks> /// <param name="sender">The object that raised the event.</param> /// <param name="e">A <see cref="FileInfoEventArgs"/> describing the event arguments.</param> private void Extractor_FileExtractionFinished(object sender, FileInfoEventArgs e) { e.Cancel = Status == TaskStatus.Cancelling; StepItemProgress(); }
/// <summary> /// Handles the <see cref="SevenZipExtractor.FileExtractionStarted"/> event of /// the archive extractors. /// </summary> /// <remarks> /// This cancels the extraction if the user has cancelled the task. /// </remarks> /// <param name="sender">The object that raised the event.</param> /// <param name="e">A <see cref="FileInfoEventArgs"/> describing the event arguments.</param> private void Extractor_FileExtractionStarted(object sender, FileInfoEventArgs e) { e.Cancel = Status == TaskStatus.Cancelling; }
void extr_FileExtractionStarted(object sender, FileInfoEventArgs e) { tb_Messages.Text += String.Format("Extracting \"{0}\"" + Environment.NewLine, e.FileInfo.FileName); tb_Messages.ScrollToEnd(); pb_Extract2.Value += 1; }
/// <summary> /// szip_FileExtractionStarted /// </summary> /// <param name="sender">sender</param> /// <param name="e">FileInfoEventArgs</param> private void Szip_FileExtractionStarted(object sender, FileInfoEventArgs e) { tosCmp = new TOSortie(100, string.Format("Extracting \"{0}\" ...", e.FileInfo.FileName), TypeTOSortie.Zip); }