コード例 #1
0
 public void Update(PersistentDriveInfo d)
 {
     if (d != null)
     {
         d.lastInserted = DateTime.Now;
         this.Save();
     }
 }
コード例 #2
0
        public void Remove(string serial)
        {
            bool flag = false;
            PersistentDriveInfo persistentDriveInfo = this.Find(serial);

            if (persistentDriveInfo != null)
            {
                this.persistentDriveInfos.Remove(persistentDriveInfo);
                flag = true;
            }
            if (flag)
            {
                this.Save();
            }
        }
コード例 #3
0
        public void Add(PersistentDriveInfo d)
        {
            bool flag = false;

            if (this.Find(d.serial) == null)
            {
                if (this.wasEmptyOnLoad)
                {
                    d.creationTime -= PersistentDriveInfoList.PersistentDriveExpiration;
                }
                this.persistentDriveInfos.Add(d);
                flag = true;
            }
            if (flag)
            {
                this.Save();
            }
        }
コード例 #4
0
 public void Remove(PersistentDriveInfo d)
 {
     this.Remove(d.serial);
 }