aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher.UI/Properties/Settings.Designer.cs
blob: f75064b02b58aa5a3622cd685bd3e698babb2f66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Tango.MachineStudio.Publisher.UI.UI.Properties {
    
    
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")]
    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
        
        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
        
        public static Settings Default {
            get {
                return defaultInstance;
            }
        }
    }
}
class="p">; using System.Net.Mime; namespace Tango.MachineService.Controllers { public class DownloadsController : Controller { [Authorize] public ActionResult Index() { List<DownloadModel> downloads = new List<DownloadModel>(); using (ObservablesContext db = ObservablesContextHelper.CreateContext()) { foreach (var item in db.MachineStudioVersions.Where(x => x.InstallerBlobName != null).Include(x => x.User).Include(x => x.User.Contact).ToList()) { DownloadModel download = new DownloadModel(); download.App = DownloadModel.DownloadApp.MachineStudio; download.ID = item.InstallerBlobName; download.Name = $"Machine Studio v{item.Version}.exe"; download.Version = item.Version; download.User = item.User.Contact.FullName; download.Date = item.LastUpdated; download.Comments = item.Comments; downloads.Add(download); } foreach (var item in db.TangoVersions.Where(x => x.InstallerBlobName != null).Include(x => x.User).Include(x => x.User.Contact).ToList()) { DownloadModel download = new DownloadModel(); download.App = DownloadModel.DownloadApp.PPC; download.ID = item.InstallerBlobName; download.Name = $"PPC v{item.Version}.exe"; download.Version = item.Version; download.User = item.User.Contact.FullName; download.Date = item.LastUpdated; download.Comments = item.Comments; downloads.Add(download); } } downloads = downloads.OrderByDescending(x => x.Date).ToList(); IndexViewModel model = new IndexViewModel(); model.Downloads = downloads; return View(model); } [Authorize] public ActionResult Download(String blobName, DownloadModel.DownloadApp downloadApp) { CloudBlobContainer container = null; var manager = new BlobStorageManager(); if (downloadApp == DownloadModel.DownloadApp.MachineStudio) { container = manager.GetContainer(MachineServiceConfig.MACHINE_STUDIO_VERSIONS_CONTAINER); } else { container = manager.GetContainer(MachineServiceConfig.TANGO_VERSIONS_CONTAINER); } var blob = container.GetBlockBlobReference(blobName); var signature = blob.GenerateReadSignature(TimeSpan.FromMinutes(10)); return Redirect(signature); } } }