예제 #1
0
		public Advertisement[] AdvertsSCRGet(Advertisement[] aAdverts)
		{
			List<Advertisement> aRetVal = new List<Advertisement>();
			try
			{
				userspace.Helper cHelper = new userspace.Helper();
				foreach (Advertisement cAdv in aAdverts)
				{
					if (cHelper.FileExist(cAdv.sStoragePath + cAdv.sFilename))
						cAdv.bFileExist = true;
					aRetVal.Add(cAdv);
				}
			}
			catch (Exception ex)
			{
				(new Logger()).WriteError(ex);
			}
			return aRetVal.ToArray();
		}
예제 #2
0
		public Clip[] ClipsSCRGet(Clip[] aClips)
		{
			List<Clip> aRetVal = new List<Clip>();
			DBInteract cDBI = new DBInteract();
			string sClipsPath = "NULL";
			(new Logger()).WriteDebug("ClipsSCRGet: [in_count:" + aClips.Length + "]");
			try
			{
				//List<Clip> aSource = cDBI.ClipsSCRGet();
				userspace.Helper cHelper = new userspace.Helper();
				sClipsPath = _ahStoragesSCR.Values.FirstOrDefault(o => o.Contains("clips"));
				if (sClipsPath != null)
					foreach (Clip cClip in aClips)
					{
						if (cHelper.FileExist(sClipsPath + cClip.sFilename))
						{
							cClip.sDuration = cClip.nFramesQty.ToFramesString();
							cClip.bLocked = cClip.sRotation == "Стоп" ? true : false; //PREFERENCES
							cClip.sStoragePath = sClipsPath; //PREFERENCES
							aRetVal.Add(cClip);
						}
					}
			}
			catch (Exception ex)
			{
				(new Logger()).WriteError(ex);
			}
			(new Logger()).WriteDebug("ClipsSCRGet: [out_count:" + aRetVal.Count + "][path:" + sClipsPath + "]");
			return aRetVal.ToArray();
		}