public void PopulateList() { ArrayList options = new ArrayList(); if (VerifySDCard()) { try { sdCard.StorageDevice.CreateDirectory(@"Code"); } catch { } GT.StorageDevice storage = sdCard.StorageDevice; foreach (string s in storage.ListRootDirectorySubdirectories()) { Debug.Print(s); if (s == "Code") { foreach (string f in storage.ListFiles("\\SD\\Code\\")) { //var x = f.Substring(f.LastIndexOf("\\")+1); var namafile = Path.GetFileNameWithoutExtension(f); options.Add(new object[2] { namafile, f }); } } } if (options.Count <= 0) { options.Add(new object[2] { "--kosong--", null }); } listFile = new GHI.Glide.UI.List(options, 300); } }
public void PopulateList() { ArrayList options = new ArrayList(); if (VerifySDCard()) { try { sdCard.StorageDevice.CreateDirectory(@"Inbox"); } catch { } GT.StorageDevice storage = sdCard.StorageDevice; foreach (string s in storage.ListRootDirectorySubdirectories()) { Debug.Print(s); if (s == "Inbox") { foreach (string f in storage.ListFiles("\\SD\\Inbox\\")) { //var x = f.Substring(f.LastIndexOf("\\")+1); var namafile = Path.GetFileNameWithoutExtension(f); options.Add(new object[2] { namafile, f }); } } } if (options.Count <= 0) { options.Add(new object[2] { "--kosong--", null }); } listMessage = new GHI.Glide.UI.List(options, 300); } }