private void on_button_cancel_clicked(object o, EventArgs args)
{
LogB.Information("cancelled-----");
//fakeButtonCancelled.Click(); //just to show message of crashing on windows exiting
button_cancel.Sensitive = false;
cpDoing.AbortFlush = true;
chronopicInit.CancelledByUser = true;
//kill the chronopicInit.Do function that is waiting event
//thread.Abort();
//http://stackoverflow.com/questions/2853072/thread-does-not-abort-on-application-closing
//LogB.Debug(thread.ThreadState.ToString());
//thread.IsBackground = true;
//try to solve windows problems when a chronopic connection was cancelled
//LogB.Debug(thread.ThreadState.ToString());
//thread.Join(1000);
//LogB.Debug(thread.ThreadState.ToString());
updateChronopicWinValuesState= false; //disconnected
updateChronopicWinValuesMessage= Catalog.GetString("Cancelled by user");
needUpdateChronopicWin = true;
}