2017-05-28 00:31:46 +01:00
|
|
|
|
// /***************************************************************************
|
|
|
|
|
|
// The Disc Image Chef
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Filename : Progress.cs
|
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Component : Main program loop.
|
2017-05-28 00:31:46 +01:00
|
|
|
|
//
|
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Show progress on standard console.
|
2017-05-28 00:31:46 +01:00
|
|
|
|
//
|
|
|
|
|
|
// --[ 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/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2018-12-29 17:34:38 +00:00
|
|
|
|
// Copyright © 2011-2019 Natalia Portillo
|
2017-05-28 00:31:46 +01:00
|
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
using DiscImageChef.Console;
|
|
|
|
|
|
|
|
|
|
|
|
namespace DiscImageChef
|
|
|
|
|
|
{
|
2017-12-20 02:08:37 +00:00
|
|
|
|
static class Progress
|
2017-05-28 00:31:46 +01:00
|
|
|
|
{
|
2017-12-20 02:08:37 +00:00
|
|
|
|
internal static void InitProgress() { }
|
2017-05-28 00:31:46 +01:00
|
|
|
|
|
2017-12-20 02:08:37 +00:00
|
|
|
|
internal static void EndProgress()
|
2017-05-28 00:31:46 +01:00
|
|
|
|
{
|
|
|
|
|
|
DicConsole.WriteLine();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-12-20 02:08:37 +00:00
|
|
|
|
internal static void UpdateProgress(string text, long current, long maximum)
|
2017-05-28 00:31:46 +01:00
|
|
|
|
{
|
|
|
|
|
|
DicConsole.Write("\r" + text);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-12-20 02:08:37 +00:00
|
|
|
|
internal static void InitProgress2() { }
|
2017-05-28 00:31:46 +01:00
|
|
|
|
|
2017-12-20 02:08:37 +00:00
|
|
|
|
internal static void EndProgress2()
|
2017-05-28 00:31:46 +01:00
|
|
|
|
{
|
|
|
|
|
|
DicConsole.WriteLine();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-12-20 02:08:37 +00:00
|
|
|
|
internal static void UpdateProgress2(string text, long current, long maximum)
|
2017-05-28 00:31:46 +01:00
|
|
|
|
{
|
|
|
|
|
|
DicConsole.Write("\r" + text);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-12-20 02:08:37 +00:00
|
|
|
|
internal static void InitTwoProgress() { }
|
2017-05-28 00:31:46 +01:00
|
|
|
|
|
2017-12-20 02:08:37 +00:00
|
|
|
|
internal static void EndTwoProgress()
|
2017-05-28 00:31:46 +01:00
|
|
|
|
{
|
|
|
|
|
|
DicConsole.WriteLine();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-12-20 02:08:37 +00:00
|
|
|
|
internal static void UpdateTwoProgress(string text, long current, long maximum, string text2, long current2,
|
2018-06-22 08:08:38 +01:00
|
|
|
|
long maximum2)
|
2017-05-28 00:31:46 +01:00
|
|
|
|
{
|
|
|
|
|
|
DicConsole.Write("\r" + text + ": " + text2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-12-20 02:08:37 +00:00
|
|
|
|
internal static void UpdateStatus(string text)
|
2017-05-28 00:31:46 +01:00
|
|
|
|
{
|
|
|
|
|
|
DicConsole.WriteLine(text);
|
|
|
|
|
|
}
|
2019-04-19 17:35:01 +01:00
|
|
|
|
|
|
|
|
|
|
internal static void ErrorMessage(string text)
|
|
|
|
|
|
{
|
|
|
|
|
|
DicConsole.ErrorWriteLine(text);
|
|
|
|
|
|
}
|
2017-05-28 00:31:46 +01:00
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
}
|