// MARK: Step public void presentStep(Objectives.StepResponse response) { if (response.objective.currentStep == response.objective.numberOfSteps) { NotifierPresenter.Instance.PerformInstantaneousRequest("" + response.objective.title + " : Done !"); } else { NotifierPresenter.Instance.PerformInstantaneousRequest("" + response.objective.title + " (" + response.objective.currentStep + " / " + response.objective.numberOfSteps + ") "); } }
// MARK: Step public void doStep(Objectives.StepRequest request) { var response = new Objectives.StepResponse(); if (fetchedObjectives[request.id].currentStep < fetchedObjectives[request.id].numberOfSteps) { fetchedObjectives[request.id].currentStep = fetchedObjectives[request.id].currentStep + 1; } ObjectivesWorker.Update(request.id, fetchedSet, fetchedObjectives[request.id].currentStep); response.objective = fetchedObjectives[request.id]; //since we stepped data we fetch objectives again var fetchRequest = new Objectives.FetchRequest(); fetchRequest.numberOfObjectives = numberOfObjectives; fetchRequest.set = fetchedSet; doFetch(fetchRequest); presenter.presentStep(response); }
void IObjectivesPresenter.presentStep(Objectives.StepResponse response) { presentStepCalled = true; lastStepResponse = response; }