diff --git a/.gitignore b/.gitignore index d65136a..98d63b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,217 +1,3 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.sln.docstates - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -x64/ -build/ -bld/ -[Bb]in/ -[Oo]bj/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -#NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding addin-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -*.ncrunch* -_NCrunch_* -.*crunch*.local.xml - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml - -# NuGet Packages Directory -packages/ -## TODO: If the tool you use requires repositories.config uncomment the next line -#!packages/repositories.config - -# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets -# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented) -!packages/build/ - -# Windows Azure Build Output -csx/ -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Others -sql/ -*.Cache -ClientBin/ -[Ss]tyle[Cc]op.* -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -node_modules/ - -# Strong name keys -*.snk - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file to a newer -# Visual Studio version. Backup files are not needed, because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# ========================= -# Operating System Files -# ========================= - -# OSX -# ========================= - -.DS_Store -.AppleDouble -.LSOverride - -# Icon must ends with two \r. -Icon - -# Thumbnails -._* - -# Files that might appear on external disk -.Spotlight-V100 -.Trashes - -# Windows -# ========================= - -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp +.vs/ +obj/ +bin/ \ No newline at end of file diff --git a/App.config b/App.config new file mode 100644 index 0000000..aee9adf --- /dev/null +++ b/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SteamCloudFileManager/IRemoteFile.cs b/IRemoteFile.cs similarity index 100% rename from SteamCloudFileManager/IRemoteFile.cs rename to IRemoteFile.cs diff --git a/SteamCloudFileManager/IRemoteStorage.cs b/IRemoteStorage.cs similarity index 81% rename from SteamCloudFileManager/IRemoteStorage.cs rename to IRemoteStorage.cs index a9993ff..f2ebc33 100644 --- a/SteamCloudFileManager/IRemoteStorage.cs +++ b/IRemoteStorage.cs @@ -7,7 +7,7 @@ interface IRemoteStorage { IRemoteFile GetFile(string name); List GetFiles(); - bool GetQuota(out int totalBytes, out int availableBytes); + bool GetQuota(out ulong totalBytes, out ulong availableBytes); bool IsCloudEnabledForAccount { get; } bool IsCloudEnabledForApp { get; set; } } diff --git a/SteamCloudFileManager/MainForm.Designer.cs b/MainForm.Designer.cs similarity index 84% rename from SteamCloudFileManager/MainForm.Designer.cs rename to MainForm.Designer.cs index 104414c..5e3d279 100644 --- a/SteamCloudFileManager/MainForm.Designer.cs +++ b/MainForm.Designer.cs @@ -43,6 +43,9 @@ private void InitializeComponent() this.deleteButton = new System.Windows.Forms.Button(); this.downloadButton = new System.Windows.Forms.Button(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.uploadButton = new System.Windows.Forms.Button(); + this.uploadBackgroundWorker = new System.ComponentModel.BackgroundWorker(); this.SuspendLayout(); // // remoteListView @@ -164,11 +167,34 @@ private void InitializeComponent() this.saveFileDialog1.Filter = "All files|*"; this.saveFileDialog1.Title = "Save remote file as..."; // + // openFileDialog1 + // + this.openFileDialog1.Multiselect = true; + this.openFileDialog1.Title = "Select files to upload"; + // + // uploadButton + // + this.uploadButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.uploadButton.Enabled = false; + this.uploadButton.Location = new System.Drawing.Point(174, 232); + this.uploadButton.Name = "uploadButton"; + this.uploadButton.Size = new System.Drawing.Size(75, 23); + this.uploadButton.TabIndex = 8; + this.uploadButton.Text = "Upload"; + this.uploadButton.UseVisualStyleBackColor = true; + this.uploadButton.Click += new System.EventHandler(this.uploadButton_Click); + // + // uploadBackgroundWorker + // + this.uploadBackgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.uploadBackgroundWorker_DoWork); + this.uploadBackgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.uploadBackgroundWorker_RunWorkerCompleted); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(618, 267); + this.Controls.Add(this.uploadButton); this.Controls.Add(this.downloadButton); this.Controls.Add(this.deleteButton); this.Controls.Add(this.remoteListView); @@ -201,6 +227,9 @@ private void InitializeComponent() private System.Windows.Forms.Button deleteButton; private System.Windows.Forms.Button downloadButton; private System.Windows.Forms.SaveFileDialog saveFileDialog1; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + private System.Windows.Forms.Button uploadButton; + private System.ComponentModel.BackgroundWorker uploadBackgroundWorker; } } diff --git a/SteamCloudFileManager/MainForm.cs b/MainForm.cs similarity index 69% rename from SteamCloudFileManager/MainForm.cs rename to MainForm.cs index 1aff118..cca6d45 100644 --- a/SteamCloudFileManager/MainForm.cs +++ b/MainForm.cs @@ -1,158 +1,230 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using System.IO; - -namespace SteamCloudFileManager -{ - public partial class MainForm : Form - { - IRemoteStorage storage; - - public MainForm() - { - InitializeComponent(); - } - - private void connectButton_Click(object sender, EventArgs e) - { - try - { - uint appId; - if (string.IsNullOrWhiteSpace(appIdTextBox.Text)) - { - MessageBox.Show(this, "Please enter an App ID.", "Failed to connect", MessageBoxButtons.OK, MessageBoxIcon.Error); - return; - } - if (!uint.TryParse(appIdTextBox.Text.Trim(), out appId)) - { - MessageBox.Show(this, "Please make sure the App ID you entered is valid.", "Failed to connect", MessageBoxButtons.OK, MessageBoxIcon.Error); - return; - } - storage = RemoteStorage.CreateInstance(uint.Parse(appIdTextBox.Text)); - //storage = new RemoteStorageLocal("remote", uint.Parse(appIdTextBox.Text)); - refreshButton.Enabled = true; - refreshButton_Click(this, EventArgs.Empty); - } - catch (Exception ex) - { - MessageBox.Show(this, ex.ToString(), "Failed to connect", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - - private void refreshButton_Click(object sender, EventArgs e) - { - if (storage == null) - { - MessageBox.Show(this, "Not connected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - return; - } - - try - { - List files = storage.GetFiles(); - remoteListView.Items.Clear(); - foreach (IRemoteFile file in files) - { - ListViewItem itm = new ListViewItem(new string[] { file.Name, file.Timestamp.ToString(), file.Size.ToString(), file.IsPersisted.ToString(), file.Exists.ToString() }) { Tag = file }; - remoteListView.Items.Add(itm); - } - updateQuota(); - } - catch (Exception ex) - { - MessageBox.Show(this, "Can't refresh." + Environment.NewLine + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - } - } - - void updateQuota() - { - if (storage == null) throw new InvalidOperationException("Not connected"); - int totalBytes, availBytes; - storage.GetQuota(out totalBytes, out availBytes); - quotaLabel.Text = string.Format("{0}/{1} bytes used", totalBytes - availBytes, totalBytes); - } - - private void downloadButton_Click(object sender, EventArgs e) - { - if (storage == null) - { - MessageBox.Show(this, "Not connected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - return; - } - if (remoteListView.SelectedIndices.Count != 1) - { - MessageBox.Show(this, "Please select only one file.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - return; - } - - IRemoteFile file = remoteListView.SelectedItems[0].Tag as IRemoteFile; - saveFileDialog1.FileName = Path.GetFileName(file.Name); - if (saveFileDialog1.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) - { - try - { - File.WriteAllBytes(saveFileDialog1.FileName, file.ReadAllBytes()); - MessageBox.Show(this, "File downloaded.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - catch (Exception ex) - { - MessageBox.Show(this, "File download failed." + Environment.NewLine + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - } - } - } - - private void deleteButton_Click(object sender, EventArgs e) - { - if (storage == null) - { - MessageBox.Show(this, "Not connected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - return; - } - if (remoteListView.SelectedIndices.Count == 0) - { - MessageBox.Show(this, "Please select files to delete.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - return; - } - - if (MessageBox.Show(this, "Are you sure you want to delete the selected files?", "Confirm deletion", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == System.Windows.Forms.DialogResult.No) return; - - bool allSuccess = true; - - foreach (ListViewItem item in remoteListView.SelectedItems) - { - IRemoteFile file = item.Tag as IRemoteFile; - try - { - bool success = file.Delete(); - if (!success) - { - allSuccess = false; - MessageBox.Show(this, file.Name + " failed to delete.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - } - else - { - item.Remove(); - } - } - catch (Exception ex) - { - MessageBox.Show(this, file.Name + " failed to delete." + Environment.NewLine + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - } - } - - updateQuota(); - if (allSuccess) MessageBox.Show(this, "Files deleted.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - - private void remoteListView_SelectedIndexChanged(object sender, EventArgs e) - { - downloadButton.Enabled = deleteButton.Enabled = (storage != null && remoteListView.SelectedIndices.Count > 0); - } - } -} +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.IO; + +namespace SteamCloudFileManager +{ + public partial class MainForm : Form + { + IRemoteStorage storage; + // Item1 = cloud name, Item2 = path on disk + Queue> uploadQueue = new Queue>(); + + public MainForm() + { + InitializeComponent(); + } + + private void connectButton_Click(object sender, EventArgs e) + { + try + { + uint appId; + if (string.IsNullOrWhiteSpace(appIdTextBox.Text)) + { + MessageBox.Show(this, "Please enter an App ID.", "Failed to connect", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + if (!uint.TryParse(appIdTextBox.Text.Trim(), out appId)) + { + MessageBox.Show(this, "Please make sure the App ID you entered is valid.", "Failed to connect", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + storage = RemoteStorage.CreateInstance(uint.Parse(appIdTextBox.Text)); + //storage = new RemoteStorageLocal("remote", uint.Parse(appIdTextBox.Text)); + refreshButton.Enabled = true; + uploadButton.Enabled = true; + refreshButton_Click(this, EventArgs.Empty); + } + catch (Exception ex) + { + MessageBox.Show(this, ex.ToString(), "Failed to connect", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void refreshButton_Click(object sender, EventArgs e) + { + if (storage == null) + { + MessageBox.Show(this, "Not connected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + return; + } + + try + { + List files = storage.GetFiles(); + remoteListView.Items.Clear(); + foreach (IRemoteFile file in files) + { + ListViewItem itm = new ListViewItem(new string[] { file.Name, file.Timestamp.ToString(), file.Size.ToString(), file.IsPersisted.ToString(), file.Exists.ToString() }) { Tag = file }; + remoteListView.Items.Add(itm); + } + updateQuota(); + } + catch (Exception ex) + { + MessageBox.Show(this, "Can't refresh." + Environment.NewLine + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + } + } + + void updateQuota() + { + if (storage == null) throw new InvalidOperationException("Not connected"); + ulong totalBytes, availBytes; + storage.GetQuota(out totalBytes, out availBytes); + quotaLabel.Text = string.Format("{0}/{1} bytes used", totalBytes - availBytes, totalBytes); + } + + private void downloadButton_Click(object sender, EventArgs e) + { + if (storage == null) + { + MessageBox.Show(this, "Not connected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + return; + } + if (remoteListView.SelectedIndices.Count != 1) + { + MessageBox.Show(this, "Please select only one file.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + return; + } + + IRemoteFile file = remoteListView.SelectedItems[0].Tag as IRemoteFile; + saveFileDialog1.FileName = Path.GetFileName(file.Name); + if (saveFileDialog1.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) + { + try + { + File.WriteAllBytes(saveFileDialog1.FileName, file.ReadAllBytes()); + MessageBox.Show(this, "File downloaded.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + MessageBox.Show(this, "File download failed." + Environment.NewLine + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + } + } + } + + private void deleteButton_Click(object sender, EventArgs e) + { + if (storage == null) + { + MessageBox.Show(this, "Not connected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + return; + } + if (remoteListView.SelectedIndices.Count == 0) + { + MessageBox.Show(this, "Please select files to delete.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + return; + } + + if (MessageBox.Show(this, "Are you sure you want to delete the selected files?", "Confirm deletion", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == System.Windows.Forms.DialogResult.No) return; + + bool allSuccess = true; + + foreach (ListViewItem item in remoteListView.SelectedItems) + { + IRemoteFile file = item.Tag as IRemoteFile; + try + { + bool success = file.Delete(); + if (!success) + { + allSuccess = false; + MessageBox.Show(this, file.Name + " failed to delete.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + } + else + { + item.Remove(); + } + } + catch (Exception ex) + { + MessageBox.Show(this, file.Name + " failed to delete." + Environment.NewLine + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + } + } + + updateQuota(); + if (allSuccess) MessageBox.Show(this, "Files deleted.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + + private void remoteListView_SelectedIndexChanged(object sender, EventArgs e) + { + downloadButton.Enabled = deleteButton.Enabled = (storage != null && remoteListView.SelectedIndices.Count > 0); + } + + private void uploadBackgroundWorker_DoWork(object sender, DoWorkEventArgs e) + { + BackgroundWorker worker = (BackgroundWorker)sender; + List failedFiles = new List(); + while (uploadQueue.Count > 0) + { + var uploadItem = uploadQueue.Dequeue(); + IRemoteFile file = storage.GetFile(uploadItem.Item1); + try + { + byte[] data = File.ReadAllBytes(uploadItem.Item2); + if (!file.WriteAllBytes(data)) + failedFiles.Add(uploadItem.Item1); + } + catch (IOException ex) + { + failedFiles.Add(uploadItem.Item1); + } + } + + e.Result = failedFiles; + } + + private void uploadButton_Click(object sender, EventArgs e) + { + if (openFileDialog1.ShowDialog(this) == DialogResult.OK) + { + disableUploadGui(); + foreach (var selectedFile in openFileDialog1.FileNames) + { + uploadQueue.Enqueue(new Tuple(Path.GetFileName(selectedFile).ToLowerInvariant(), selectedFile)); + } + uploadBackgroundWorker.RunWorkerAsync(); + } + } + + void disableUploadGui() + { + // Disables app switching, refresh, and upload button + connectButton.Enabled = false; + refreshButton.Enabled = false; + uploadButton.Enabled = false; + uploadButton.Text = "Uploading..."; + } + + void enableUploadGui() + { + connectButton.Enabled = true; + refreshButton.Enabled = true; + uploadButton.Enabled = true; + uploadButton.Text = "Upload"; + } + + private void uploadBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) + { + var failedList = e.Result as List; + if (failedList.Count == 0) + { + MessageBox.Show(this, "Upload complete.", Text, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + else + { + failedList.Insert(0, "The following files have failed to upload:"); + MessageBox.Show(this, string.Join(Environment.NewLine, failedList), Text, MessageBoxButtons.OK, MessageBoxIcon.Error); + } + enableUploadGui(); + refreshButton_Click(this, EventArgs.Empty); + } + } +} diff --git a/SteamCloudFileManager/MainForm.resx b/MainForm.resx similarity index 99% rename from SteamCloudFileManager/MainForm.resx rename to MainForm.resx index c2c820d..311e6b2 100644 --- a/SteamCloudFileManager/MainForm.resx +++ b/MainForm.resx @@ -120,8 +120,14 @@ 17, 17 + + 153, 17 + + + 320, 17 + - 25 + 63 diff --git a/SteamCloudFileManager/Program.cs b/Program.cs similarity index 88% rename from SteamCloudFileManager/Program.cs rename to Program.cs index 6c177c6..aae0380 100644 --- a/SteamCloudFileManager/Program.cs +++ b/Program.cs @@ -1,11 +1,12 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; using System.Windows.Forms; namespace SteamCloudFileManager { - static class Program + internal static class Program { /// /// The main entry point for the application. diff --git a/SteamCloudFileManager/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs similarity index 77% rename from SteamCloudFileManager/Properties/AssemblyInfo.cs rename to Properties/AssemblyInfo.cs index 6227bfa..ea1f871 100644 --- a/SteamCloudFileManager/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -2,10 +2,10 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Steam Cloud File Manager Lite")] +[assembly: AssemblyTitle("Steam Cloud File Manager")] [assembly: AssemblyDescription("View, download, or delete Steam Cloud files.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("GMWare")] @@ -14,23 +14,20 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b7f494b6-498c-4d31-8195-48e70136c791")] +[assembly: Guid("739da04b-361c-48f7-b7c4-c665982ffbe8")] // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SteamCloudFileManager/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs similarity index 98% rename from SteamCloudFileManager/Properties/Resources.Designer.cs rename to Properties/Resources.Designer.cs index c202c0f..3d9e237 100644 --- a/SteamCloudFileManager/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18444 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/SteamCloudFileManager/Properties/Resources.resx b/Properties/Resources.resx similarity index 100% rename from SteamCloudFileManager/Properties/Resources.resx rename to Properties/Resources.resx diff --git a/SteamCloudFileManager/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs similarity index 96% rename from SteamCloudFileManager/Properties/Settings.Designer.cs rename to Properties/Settings.Designer.cs index 9630d81..2204450 100644 --- a/SteamCloudFileManager/Properties/Settings.Designer.cs +++ b/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18444 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/SteamCloudFileManager/Properties/Settings.settings b/Properties/Settings.settings similarity index 100% rename from SteamCloudFileManager/Properties/Settings.settings rename to Properties/Settings.settings diff --git a/SteamCloudFileManager/RemoteFile.cs b/RemoteFile.cs similarity index 100% rename from SteamCloudFileManager/RemoteFile.cs rename to RemoteFile.cs diff --git a/SteamCloudFileManager/RemoteFileLocal.cs b/RemoteFileLocal.cs similarity index 100% rename from SteamCloudFileManager/RemoteFileLocal.cs rename to RemoteFileLocal.cs diff --git a/SteamCloudFileManager/RemoteStorage.cs b/RemoteStorage.cs similarity index 97% rename from SteamCloudFileManager/RemoteStorage.cs rename to RemoteStorage.cs index 60cf3d9..b8d8e54 100644 --- a/SteamCloudFileManager/RemoteStorage.cs +++ b/RemoteStorage.cs @@ -80,7 +80,7 @@ public IRemoteFile GetFile(string name) return new RemoteFile(this, name.ToLowerInvariant()); } - public bool GetQuota(out int totalBytes, out int availableBytes) + public bool GetQuota(out ulong totalBytes, out ulong availableBytes) { checkDisposed(); return SteamRemoteStorage.GetQuota(out totalBytes, out availableBytes); diff --git a/SteamCloudFileManager/RemoteStorageLocal.cs b/RemoteStorageLocal.cs similarity index 86% rename from SteamCloudFileManager/RemoteStorageLocal.cs rename to RemoteStorageLocal.cs index 9322081..36dafd0 100644 --- a/SteamCloudFileManager/RemoteStorageLocal.cs +++ b/RemoteStorageLocal.cs @@ -39,11 +39,11 @@ public List GetFiles() return files; } - public bool GetQuota(out int totalBytes, out int availableBytes) + public bool GetQuota(out ulong totalBytes, out ulong availableBytes) { DriveInfo di = new DriveInfo(Path.GetPathRoot(Path.GetFullPath(basePath))); - totalBytes = di.TotalSize > int.MaxValue ? int.MaxValue : (int)di.TotalSize; - availableBytes = di.AvailableFreeSpace > int.MaxValue ? int.MaxValue : (int)di.AvailableFreeSpace; + totalBytes = (ulong)(di.TotalSize > int.MaxValue ? int.MaxValue : (int)di.TotalSize); + availableBytes = (ulong)(di.AvailableFreeSpace > int.MaxValue ? int.MaxValue : (int)di.AvailableFreeSpace); return true; } diff --git a/SteamCloudFileManager/SteamCloudFileManager.csproj b/SteamCloudFileManager.csproj similarity index 61% rename from SteamCloudFileManager/SteamCloudFileManager.csproj rename to SteamCloudFileManager.csproj index 129038f..4857913 100644 --- a/SteamCloudFileManager/SteamCloudFileManager.csproj +++ b/SteamCloudFileManager.csproj @@ -1,60 +1,40 @@ - - + + Debug AnyCPU - {58AAE4A4-3134-427E-A621-71DA133954E8} + {739DA04B-361C-48F7-B7C4-C665982FFBE8} WinExe - Properties SteamCloudFileManager SteamCloudFileManager - v4.0 + v4.8.1 512 + true + true - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + + cloud.ico - + true - bin\x86\Debug\ + bin\x64\Debug\ DEBUG;TRACE full - x86 + x64 prompt - MinimumRecommendedRules.ruleset - - bin\x86\Release\ - TRACE + + bin\x64\Release\ true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset + x64 - cloud.ico + true - ..\..\..\..\..\..\Desktop\Steamworks.NET-Standalone_5.0.0\Windows-x86\Steamworks.NET.dll + Steamworks.NET\Steamworks.NET.dll @@ -106,13 +86,12 @@ + + PreserveNewest + + + PreserveNewest + - \ No newline at end of file diff --git a/SteamCloudFileManager.sln b/SteamCloudFileManager.sln deleted file mode 100644 index 8865385..0000000 --- a/SteamCloudFileManager.sln +++ /dev/null @@ -1,28 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamCloudFileManager", "SteamCloudFileManager\SteamCloudFileManager.csproj", "{58AAE4A4-3134-427E-A621-71DA133954E8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {58AAE4A4-3134-427E-A621-71DA133954E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {58AAE4A4-3134-427E-A621-71DA133954E8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {58AAE4A4-3134-427E-A621-71DA133954E8}.Debug|x86.ActiveCfg = Debug|x86 - {58AAE4A4-3134-427E-A621-71DA133954E8}.Debug|x86.Build.0 = Debug|x86 - {58AAE4A4-3134-427E-A621-71DA133954E8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {58AAE4A4-3134-427E-A621-71DA133954E8}.Release|Any CPU.Build.0 = Release|Any CPU - {58AAE4A4-3134-427E-A621-71DA133954E8}.Release|x86.ActiveCfg = Release|x86 - {58AAE4A4-3134-427E-A621-71DA133954E8}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/SteamCloudFileManager.slnx b/SteamCloudFileManager.slnx new file mode 100644 index 0000000..1fa715e --- /dev/null +++ b/SteamCloudFileManager.slnx @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/SteamCloudFileManager/cloud.ico b/cloud.ico similarity index 100% rename from SteamCloudFileManager/cloud.ico rename to cloud.ico