private void LoadObjectsFromFile() { try { this.cloudObjects = CloudObjects.Load(); this.listViewFound.VirtualListSize = this.cloudObjects.Count; } catch (Exception) { this.cloudObjects = new CloudObjects(); throw; } }
private static IEnumerable <CloudObjects> getFiesinFolderList(string vFolderPath) { DirectoryInfo d = new DirectoryInfo(@vFolderPath); FileInfo[] Files = d.GetFiles("*.csv"); string str = ""; foreach (FileInfo file in Files) { str = str + ", " + file.Name; CloudObjects vObj = new CloudObjects(); vObj.Name = file.Name; vObj.idTbl = vIdtbl; vIdtbl = vIdtbl + 1; yield return(vObj); } }
private static IEnumerable <CloudObjects> getCloudObjectList(string vSqlURL) { List <String> vObjects = new List <String>(); vObjects.AddRange(In2SqlSvcTool.HttpGetArray(vSqlURL)); int i = 0; foreach (var vCurrObj in vObjects) { i += 1; if (i < 2) { continue; } CloudObjects vObj = new CloudObjects(); vObj.Name = vCurrObj.ToString().Replace('"', ' ').Trim(); vObj.idTbl = vIdtbl; vIdtbl = vIdtbl + 1; yield return(vObj); } }