Приложение, которое ищет файлы по заданному шаблону имени файла и по заданной фразе для внутреннего содержимого файла.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.2 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace fileFinder
{
class TaskController
{
public bool isPaused { get; private set; }
public bool isStopped { get; private set; }
public TaskController ()
{
isPaused = false;
isStopped = true;
}
public bool beginTask ()
{
isPaused = false;
isStopped = false;
return true;
}
public bool pauseTask ()
{
if (!isPaused && !isStopped)
{
isPaused = true;
return true;
} else
return false;
}
public bool resumeTask ()
{
if (isPaused && !isStopped)
{
isPaused = false;
return true;
} else
return false;
}
public bool stopTask ()
{
if (!isStopped)
{
isStopped = true;
return true;
} else
return false;
}
}
}