Repetier Plugin - Event finished and get jobFinished time

Hello,

I would like to start making some handy plugins for Repetier-Host. I read through rhplugins tutorial and browsed avaible classes. Since I am more-or-less begginer to C# I would love to get a little help to get started.

The question is, how can I handle JobFinishEvent and use it for example to show whenPrinting started, it's duration (like the repetier does) and name of the gcode.

Here is how I tried it to do:

private IHost host;
private IPrinterConnection connection;
private Printjob printjob;
...
public void Connect(IHost _host)
{
host = _host;
connection = host.Connection;
printjob = new Printjob(connection, host);
host.JobFinishedEvent += host_JobFinishedEvent;         
}
void host_JobFinishedEvent()
{
host.LogMessage("Done!");
host.LogMessage(printjob.jobFinished.ToString("dd.MM.yyyy HH:mm:ss", CultureInfo.InvariantCulture)); 
throw new NotImplementedException();   
}

but something tells me this is not how I should handle that event... And the printjob date shows zero time...

Is there anybody that could push me a bit with my question? thank you!
Sign In or Register to comment.