//*********************************************************** // // Method: OnIndexFieldDelete // Purpose: An index field was deleted from the existing document class // Params: strIndexField- Index field being deleted // Output: None // //************************************************************/ internal static bool OnIndexFieldDelete(string strIndexField, ReleaseSetupData oSetupData) { bool bShowUI = false; try { String m_strDeletedIndexField = strIndexField; KfxLinkSourceType m_kfxlnkDeletedFieldType = KfxLinkSourceType.KFX_REL_INDEXFIELD; //locate all sourcetypes in the links collection which are IndexField related //and remove them but make sure that we add the destination back in to the collection foreach (Link oLink in oSetupData.Links) { if ((oLink.Source.EndsWith(strIndexField)) && (oLink.SourceType == m_kfxlnkDeletedFieldType)) { oLink.Source = ""; oLink.SourceType = KfxLinkSourceType.KFX_REL_UNDEFINED_LINK; bShowUI = true; } } //FIX SPR#27062 GC.Collect(); GC.WaitForPendingFinalizers(); oSetupData.Apply(); return(bShowUI); } catch (Exception e) { return(bShowUI); } }
//********************************************************************** // Constructor //********************************************************************** public ListLinkItem(string sourceName, KfxLinkSourceType sourceType, string destination) { this.sourceName = sourceName; this.sourceType = sourceType; this.destination = destination; }
//********************************************************************** // Converts a KfxLinkSourceType enum element to a human readable string. //********************************************************************** public static string KfxLinkSourceTypeToString(KfxLinkSourceType type) { switch (type) { case KfxLinkSourceType.KFX_REL_INDEXFIELD: return "index_field"; case KfxLinkSourceType.KFX_REL_BATCHFIELD: return "batch_field"; default: return "unknown"; } }
//********************************************************************** // Constructor //********************************************************************** public ComboIndexItem(string name, KfxLinkSourceType type) { this.name = name; this.type = type; }
//********************************************************************** // Constructor //********************************************************************** public ListLinkItem(Link link) { this.sourceName = link.Source; this.sourceType = link.SourceType; this.destination = link.Destination; }