mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Refactor: Use delegates to report progress and status.
This commit is contained in:
96
DiscImageChef.Core/Delegates.cs
Normal file
96
DiscImageChef.Core/Delegates.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
// /***************************************************************************
|
||||
// The Disc Image Chef
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delegates.cs
|
||||
// Version : 1.0
|
||||
// Author(s) : Natalia Portillo
|
||||
//
|
||||
// Component : Component
|
||||
//
|
||||
// Revision : $Revision$
|
||||
// Last change by : $Author$
|
||||
// Date : $Date$
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Description
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright (C) 2011-2015 Claunia.com
|
||||
// ****************************************************************************/
|
||||
// //$Id$
|
||||
|
||||
namespace DiscImageChef.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializates a progress indicator (e.g. makes a progress bar visible)
|
||||
/// </summary>
|
||||
public delegate void InitProgressHandler();
|
||||
/// <summary>
|
||||
/// Updates a progress indicator with text
|
||||
/// </summary>
|
||||
public delegate void UpdateProgressHandler(string text, long current, long maximum);
|
||||
/// <summary>
|
||||
/// Pulses a progress indicator with indeterminate boundaries
|
||||
/// </summary>
|
||||
public delegate void PulseProgressHandler(string text);
|
||||
/// <summary>
|
||||
/// Uninitializates a progress indicator (e.g. adds a newline to the console)
|
||||
/// </summary>
|
||||
public delegate void EndProgressHandler();
|
||||
|
||||
/// <summary>
|
||||
/// Initializates a secondary progress indicator (e.g. makes a progress bar visible)
|
||||
/// </summary>
|
||||
public delegate void InitProgressHandler2();
|
||||
/// <summary>
|
||||
/// Updates a secondary progress indicator with text
|
||||
/// </summary>
|
||||
public delegate void UpdateProgressHandler2(string text, long current, long maximum);
|
||||
/// <summary>
|
||||
/// Pulses a secondary progress indicator with indeterminate boundaries
|
||||
/// </summary>
|
||||
public delegate void PulseProgressHandler2(string text);
|
||||
/// <summary>
|
||||
/// Uninitializates a secondary progress indicator (e.g. adds a newline to the console)
|
||||
/// </summary>
|
||||
public delegate void EndProgressHandler2();
|
||||
|
||||
/// <summary>
|
||||
/// Initializates two progress indicators (e.g. makes a progress bar visible)
|
||||
/// </summary>
|
||||
public delegate void InitTwoProgressHandler();
|
||||
/// <summary>
|
||||
/// Updates two progress indicators with text
|
||||
/// </summary>
|
||||
public delegate void UpdateTwoProgressHandler(string text, long current, long maximum, string text2, long current2, long maximum2);
|
||||
/// <summary>
|
||||
/// Pulses a progress indicator with indeterminate boundaries
|
||||
/// </summary>
|
||||
public delegate void PulseTwoProgressHandler(string text, string text2);
|
||||
/// <summary>
|
||||
/// Uninitializates a progress indicator (e.g. adds a newline to the console)
|
||||
/// </summary>
|
||||
public delegate void EndTwoProgressHandler();
|
||||
|
||||
/// <summary>
|
||||
/// Updates a status indicator
|
||||
/// </summary>
|
||||
public delegate void UpdateStatusHandler(string text);
|
||||
}
|
||||
Reference in New Issue
Block a user