2018-02-02 09:18:35 +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/.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
using SafeExamBrowser.Contracts.I18n;
|
|
|
|
|
|
|
|
|
|
namespace SafeExamBrowser.Contracts.UserInterface
|
|
|
|
|
{
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// A progress indicator is a user interface element which displays the (completion) status of a procedure to the user.
|
|
|
|
|
/// </summary>
|
2018-02-02 09:18:35 +01:00
|
|
|
|
public interface IProgressIndicator
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2018-10-03 14:35:27 +02:00
|
|
|
|
/// Increases the current progress value by 1.
|
2018-02-02 09:18:35 +01:00
|
|
|
|
/// </summary>
|
2018-10-03 14:35:27 +02:00
|
|
|
|
void Progress();
|
2018-02-02 09:18:35 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2018-10-03 14:35:27 +02:00
|
|
|
|
/// Decreases the current progress value by 1.
|
2018-02-02 09:18:35 +01:00
|
|
|
|
/// </summary>
|
2018-10-03 14:35:27 +02:00
|
|
|
|
void Regress();
|
2018-02-02 09:18:35 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sets the style of the progress indicator to indeterminate (<c>Progress</c> and <c>Regress</c> won't have any effect when called).
|
|
|
|
|
/// </summary>
|
|
|
|
|
void SetIndeterminate();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sets the maximum progress value.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void SetMaxValue(int max);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sets the current progress value.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void SetValue(int value);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Updates the status text. If the busy flag is set, an animation will be shown to indicate a long-running operation.
|
2018-10-03 14:35:27 +02:00
|
|
|
|
/// TODO: Automatically show busy indication in implementations after e.g. 2 seconds!
|
2018-02-02 09:18:35 +01:00
|
|
|
|
/// </summary>
|
|
|
|
|
void UpdateText(TextKey key, bool showBusyIndication = false);
|
|
|
|
|
}
|
|
|
|
|
}
|