diff --git a/ProjectPlugins/CodexPlugin/CodexNode.cs b/ProjectPlugins/CodexPlugin/CodexNode.cs index afb78f34..22d8f5c2 100644 --- a/ProjectPlugins/CodexPlugin/CodexNode.cs +++ b/ProjectPlugins/CodexPlugin/CodexNode.cs @@ -22,6 +22,8 @@ namespace CodexPlugin ContentId UploadFile(TrackedFile file, string contentType, string contentDisposition, Action onFailure); TrackedFile? DownloadContent(ContentId contentId, string fileLabel = ""); TrackedFile? DownloadContent(ContentId contentId, Action onFailure, string fileLabel = ""); + (TrackedFile?, TimeSpan) DownloadContentT(ContentId contentId, string fileLabel = ""); + (TrackedFile?, TimeSpan) DownloadContentT(ContentId contentId, Action onFailure, string fileLabel = ""); LocalDataset DownloadStreamless(ContentId cid); /// /// TODO: This will monitor the quota-used of the node until 'size' bytes are added. That's a very bad way @@ -189,10 +191,20 @@ namespace CodexPlugin public TrackedFile? DownloadContent(ContentId contentId, string fileLabel = "") { - return DownloadContent(contentId, DoNothing, fileLabel); + return DownloadContentT(contentId, fileLabel).Item1; } public TrackedFile? DownloadContent(ContentId contentId, Action onFailure, string fileLabel = "") + { + return DownloadContentT(contentId, onFailure, fileLabel).Item1; + } + + public (TrackedFile?, TimeSpan) DownloadContentT(ContentId contentId, string fileLabel = "") + { + return DownloadContentT(contentId, DoNothing, fileLabel); + } + + public (TrackedFile?, TimeSpan) DownloadContentT(ContentId contentId, Action onFailure, string fileLabel = "") { var file = tools.GetFileManager().CreateEmptyFile(fileLabel); hooks.OnFileDownloading(contentId); @@ -205,7 +217,7 @@ namespace CodexPlugin transferSpeeds.AddDownloadSample(size, measurement); hooks.OnFileDownloaded(size, contentId); - return file; + return (file, measurement); } public LocalDataset DownloadStreamless(ContentId cid) diff --git a/SeeTimeline/App.xaml b/SeeTimeline/App.xaml new file mode 100644 index 00000000..dc945260 --- /dev/null +++ b/SeeTimeline/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/SeeTimeline/App.xaml.cs b/SeeTimeline/App.xaml.cs new file mode 100644 index 00000000..71c26be6 --- /dev/null +++ b/SeeTimeline/App.xaml.cs @@ -0,0 +1,14 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace SeeTimeline +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } + +} diff --git a/SeeTimeline/AssemblyInfo.cs b/SeeTimeline/AssemblyInfo.cs new file mode 100644 index 00000000..b0ec8275 --- /dev/null +++ b/SeeTimeline/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/SeeTimeline/MainWindow.xaml b/SeeTimeline/MainWindow.xaml new file mode 100644 index 00000000..0ad10b02 --- /dev/null +++ b/SeeTimeline/MainWindow.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + + +