public void AddAnnotation(DocumentSettingsDlg documentSettingsDlg, string annotationName, AnnotationDef.AnnotationType annotationType, IList <string> annotationValues, AnnotationDef.AnnotationTargetSet annotationTargets, int?pausePage = null) { var annotationsListDlg = ShowDialog <EditListDlg <SettingsListBase <AnnotationDef>, AnnotationDef> > (documentSettingsDlg.EditAnnotationList); RunUI(annotationsListDlg.SelectLastItem); var annotationDefDlg = ShowDialog <DefineAnnotationDlg>(annotationsListDlg.AddItem); RunUI(() => { annotationDefDlg.AnnotationName = annotationName; annotationDefDlg.AnnotationType = annotationType; if (annotationValues != null) { annotationDefDlg.Items = annotationValues; } annotationDefDlg.AnnotationTargets = annotationTargets; }); if (pausePage.HasValue) { PauseForScreenShot <DefineAnnotationDlg>("Define Annotation form - " + annotationName, pausePage.Value); } OkDialog(annotationDefDlg, annotationDefDlg.OkDialog); OkDialog(annotationsListDlg, annotationsListDlg.OkDialog); }
public void AddReplicateAnnotation(DocumentSettingsDlg documentSettingsDlg, string annotationName, AnnotationDef.AnnotationType annotationType = AnnotationDef.AnnotationType.text, IList <string> annotationValues = null, int?pausePage = null) { AddAnnotation(documentSettingsDlg, annotationName, annotationType, annotationValues, AnnotationDef.AnnotationTargetSet.Singleton(AnnotationDef.AnnotationTarget.replicate), pausePage); }