示例#1
0
 private void ClientSocketOnVoteStarted(object sender, VoteStartedEventArgs e)
 {
     Application.Current.Dispatcher.Invoke(delegate
     {
         if (MessageBox.Show("Coffee time!", e.ClientProfile.Name + " started a coffee vote",
                             MessageBoxButton.YesNo) == MessageBoxResult.Yes)
         {
             ClientSocket.SendCommand("start_vote", new StartVoteCommand());
             this.MainFrame.Navigate(new WheelOfFortuneView(ClientSocket));
         }
     });
 }
示例#2
0
        protected virtual void VoteStartedEvent(VoteStartedEventArgs e)
        {
            EventHandler <VoteStartedEventArgs> handler = VoteStarted;

            handler?.Invoke(this, e);
        }