コード例 #1
0
        //***********************************************************
        //
        // 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);
            }
        }
コード例 #2
0
 //**********************************************************************
 // Constructor
 //**********************************************************************
 public ListLinkItem(string sourceName,
     KfxLinkSourceType sourceType,
     string destination)
 {
     this.sourceName  = sourceName;
     this.sourceType  = sourceType;
     this.destination = destination;
 }
コード例 #3
0
ファイル: Helper.cs プロジェクト: exodev/jcr-msofficeplugin
        //**********************************************************************
        // 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";
            }
        }
コード例 #4
0
 //**********************************************************************
 // Constructor
 //**********************************************************************
 public ComboIndexItem(string name, KfxLinkSourceType type)
 {
     this.name = name;
     this.type = type;
 }
コード例 #5
0
 //**********************************************************************
 // Constructor
 //**********************************************************************
 public ListLinkItem(Link link)
 {
     this.sourceName  = link.Source;
     this.sourceType  = link.SourceType;
     this.destination = link.Destination;
 }