Exemplo n.º 1
0
        private async Task PublishLocalExe()
        {
            Clipboard.SetText(VersionChanges);

            UploadCmd.CurrentLabel = "Uploading ...";
            var ok = await Uploader.UploadNew(LocalExe, MaxPartSizeMB);

            if (!ok)
            {
                UploadCmd.CurrentLabel = "Uploading Error";
                return;
            }

            RemoteExe.FileName    = LocalExe.FileName;
            RemoteExe.FileSize    = LocalExe.FileSize;
            RemoteExe.FileHash    = LocalExe.FileHash;
            RemoteExe.FileVersion = LocalExe.FileVersion;

            ok = await Uploader.Edit(RemoteExe, VersionChanges);

            if (!ok)
            {
                UploadCmd.CurrentLabel = "Updating Error";
                return;
            }
            UploadCmd.CurrentLabel = "Upload Successful";
        }