public async void PrepareForDeactivation() { while (true) { Model.Treshold = 1; Model.Keyword = string.Empty; //await Until.BecomesTrue(() => // Model.Keyword == Title // ); var criticalWindow = new CriticalErrorWindow { DataContext = Model }; criticalWindow.ShowDialog(); await Until.BecomesTrue(() => criticalWindow.IsLoaded == false); /* Model.Keyword != string.Empty && * Model.Logs.Count(x => x.Message.Contains(Model.Keyword)) * > Model.Treshold * Model.Logs.Count */ MessageBox.Show("Aha!!!"); } }
private async void SuccessWorkflow() { while (true) { btnUnlock.IsEnabled = false; txtBox.IsEnabled = true; await Until.BecomesTrue(() => txtBox.Text == Title); btnUnlock.IsEnabled = true; txtBox.IsEnabled = false; await Until.IsClicked(btnUnlock); MessageBox.Show("Well done!"); } }