// Used to ensure the each source is added to the list at the bottom of the web page only once.
 public bool SameAs( CSourceCitation sc )
 {
     if( sc is CSourceCitationXref )
     {
         return SameAs( (CSourceCitationXref)sc );
     }
     else if( sc is CSourceCitationInLine )
     {
         return SameAs( (CSourceCitationInLine)sc );
     }
     // Should really compare texts from source but this will only help if user has typed in exactly the same text twice, so for now just return false.
     return false;
 }
 // Used by copy constructors to copy base class fields.
 protected void CopyFieldsInto(CSourceCitation sc)
 {
     sc.m_alNoteStructures = new ArrayList();
     foreach (CNoteStructure ns in m_alNoteStructures)
     {
         sc.m_alNoteStructures.Add(ns.CopyConstructor());
     }
     sc.m_alMultimediaLinks = new ArrayList();
     foreach (CMultimediaLink ml in m_alMultimediaLinks)
     {
         sc.m_alMultimediaLinks.Add(ml.CopyConstructor());
     }
     sc.m_sCertaintyAssessment = m_sCertaintyAssessment;
     sc.m_alTextsFromSource = new ArrayList();
     foreach (string text in m_alTextsFromSource)
     {
         sc.m_alTextsFromSource.Add(text);
     }
 }
Esempio n. 3
0
 // Marks the given source citation as (un)restricted
 public void RestrictSource( CSourceCitation sc, bool bRestricted )
 {
     if( sc is CSourceCitationXref )
     {
         string xref = ((CSourceCitationXref)sc).m_xref;
         CSourceRecord sr = GetSourceRecord( xref );
         if( sr != null )
         {
             sr.Restricted = bRestricted;
         }
     }
     else if( sc is CSourceCitationInLine )
     {
         ((CSourceCitationInLine)sc).Restricted = bRestricted;
     }
 }