private void Click_Hint(object sender, EventArgs e) { Button button = sender as Button; button.BackColor = Color.Black; button.Enabled = false; switch (button.Text) { case ".": HintEvent?.Invoke(this, new HintEventArgs() { hint = gamer.hints[0], question = this.question }); break; case "..": HintEvent?.Invoke(this, new HintEventArgs() { hint = gamer.hints[1], question = this.question }); break; case "...": HintEvent?.Invoke(this, new HintEventArgs() { hint = gamer.hints[2], question = this.question }); break; } }
public async Task Handle(HintEvent notification, CancellationToken cancellationToken) { if (notification == null) { return; } await Execute.OnUiThreadAsync(() => this.dialogHostMapper.ShowAsync( this.dialogHostMapper.GetHintView(notification.Message), "RootDialog")).ConfigureAwait(true); }
private void Start() { instance = this; }