public async Task SendClick() { StaticModal.ShowModal(); PrepareBeforeRun(); _messageBus.Subscribe <TransactionComplete>(ResetAfterRun); _messageBus.Subscribe <DisableStopButtonEvent>(CancellationDisable); _messageBus.Publish(new RunTransactionsButtonClicked()); }
/// <summary> /// The opposite of PrepareBeforeSend; stops the timers and resets the text on the send button. /// </summary> private void ResetAfterRun(TransactionComplete evtComplete) { RunButtonContent = SendLabelDefaultText; StopButtonContent = StopLabelDefaultText; StopButtonEnabled = false; RunButtonEnabled = true; StaticTaskCancellation.TaskCancellation.ResetCancellation(); StaticModal.HideModal(); _messageBus.Publish(new TimerStopEvent()); }