void HandleDisprovingSuggestionEvent(object sender, EventArgs m)
        {
            EventArgStructures.SuggestionIncomming suggestionData = (EventArgStructures.SuggestionIncomming)m;


            MessageBoxResult result = MessageBox.Show(suggestionData.suggester + "Has accused " + suggestionData.p +
                                                      " of killing the victim using the " + suggestionData.w +
                                                      " in the " + suggestionData.r + ". Can you disprove this?",
                                                      "Suggestion Received", MessageBoxButton.YesNo);

            //If the user says they can disprove the suggestion, enable the disprove button and combobox
            //Added a call to tell the client to stop what it's doing until it receives the disprove info
            //May not be the best idea, but I'm open to suggestions
            if (result == MessageBoxResult.Yes)
            {
                client.WaitForDisproveInfo();
                DisproveEnabled = true;
                RaisePropertyChangedEvent("DisproveEnabled");
            }
            else
            {
                DisproveEnabled = false;
                RaisePropertyChangedEvent("DisproveEnabled");
            }
        }
Example #2
0
        //Send an event to the UI in order to ask player to disprove suggestion
        //The real client should have data coming in from the server that it populates this event with
        public void DisproveSuggestion()
        {
            var args = new EventArgStructures.SuggestionIncomming(Board_Controller.Person.Peacock,
                                                                  Board_Controller.Person.White,
                                                                  Board_Controller.Room.Study,
                                                                  Board_Controller.Weapon.Knife);

            SuggestionEvent(this, args);
        }