private void Dialog_ResultsCreatedEvent(Dictionary <string, string> result) { if (votings.VotingDict.ContainsKey(result["Name"])) { Voting selectedVoting = votings.VotingDict[result["Name"]]; var view = factory.CreateDataView(); VotingAdapter adapter = new VotingAdapter(); selectedVoting.AddObserver(adapter); adapter.Subscribe(view); view.SetTitle(result["Name"]); var dict = new Dictionary <string, string>(); dict["Has Started"] = selectedVoting.IsOpen.ToString(); dict["Total Votes"] = selectedVoting.TotalVotes.ToString(); dict["Eligible Voters"] = selectedVoting.EligibleVoters.ToString(); adapter.SetData(dict); view.Show(); } }