示例#1
0
        /// <summary>
        /// Reads files in project folder and displays them on the list.
        /// </summary>
        private void FillFilesList()
        {
            // Get all file names in project folder
            var           projectDir = new Java.IO.File(MainActivity.ApplicationFolderPath);
            List <string> fileNames  = new List <string>();

            string[] fileArray = projectDir.List();
            if (fileArray != null)
            {
                fileNames = fileArray.ToList();
                // Sort files by date
                fileNames.Remove("settings");
                fileNames.Sort(new FileComparer());
            }
            // Display on list
            mAdapter         = new ListAdapter(this, fileNames);
            mLvFiles.Adapter = mAdapter;
        }
示例#2
0
        /// <summary>
        /// Fills the raw data list with files.
        /// </summary>
        private void FillRawDataList()
        {
            var           projectDir = new Java.IO.File(MainActivity.ApplicationFolderPath + Java.IO.File.Separator + mFilename);
            List <string> fileNames  = new List <string>();

            string[] fileArray = projectDir.List();

            for (int i = 0; i < fileArray.Length; i++)
            {
                fileArray[i] = fileArray[i].Replace(".csv", "");
            }
            if (fileArray != null)
            {
                fileNames = fileArray.ToList();
            }

            mAdapter = new ListAdapter(this, fileNames);
        }