SIL.FieldWorks.TE.TeNotesVc.CollapseAllAnnotations C# (CSharp) Метод

CollapseAllAnnotations() публичный Метод

Collapses all annotations.
public CollapseAllAnnotations ( IVwRootBox rootbox ) : void
rootbox IVwRootBox The rootbox of the caller, which will be notified of the change /// (hence causing the appropriate fragments in this VC to get laid out)
Результат void
		public void CollapseAllAnnotations(IVwRootBox rootbox)
		{
			// Make a copy of the table (since collapsing causes keys to be deleted from the table
			// and we are enumerating through it).
			Dictionary<int, bool> expandTable = new Dictionary<int, bool>(m_expandTable);

			var annotationRepo = m_cache.ServiceLocator.GetInstance <IScrScriptureNoteRepository>();
			IScrScriptureNote ann;
			foreach (int annHvo in expandTable.Keys)
			{
				// Confirm that the object is an annotation because we only want to collapse at
				// the annotation level so that we can maintain the expansion status of the
				// fields within the annotation.
				if (annotationRepo.TryGetObject(annHvo, out ann) && IsExpanded(annHvo))
					ToggleItemExpansion(annHvo, rootbox);
			}
		}