void moduleSaver_OnWritingFile(object sender, ModuleSaverWriteEventArgs e) { if (e.Starting) { ExecInOldThread(() => { CurrentFileName = e.File.FileName; }); AsyncAddMessage(string.Format("Writing {0}…", e.File.FileName), false, false); } else { shownMessages.Clear(); savedFile.Add(e.File, true); } }