コード例 #1
0
        private void OnDoubleClickCommand(GcsRow row)
        {
            if (row.IsDirectory)
            {
                UpdateCurrentState(row.BlobName);

                EventsReporterWrapper.ReportEvent(GcsFileBrowserOpenDirectoryEvent.Create());
            }
            else
            {
                // TODO: Show the file.
            }
        }
コード例 #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;
            }
        }
コード例 #3
0
 public GcsDirectoryItem(GcsRow row) :
     base(Resources.GcsFileBrowserDirectoryItemDisplayName, row.LeafName)
 {
     _directory = row;
 }
コード例 #4
0
 public GcsFileItem(GcsRow row) :
     base(Resources.GcsFileBrowserFileItemDisplayName, row.LeafName)
 {
     _file = row;
 }
コード例 #5
0
 private object GetValue(GcsRow item)
 {
     return(_columnProperty.Value.GetValue(item));
 }