Example #1
0
        public Data_Net__00NormalMessage ReadOne(NiceSystemInfo niceSystem, string fileName, Data_Net__00NormalMessage.eLocation location, IMyLog log)
        {
            try
            {
                WithAndWithoutUnderline ww = new WithAndWithoutUnderline(
                    FolderNames.GetFolder(niceSystem, eLocationToMyFolder(location)),
                    fileName);

                Data_Net__00NormalMessage o = null;

                Stream stream = OpenFile.ForRead(ww.Existing, false, false, log);
                if (stream == null)
                {
                    return(null);
                }
                using (BinaryReader br = new BinaryReader(stream))
                {
                    ASPTrayBase ox = ASPTrayBase.ReadOne(br);
                    if (ox.GetEnumType() == ASPTrayBase.eASPtrayType.NormalMessage)
                    {
                        o = (Data_Net__00NormalMessage)ox;
                    }
                }
                return(o);
            }
            catch (SystemException se)
            {
                log.Error("*** SystemException ***");
                log.Error(se.Message);
            }
            return(null);
        }
Example #2
0
        public Data_Net__02ScreenshotRequest ReadOne(NiceSystemInfo niceSystem, string fileName, IMyLog log)
        {
            try
            {
                WithAndWithoutUnderline ww = new WithAndWithoutUnderline(
                    FolderNames.GetFolder(niceSystem, MyFolders.ASP_QueuedMessages_),
                    fileName);
                Data_Net__02ScreenshotRequest o = null;

                Stream stream = OpenFile.ForRead(ww.Existing, false, false, log);
                if (stream == null)
                {
                    return(null);
                }
                using (BinaryReader br = new BinaryReader(stream))
                {
                    ASPTrayBase ox = ASPTrayBase.ReadOne(br);
                    if (ox.GetEnumType() == ASPTrayBase.eASPtrayType.ScreenShotRequest)
                    {
                        o = (Data_Net__02ScreenshotRequest)ox;
                    }
                }
                return(o);
            }
            catch (SystemException se)
            {
                log.Error("*** SystemException ***");
                log.Error(se.Message);
            }
            return(null);
        }
Example #3
0
 public void Delete(NiceSystemInfo niceSystem, string fileName, IMyLog log)
 {
     try
     {
         WithAndWithoutUnderline ww = new WithAndWithoutUnderline(
             FolderNames.GetFolder(niceSystem, MyFolders.ASP_QueuedMessages_),
             fileName);
         File.Delete(ww.Existing);
     }
     catch (SystemException se)
     {
         log.Error("*** SystemException ***");
         log.Error(se.Message);
     }
 }
Example #4
0
 public void Delete(NiceSystemInfo niceSystem, string fileName, Data_Net__00NormalMessage.eLocation location, IMyLog log)
 {
     try
     {
         WithAndWithoutUnderline ww = new WithAndWithoutUnderline(
             FolderNames.GetFolder(niceSystem, eLocationToMyFolder(location)),
             fileName);
         File.Delete(ww.Existing);
     }
     catch (SystemException se)
     {
         log.Error("*** SystemException ***");
         log.Error(se.Message);
     }
 }