Background Task C# Export to jpg exemple VSTA Macro API 19

Hi, i ran  some tests and i learn use taskmanager to run a background task, i wrote a little exemple exporting the page to a jpg file 

https://drive.google.com/open?id=1poibUz7DkbLOxwUrgVSN0FwsJnMUoKF1

I try upload here but don't works!

Macro Class

public partial class Main
{
private Corel.Interop.VGCore.Application app;
private static BGTask bgTask;
[CgsAddInConstructor]
public Main(object _app)
{
app = _app as Corel.Interop.VGCore.Application;
if (bgTask == null)
{
bgTask = new BGTask(app);
bgTask.RunningChange += BgTask_RunningChange;
}
Startup();
}
private void BgTask_RunningChange()
{
string msg = "Stop Task";
if (bgTask.Running)
msg = "Start Task";
app.FrameWork.ShowMessageBox(msg);
}
private void Startup(){}
[CgsAddInMacro]
public void StartTask()
{
if (bgTask == null)
return;
ICUITaskManager taskManager = app.FrameWork.TaskManager;
try
{
taskManager.RunInBackground(cuiTaskPriority.kASAP, bgTask);
}
catch(Exception erro)
{
app.FrameWork.ShowMessageBox(erro.Message);
}
}
[CgsAddInMacro]
public void StopTask()
{
if(bgTask!=null)
bgTask.QuitTask();
}
}

Task Class

public class BGTask : ICUIRunningTask, ICUIBackgroundTask
{
public event Action RunningChange;
private Application app;
private bool running = false;
public bool Running { get { return running; }
private set { running = value; if(RunningChange!=null) RunningChange(); } }
ExportFilter ex;
string exportFolder = "C:\\Users\\Reginaldo\\Desktop\\ExportTest";
int limiterCount = 0;
int limiterMax = 10;
private int index = 0;
public int Index { get { return index; } }
public string Name
{
get
{
return "Export Task";
}
}
public BGTask(Application app)
{
this.app = app;
Random rd = new Random();
index = rd.Next(10);
}

public void FinalizeTask()
{
Running = false;
}

public void FreeTask()
{
Running = false;
}

public void QuitTask()
{
Running = false;
}

public void TryAbort()
{
Running = false;
}
public void RunTask()
{
Running = true;
limiterCount = 0;
ExportJPG();
}
protected void ExportJPG()
{
ex = app.ActiveDocument.ExportBitmap(string.Format("{0}\\exported{1}-{2}.jpg"
, exportFolder,limiterCount, DateTime.Now.ToString("mm-ss"))
, cdrFilter.cdrJPEG);
ex.Finish();
if (running && limiterCount < limiterMax)
{
limiterCount++;
Thread.Sleep(1900);
ExportJPG();
}
if (limiterCount == limiterMax)
{
throw new Exception("Safe limit rearch!");
}
return;
}

}

For a Demo

https://www.youtube.com/watch?v=Cs8mchmzcm0