private void ProgressBarCallBack(object state) { if (OnProgressBar != null) { ProgressBarEventArgs e = new ProgressBarEventArgs(_index, _max); OnProgressBar(this, e); } }
private void OnRaiseProgressEvent(ProgressBarEventArgs e) { EventHandler <ProgressBarEventArgs> handler = ProgressEvent; if (handler != null) { //this is what actually raises the event. handler(null, e); } }
private void StockpileProgressBarHandler(object source, ProgressBarEventArgs e) { SyncObjectSingleton.FormExecute(() => { lbCurrentAction.Text = e.CurrentTask; if ((int)e.Progress > 100) { e.Progress = 100; } pbSave.Value = (int)e.Progress; }); }
private void NewBlockArrived(object sender, ProgressBarEventArgs e) { double fraction = 1.0 * (e.HighestIndex - e.CountCurrentBlocksInTranzit - e.ReducedBlocksCount) / (e.HighestIndex - e.ReducedBlocksCount); Dispatcher.Invoke(() => { progBgLabel.Width = progBorder.Width * fraction; if (fraction != 1) { progLabel.Content = "downloading... " + Math.Ceiling(100 * fraction) + "%"; } else { progLabel.Content = "synchronized"; } }); }
private void UpdateProgressBarEvent(object sender, ProgressBarEventArgs e) { this.BeginInvoke((Action)(delegate { if (e.CurrentAction != null) { this.lblStatus.Text = e.CurrentAction; } this.progressBar.Value = e.CurrentPercentage; if (e.IsCompleted) { this.progressBar.Value = 100; this.lblStatus.Text = "Subida Completa!"; this.btnCerrar.Text = "Cerrar"; } })); }
public static void RaiseProgress(object sender, ProgressBarEventArgs args) { var evt = OnProgress; evt?.Invoke(sender, args); }
void Database_OnProgressBarInitialized(object sender, ProgressBarEventArgs e) { TotalGames = e.TotalGames; }
void pgn_OnProgressBarInitialized(object sender, ProgressBarEventArgs e) { totalGamesCount = e.TotalGames; }
private static void OnRaiseProgressEvent(ProgressBarEventArgs e) { EventHandler<ProgressBarEventArgs> handler = ProgressEvent; if (handler != null) { //this is what actually raises the event. handler(null, e); } }
private void CardCriteriaRepository_ProgressEventHandler(object sender, ProgressBarEventArgs e) { _bar.Maximum = e.Maximum; _bar.Value += e.Progress; }
private void SqlManager_ProgressEvent(object sender, ProgressBarEventArgs e) { _bar.Maximum = e.Maximum; _bar.Value += e.Progress; }