public int AddJob(PhilesJobType jType, object[] param)
        {
            int       jNumber = GetNextJobNumber();
            PhilesJob nJob    = null;

            if (jType == PhilesJobType.JOB_PHILES)
            {
                nJob = new PhilesJob();
            }
            else if (jType == PhilesJobType.JOB_CLIENT_DIRECTORY_LISTING)
            {
                nJob = new ClientDirectoryRequestJob(param);
            }
            else if (jType == PhilesJobType.JOB_CLIENT_FILE_UPLOAD)
            {
                nJob = new ClientFileUploadJob(param);
            }
            else if (jType == PhilesJobType.JOB_CLIENT_PHILES)
            {
                nJob = new ClientPhilesJob();
            }
            else if (jType == PhilesJobType.JOB_SERVER_DIRECTORY_LISTING)
            {
                nJob = new ServerDirectoryRequestJob();
            }
            else if (jType == PhilesJobType.JOB_SERVER_FILE_UPLOAD)
            {
                nJob = new ServerFileUploadJob();
            }
            nJob.OnJobComplete += new PhilesJob.JobCompleteDelegate(nJob_OnJobComplete);
            nJob.JobNumber      = jNumber;
            Jobs.Add(jNumber, nJob);
            return(jNumber);
        }
 private PhilesJob getJob(int jNumber)
 {
     try
     {
         PhilesJob j = Jobs[jNumber];
         return(j);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }