private void SetRequiredFiles() { List <RequiredFileModel> list = new List <RequiredFileModel>(); foreach (RequiredFileModel model in this._requiredFiles) { RequiredFileModel item = new RequiredFileModel { FileType = model.FileType, Complete = false, MD5 = model.MD5, LastChecked = DateTime.Now, Size = model.Size }; if (item.FileType == "CurrentMedia") { model.Path.Split(new char[] { '.' }); item.Id = model.Id; item.Path = model.Path; } else { if (!(item.FileType == "layout")) { continue; } item.Id = int.Parse(model.Path); item.Path = model.Path + ".mosaic"; } list.Add(item); } this._requiredFiles = list; }
public void MarkIncomplete(int id, string md5) { foreach (RequiredFileModel model in this._requiredFiles) { if (model.Id == id) { RequiredFileModel item = model; item.Complete = false; item.MD5 = md5; this._requiredFiles.Add(item); this._requiredFiles.Remove(model); break; } } }
public void MarkComplete(string path, string md5) { foreach (RequiredFileModel model in this._requiredFiles) { if (model.Path == path) { RequiredFileModel item = model; item.Complete = true; item.MD5 = md5; this._requiredFiles.Add(item); this._requiredFiles.Remove(model); break; } } }