SIL.FieldWorks.FdoUi.CmObjectUi.DoRelatedCleanupForDeleteObject C# (CSharp) Method

DoRelatedCleanupForDeleteObject() protected method

Do any cleanup that involves interacting with the user, after the user has confirmed that our object should be deleted.
protected DoRelatedCleanupForDeleteObject ( ) : void
return void
		protected virtual void DoRelatedCleanupForDeleteObject()
		{
			// For media and pictures: should we delete the file also?
			// arguably this should be on a subclass, but it's easier to share behavior for both here.
			ICmFile file = null;
			var pict = m_obj as ICmPicture;
			if (pict != null)
			{
				file = pict.PictureFileRA;
			}
			else
			{
				var media = m_obj as ICmMedia;
				if (media != null)
					file = media.MediaFileRA;
			}
			ConsiderDeletingRelatedFile(file, m_mediator);
		}