2018-02-08 13:32:48 +01:00
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018 ETH Zürich, Educational Development and Technology (LET)
|
|
|
|
|
*
|
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
*/
|
|
|
|
|
|
2018-03-06 11:49:51 +01:00
|
|
|
|
using SafeExamBrowser.Contracts.Behaviour.OperationModel;
|
2018-03-08 15:27:12 +01:00
|
|
|
|
using SafeExamBrowser.Contracts.UserInterface;
|
2018-02-08 13:32:48 +01:00
|
|
|
|
|
|
|
|
|
namespace SafeExamBrowser.Runtime.Behaviour.Operations
|
|
|
|
|
{
|
2018-03-08 15:27:12 +01:00
|
|
|
|
internal class SessionSequenceStartOperation : IOperation
|
2018-02-08 13:32:48 +01:00
|
|
|
|
{
|
2018-03-08 15:27:12 +01:00
|
|
|
|
private SessionController controller;
|
|
|
|
|
|
|
|
|
|
public IProgressIndicator ProgressIndicator { private get; set; }
|
|
|
|
|
|
|
|
|
|
public SessionSequenceStartOperation(SessionController controller)
|
2018-02-08 13:32:48 +01:00
|
|
|
|
{
|
2018-03-08 15:27:12 +01:00
|
|
|
|
this.controller = controller;
|
2018-02-08 13:32:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
2018-03-08 15:27:12 +01:00
|
|
|
|
public OperationResult Perform()
|
2018-02-08 13:32:48 +01:00
|
|
|
|
{
|
2018-02-28 15:49:06 +01:00
|
|
|
|
return OperationResult.Success;
|
2018-02-08 13:32:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
2018-03-08 15:27:12 +01:00
|
|
|
|
public OperationResult Repeat()
|
2018-02-08 13:32:48 +01:00
|
|
|
|
{
|
2018-03-08 15:27:12 +01:00
|
|
|
|
controller.ProgressIndicator = ProgressIndicator;
|
|
|
|
|
|
|
|
|
|
return controller.StopSession();
|
2018-02-08 13:32:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
2018-03-08 15:27:12 +01:00
|
|
|
|
public void Revert()
|
2018-02-08 13:32:48 +01:00
|
|
|
|
{
|
|
|
|
|
// Nothing to do here...
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|