seb-win-refactoring/SafeExamBrowser.Applications.Contracts/IApplicationInstance.cs
2019-11-15 16:00:03 +01:00

64 lines
1.7 KiB
C#

/*
* Copyright (c) 2019 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.Applications.Contracts.Events;
using SafeExamBrowser.Core.Contracts;
namespace SafeExamBrowser.Applications.Contracts
{
/// <summary>
/// Defines an instance of an application which can be accessed via the shell.
/// </summary>
public interface IApplicationInstance
{
/// <summary>
/// The icon resource for this instance.
/// </summary>
IconResource Icon { get; }
/// <summary>
/// The unique identifier for the application instance.
/// </summary>
InstanceIdentifier Id { get; }
/// <summary>
/// The name or document title of the application instance.
/// </summary>
string Name { get; }
/// <summary>
/// Event fired when the icon of the application instance has changed.
/// </summary>
event IconChangedEventHandler IconChanged;
/// <summary>
/// Event fired when the name or (document) title of the application instance has changed.
/// </summary>
event NameChangedEventHandler NameChanged;
/// <summary>
/// Event fired when the application instance has been terminated.
/// </summary>
event InstanceTerminatedEventHandler Terminated;
/// <summary>
/// Makes this instance the currently active one and brings it to the foreground.
/// </summary>
void Activate();
/// <summary>
/// Initializes the application instance.
/// </summary>
void Initialize();
/// <summary>
/// Terminates the application instance.
/// </summary>
void Terminate();
}
}