Esempio n. 1
0
        private void OnDoubleClickCommand(GcsRow row)
        {
            if (row.IsDirectory)
            {
                UpdateCurrentState(row.BlobName);

                EventsReporterWrapper.ReportEvent(GcsFileBrowserOpenDirectoryEvent.Create());
            }
            else
            {
                // TODO: Show the file.
            }
        }
Esempio n. 2
0
        private async Task <GcsBrowserState> LoadStateForDirectoryAsync(string name)
        {
            try
            {
                IsLoading = true;

                var dir = await _dataSource.GetDirectoryListAsync(Bucket.Name, name);

                var items = Enumerable.Concat(
                    dir.Directories.OrderBy(d => d).Select(d => GcsRow.CreateDirectoryRow(bucket: Bucket.Name, name: d)),
                    dir.Files.Where(f => f.Name.Last() != '/').OrderBy(f => f.Name).Select(GcsRow.CreateFileRow));

                return(new GcsBrowserState(items, name));
            }
            finally
            {
                IsLoading = false;
            }
        }
 public GcsDirectoryItem(GcsRow row) :
     base(Resources.GcsFileBrowserDirectoryItemDisplayName, row.LeafName)
 {
     _directory = row;
 }
 public GcsFileItem(GcsRow row) :
     base(Resources.GcsFileBrowserFileItemDisplayName, row.LeafName)
 {
     _file = row;
 }
 private object GetValue(GcsRow item)
 {
     return(_columnProperty.Value.GetValue(item));
 }