Курсовая работа: Подсистема управления процессами
bool isWorking = false;
public event EventHandler WorkingStateChanged = delegate { };
public bool IsWorking
{
get { return isWorking; }
set
{
isWorking = value;
WorkingStateChanged(this, EventArgs.Empty);
}
}
public void Delete()
{
if (a != null)
{
a.Abort();
a = null;
if (IsWorking == true)
{
if (WaitToStart.Set() == false)
WaitToStart.Set();
}
}
}
public ThreadPriority Prior
{
get { return a.Priority; }
set { a.Priority = value; }
}