Restore SEBPatch
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
*
|
||||
* 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.I18n.Contracts;
|
||||
using SafeExamBrowser.UserInterface.Contracts.Windows;
|
||||
|
||||
namespace SafeExamBrowser.UserInterface.Contracts.MessageBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the API for message boxes.
|
||||
/// </summary>
|
||||
public interface IMessageBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Shows a message box according to the specified parameters and returns the result chosen by the user.
|
||||
/// </summary>
|
||||
MessageBoxResult Show(string message, string title, MessageBoxAction action = MessageBoxAction.Ok, MessageBoxIcon icon = MessageBoxIcon.Information, IWindow parent = null);
|
||||
|
||||
/// <summary>
|
||||
/// Shows a message box according to the specified parameters and returns the result chosen by the user.
|
||||
/// </summary>
|
||||
MessageBoxResult Show(TextKey message, TextKey title, MessageBoxAction action = MessageBoxAction.Ok, MessageBoxIcon icon = MessageBoxIcon.Information, IWindow parent = null);
|
||||
}
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
*
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
namespace SafeExamBrowser.UserInterface.Contracts.MessageBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines all actions available for a message box.
|
||||
/// </summary>
|
||||
public enum MessageBoxAction
|
||||
{
|
||||
Ok,
|
||||
OkCancel,
|
||||
YesNo
|
||||
}
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
*
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
namespace SafeExamBrowser.UserInterface.Contracts.MessageBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines all icons available in a message box.
|
||||
/// </summary>
|
||||
public enum MessageBoxIcon
|
||||
{
|
||||
Error,
|
||||
Information,
|
||||
Question,
|
||||
Warning
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
*
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
namespace SafeExamBrowser.UserInterface.Contracts.MessageBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines all possible results of a message box.
|
||||
/// </summary>
|
||||
public enum MessageBoxResult
|
||||
{
|
||||
None = 0,
|
||||
Cancel,
|
||||
No,
|
||||
Ok,
|
||||
Yes
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user