void ParseLine(string line) { if (line == "") { return; } var info = line.Split('\t'); var item = new ListViewIconsItemDescription() { Name = string.Format("{0}. {1}", data.Count + 1, info[0]), }; data.Add(item); }
private void RestoreList(string Name, IObservableList v, bool isLocalBackup = false) { try { v.Clear(); } catch (Exception ex) { //This is Temporary fix- Inputvalues list throwing observable collection cannot be modified exception Reporter.ToLog(eLogLevel.DEBUG, "Clearing list values for restoring from back up", ex); } object Backuplist; bool b; b = isLocalBackup ? mLocalBackupDic.TryGetValue(Name + "~List", out Backuplist) : mBackupDic.TryGetValue(Name + "~List", out Backuplist); if (b) { if (Backuplist != null) { foreach (object o in ((IList)Backuplist)) { v.Add(o); RepositoryItemBase repoItem = o as RepositoryItemBase; repoItem?.RestoreBackup(isLocalBackup); // Drill down the restore } if (isLocalBackup) { mLocalBackupDic.Remove(Name + "~List"); } else { mBackupDic.Remove(Name + "~List"); } } else { v = null; } } else { // TODO: handle err } }
private void RestoreList(string Name, IObservableList v, bool isLocalBackup = false) { v.Clear(); object Backuplist; bool b; b = isLocalBackup ? mLocalBackupDic.TryGetValue(Name + "~List", out Backuplist) : mBackupDic.TryGetValue(Name + "~List", out Backuplist); if (b) { if (Backuplist != null) { foreach (object o in ((IList)Backuplist)) { v.Add(o); RepositoryItemBase repoItem = o as RepositoryItemBase; repoItem?.RestoreBackup(isLocalBackup); // Drill down the restore } if (isLocalBackup) { mLocalBackupDic.Remove(Name + "~List"); } else { mBackupDic.Remove(Name + "~List"); } } else { v = null; } } else { // TODO: handle err } }
private void RestoreList(string Name, IObservableList v, bool isLocalBackup = false) { v.Clear(); object Backuplist; bool b; if (isLocalBackup) { b = mLocalBackupDic.TryGetValue(Name + "~List", out Backuplist); } else { b = mBackupDic.TryGetValue(Name + "~List", out Backuplist); } if (!b) { // TODO: handle err } foreach (object o in ((IList)Backuplist)) { v.Add(o); if (o is RepositoryItemBase) { ((RepositoryItemBase)o).RestoreBackup(isLocalBackup); // Drill down the restore } } if (isLocalBackup) { mLocalBackupDic.Remove(Name + "~List"); } else { mBackupDic.Remove(Name + "~List"); } }
private void RestoreList(string Name, IObservableList v) { v.Clear(); object Backuplist; bool b = mBackupDic.TryGetValue(Name + "~List", out Backuplist); if (!b) { // TODO: handle err } foreach (object o in (List <dynamic>)Backuplist) { v.Add(o); if (o is RepositoryItemBase) { ((RepositoryItemBase)o).RestoreBackup(); // Drill down the restore } } mBackupDic.Remove(Name + "~List"); }