예제 #1
0
        public void StartFilesSearch(String profileName)
#endif
        {
            try
            {
                if (!String.IsNullOrEmpty(profileName))
                {
                    CCConfiguration.CCConfigurationData cfData = config.GetConfiguration(profileName);
                    if (cfData != null)
                    {
                        //-- Check if reset required --\\
                        if (timerSearch != null && String.Compare(profileName, timerSearch.CurrentProfile.Name, true) != 0)
                        {
                            //-- Reset --\\
                            timerSearch.Enabled = false;
                            timerSearch.Dispose();
                            timerSearch = null;
                        }

                        //-- Create a new timer search object if necessary --\\
                        if (timerSearch == null)
                        {
                            timerSearch = new CCTimerSearch(csmManager.GetCsm(String.IsNullOrEmpty(cfData.LoginApplication) ? profileName : cfData.LoginApplication, cfData.LoginStation, true), cfData);
                        }
                        timerSearch.Enabled = true;
                    }
                }
            }
            catch (Exception ex)
            {
                ILog.LogError(ex);
            }
        }
예제 #2
0
 /// <summary>
 /// The method that fires the 'OnCollectionCreated' event
 /// </summary>
 /// <param name="cApi"></param>
 /// <param name="creator"></param>
 /// <param name="csm"></param>
 /// <param name="collection"></param>
 /// <param name="canPut"></param>
 protected virtual void CollectionCreated(CCTimerSearch cApi, CCreator creator, ITisClientServicesModule csm, ITisCollectionData collection, ref bool canPut)
 {
     try
     {
         if (OnCollectionCreated != null)
         {
             OnCollectionCreated(this, creator, csm, collection, ref canPut);
         }
     }
     catch (Exception ex)
     {
         ILog.LogError(ex);
     }
 }
예제 #3
0
 /// <summary>
 /// The method that fires the 'OnPreFileLock' event.
 /// </summary>
 /// <param name="cApi"></param>
 /// <param name="filesHandler"></param>
 /// <param name="fileName"></param>
 protected virtual void PreFileLock(CCTimerSearch cApi, object filesHandler, ref String fileName)
 {
     try
     {
         if (OnPreFileLock != null)
         {
             OnPreFileLock(this, filesHandler, ref fileName);
         }
     }
     catch (Exception ep)
     {
         ILog.LogError(ep);
     }
 }