public void ShowVotingDialog(VotingServiceEventArgs votingEventArgs) { DialogResult result; string alias = votingEventArgs.Alias; // Show the voting dialog to the user and depending on the response // raise the ApproveProposal or RejectProposal event back to the workflow result = MessageBox.Show(string.Format("Approve Proposal, {0}?", alias), string.Format("{0} Ballot", alias), MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { EventHandler <VotingServiceEventArgs> approvedProposal = this.ApprovedProposal; if (approvedProposal != null) { approvedProposal(null, votingEventArgs); } } else { EventHandler <VotingServiceEventArgs> rejectedProposal = this.RejectedProposal; if (rejectedProposal != null) { rejectedProposal(null, votingEventArgs); } } }
public void ShowVotingDialog(VotingServiceEventArgs votingEventArgs) { DialogResult result; string alias = votingEventArgs.Alias; // Show the voting dialog to the user and depending on the response // raise the ApproveProposal or RejectProposal event back to the workflow result = MessageBox.Show(string.Format("Approve Proposal, {0}?", alias), string.Format("{0} Ballot", alias), MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { EventHandler<VotingServiceEventArgs> approvedProposal = this.ApprovedProposal; if (approvedProposal != null) approvedProposal(null, votingEventArgs); } else { EventHandler<VotingServiceEventArgs> rejectedProposal = this.RejectedProposal; if (rejectedProposal != null) rejectedProposal(null, votingEventArgs); } }