public MainMenuPresenter(IMainMenuView view, ProjectMainWindow window) { this.View = view; this.window = window; View.EventCreateNewContest += gotoCreateContestView; View.EventJudgeContest += GotoJudgeContest; }
public CreateSubContestPresenter(CreateSubContestView view, ProjectMainWindow window, Contest contest) { this.View = view; this.window = window; CurrentContest = contest; SubContests = CurrentContest.SubContestBranches; this.View.LabelContestName.Text = CurrentContest.Info.Name; //Fyller på contestants från contest foreach (var contestant in contest.Contestants) { ListViewItem listViewContestContestantsItem = new ListViewItem(contestant.FirstName); listViewContestContestantsItem.SubItems.Add(contestant.LastName); View.ListViewContestContestants.Items.Add(listViewContestContestantsItem); } View.EventAddContestantToSubContest += AddContestantToSubContest; View.EventRemoveContestantFromSubContest += RemoveContestantFromSubContest; View.EventAddSubContest += AddSubContest; View.EventFinalizeContest += FinalizeContest; View.EventSubContestSelected += SubContestSelected; View.EventUpdateSubContest += UpdateSubContest; View.EventCancelEdit += CancelEditOfSubContest; View.EventRemoveSubContest += RemoveSubContest; }
public JudgeDivePresenter(JudgeDiveView view, ProjectMainWindow window, string serverIp) { ServerIp = serverIp; JudgeName = window.CurrentJudge.GetFullName(); View = view; this.window = window; View.EventGiveScore += GiveScore; View.EventPointSliderChanged += SetPoints; threadClient = new Thread(RunClient); threadClient.IsBackground = true; threadClient.Start(); }
// Instance constructor public ResultPresenter(ResultView view, ProjectMainWindow window, Contest contest) { this.View = view; this.window = window; this.Model = contest; TestData(); foreach (var subcontest in Model.SubContestBranches) { View.ListViewSubContests.Items.Add(subcontest.Name); } View.EventSubContestSelection += SubContestSelected; }
public AddDivePresenter(AddDiveView view, ProjectMainWindow window, SubContestBranch subContest, Contestant contestant, Dive dive = null) { this.View = view; this.window = window; this.SubContest = subContest; CurrentContestant = contestant; if (dive != null) { View.TextBoxDiveCode.Text = dive.Code.Code; View.TextBoxDiveMultiplier.Text = dive.Code.Multiplier.ToString(); } View.EventAddDive += AddDiveToContestant; }
public CreateContestPresenter(CreateContestView view, ProjectMainWindow window) { this.View = view; this.window = window; View.EventSetStartDate += SetStartDate; View.EventSetEndDate += SetEndDate; View.EventAddJudgeToDB += AddJudgeToDB; View.EventAddJudgeToContest += AddJudgeToContest; View.EventRemoveJudgeFromContest += RemoveJudgeFromContest; View.EventAddContestantToDB += AddContestantToDB; View.EventAddContestantToContest += AddContestantToContest; View.EventRemoveContestantFromContest += RemoveContestantFromContest; View.EventCreateSubContest += GoToCreateSubContest; View.EventGoBack += GoBack; FillWithData(); }
public ContestPresenter(ContestView view, ProjectMainWindow window, Contest contest) { this.View = view; this.window = window; CurrentContest = contest; View.EventAddJump += AddDive; View.EventPauseContest += PauseContest; View.EventCloseContest += CloseContest; View.EventSubContestSelection += UpdateContestantListView; View.EventContestantSelection += UpdateDivesListView; View.EventDiveSelection += EnableModifyDive; View.EventModifyDive += ModifyDive; View.EventRemoveDive += RemoveDive; View.EventCancelDiveEdit += CancelModifyDive; View.EventRequestPoints += RequestPointsFromJudges; View.EventCollectPoints += CollectPoints; View.EventManualJudging += OpenManualJudging; window.FormClosing += ParentForm_FormClosing; Initialize(); }