public void CheckPointWithDialog(string dialogTitle)
{
if (SendReceiveDisabled)
return; //we don't do chorus on our source tree
try
{
using (var dlg = new SyncDialog(_chorusSystem.ProjectFolderConfiguration,
SyncUIDialogBehaviors.StartImmediatelyAndCloseWhenFinished,
SyncUIFeatures.Minimal))
{
dlg.Text = dialogTitle;
dlg.SyncOptions.DoMergeWithOthers = false;
dlg.SyncOptions.DoPullFromOthers = false;
dlg.SyncOptions.DoSendToOthers = false;
dlg.SyncOptions.RepositorySourcesToTry.Clear();
dlg.SyncOptions.CheckinDescription = string.Format(BloomLabelForCheckins+" auto");
dlg.UseTargetsAsSpecifiedInSyncOptions = true;
dlg.ShowDialog();
if (dlg.FinalStatus.WarningEncountered || //not finding the backup media only counts as a warning
dlg.FinalStatus.ErrorEncountered)
{
ErrorReport.NotifyUserOfProblem(dlg.FinalStatus.LastException,
"There was a problem while storing history in repository. Chorus said:\r\n\r\n" +
dlg.FinalStatus.LastWarning + "\r\n" +
dlg.FinalStatus.LastError);
}
}
}
catch (Exception error)
{
SIL.Reporting.Logger.WriteEvent("Error while storing history in repository: {0}", error.Message);
//TODO we need some passive way indicating the health of the backup system
}
}