private void Publisher_ValueDataPublisher(object sender, BatchPlotingPublisher.MessageArgument <double> e) { pbStatus.Dispatcher.Invoke(() => { pbStatus.Value = pbStatus.Value + e.Message; }); txtPercentage.Dispatcher.Invoke(() => { var value = Convert.ToInt32((pbStatus.Value / pbStatus.Maximum) * 100); txtPercentage.Text = value + "%"; }); DoEventsHandler.DoEvents(); }
private void Publisher_MaximumDataPublisher(object sender, BatchPlotingPublisher.MessageArgument <double> e) { pbStatus.Dispatcher.Invoke(() => { pbStatus.Maximum = e.Message; }); DoEventsHandler.DoEvents(); }
private void Publisher_StatusDataPublisher(object sender, BatchPlotingPublisher.MessageArgument <string> e) { lblStatusPublisher.Dispatcher.Invoke(() => { lblStatusPublisher.Content = e.Message; }); DoEventsHandler.DoEvents(); }