コード例 #1
0
 private FileEntry(File f)
 {
     _name = f.FileName;
     _relativeFilePath = f.RelativePath;
     _content = null;
     _isFile = f.IsFile;
 }
コード例 #2
0
 private FileEntry(string path)
 {
     File f = new File(path);
     _name = f.FileName;
     _relativeFilePath = f.RelativePath;
     if (f.FileName.EndsWith(".txt")||f.FileName.EndsWith(".lua"))
         _content = f.ReadToEnd();
     _isFile = f.IsFile;
 }
コード例 #3
0
 public static List<AudioFileEntry> LoadInPath(string path)
 {
     if (User.Current != null)
         return null;
     List<AudioFileEntry> ret = new List<AudioFileEntry>();
     File f = new File((path == null ? "$AUDIOFILES%" : path));
     foreach (File fi in f.Children)
         ret.Add(new AudioFileEntry(fi));
     return ret;
 }
コード例 #4
0
 public static List<FileEntry> LoadInPath(string path)
 {
     if (!User.Current.HasRight(Constants.FILE_ACCESS_RIGHT))
         return null;
     List<FileEntry> ret = new List<FileEntry>();
     File f = new File(path);
     foreach (File fi in f.Children)
         ret.Add(new FileEntry(fi));
     return ret;
 }
コード例 #5
0
 private AudioFileEntry(File f)
 {
     _name = f.FileName;
     _relativeFilePath = f.RelativePath;
     _isFile = f.IsFile;
 }
コード例 #6
0
 protected void UpdateVacationRoute(string context, string extension, DateTime originalStartDate, DateTime startDate, DateTime endDate, bool endWithVoicemail, File audioFile)
 {
     lock (_lock)
     {
         Hashtable ht = StoredConfiguration;
         ArrayList cont = new ArrayList();
         if (ht.ContainsKey(context))
         {
             cont = (ArrayList)ht[context];
             ht.Remove(context);
         }
         Hashtable vcr;
         for (int x = 0; x < cont.Count; x++)
         {
             vcr = (Hashtable)cont[x];
             if (((string)vcr[_OWNING_EXTENSION_FIELD_ID] == extension)
                 && (((DateTime)vcr[_OWNING_EXTENSION_FIELD_ID]).Ticks == originalStartDate.Ticks))
             {
                 cont.RemoveAt(x);
                 break;
             }
         }
         vcr = new Hashtable();
         vcr.Add(_OWNING_EXTENSION_FIELD_ID, extension);
         vcr.Add(_START_DATE_FIELD_ID, startDate);
         vcr.Add(_END_DATE_FIELD_ID, endDate);
         vcr.Add(_END_WITH_VM_FIELD_ID, endWithVoicemail);
         vcr.Add(_TYPE_FIELD_ID, VacationRouteRedirectTypes.PlayFile);
         vcr.Add(_AUDIO_FILE_FIELD_ID, audioFile.ToString());
         ht.Add(context, cont);
         StoredConfiguration = ht;
     }
 }
コード例 #7
0
 protected void AddVacationRoute(string context, string extension, DateTime startDate, DateTime endDate, bool endWithVoicemail, File audioFile)
 {
     lock (_lock)
     {
         Hashtable ht = StoredConfiguration;
         ArrayList cont = new ArrayList();
         if (ht.ContainsKey(context))
         {
             cont = (ArrayList)ht[context];
             ht.Remove(context);
         }
         Hashtable vcr = new Hashtable();
         vcr.Add(_OWNING_EXTENSION_FIELD_ID, extension);
         vcr.Add(_START_DATE_FIELD_ID, startDate);
         vcr.Add(_END_DATE_FIELD_ID, endDate);
         vcr.Add(_END_WITH_VM_FIELD_ID, endWithVoicemail);
         vcr.Add(_TYPE_FIELD_ID, VacationRouteRedirectTypes.PlayFile);
         vcr.Add(_AUDIO_FILE_FIELD_ID,audioFile.ToString());
         ht.Add(context, cont);
         StoredConfiguration = ht;
     }
 }