Ejemplo n.º 1
0
 public void ForEach(NiceSystemInfo niceSystem, IMyLog log, dProcess_Data_Net__02ScreenshotRequest cb)
 {
     try
     {
         foreach (var f1 in Directory.GetFiles(FolderNames.GetFolder(niceSystem, MyFolders.ASP_QueuedMessages_)))
         {
             if (!ASPTrayBase.s_MsgFile_IsOld(f1))
             {
                 ASPTrayBase d1 = ASPTrayBase.ReadOne(f1, log);
                 if ((d1 != null) && (d1.GetEnumType() == ASPTrayBase.eASPtrayType.ScreenShotRequest))
                 {
                     cb((Data_Net__02ScreenshotRequest)d1);
                 }
             }
         }
     }
     catch (SystemException se)
     {
         log.Error("*** SystemException ***");
         log.Error(se.Message);
     }
 }
Ejemplo n.º 2
0
        private void forEach(NiceSystemInfo niceSystem, DateTime newerThan, string containsUser, MyFolders folder, IMyLog log, dProcess_Data_Net__00NormalMessage cb)
        {
            foreach (var f1 in Directory.GetFiles(FolderNames.GetFolder(niceSystem, folder)))
            {
                if ((containsUser != null) && (!f1.Contains(containsUser)))
                {
                    // wrong user
                    continue;
                }

                DateTime fileTime = ASPTrayBase.s_MsgFile_GetDateTimeOfMessageFile(f1);
                if (fileTime >= newerThan)
                {
                    if (!ASPTrayBase.s_MsgFile_IsOld(f1))
                    {
                        ASPTrayBase d1 = ASPTrayBase.ReadOne(f1, log);
                        if ((d1 != null) && (d1.GetEnumType() == ASPTrayBase.eASPtrayType.NormalMessage))
                        {
                            cb((Data_Net__00NormalMessage)d1);
                        }
                    }
                }
            }
        }