Ejemplo n.º 1
0
Archivo: Job.cs Proyecto: xantari/agent
 /// <summary>
 /// Constructor called when creating a new job through the application for
 /// downloading a file not part of a release but related to a release,
 /// like playfield image or backglass.
 /// </summary>
 /// <param name="release">Release to be downloaded</param>
 /// <param name="file">File to be downloaded</param>
 /// <param name="filetype">Where does this end up?</param>
 /// <param name="platform">Platform the file belongs to</param>
 public Job(VpdbRelease release, VpdbFile file, FileType filetype, VpdbTableFile.VpdbPlatform platform) : this(release, file)
 {
     FileType = filetype;
     Platform = platform;
     Thumb    = release.Thumb?.Image;
     _logger.Info("Creating new download job for {0} {1}.", filetype, File.Uri.AbsoluteUri);
 }
Ejemplo n.º 2
0
Archivo: Job.cs Proyecto: xantari/agent
 /// <summary>
 /// Constructor called when creating a new job through the application for
 /// downloading a table file.
 /// </summary>
 /// <param name="release">Release to be downloaded</param>
 /// <param name="tableFile">File of the release to be downloaded</param>
 /// <param name="filetype">Where does this end up?</param>
 /// <param name="platform">Platform the file belongs to</param>
 public Job(VpdbRelease release, VpdbTableFile tableFile, FileType filetype, VpdbTableFile.VpdbPlatform platform) : this(release, tableFile.Reference)
 {
     FileType = filetype;
     Thumb    = tableFile.Thumb;
     Platform = platform;
     _logger.Info("Creating new release download job for {0} {1}.", filetype, File.Uri.AbsoluteUri);
 }
Ejemplo n.º 3
0
        public PinballXSystem FindSystem(VpdbTableFile.VpdbPlatform platform)
        {
            string platformName;

            switch (platform)
            {
            case VpdbTableFile.VpdbPlatform.VP:
                platformName = "Visual Pinball";
                break;

            case VpdbTableFile.VpdbPlatform.FP:
                platformName = "Future Pinball";
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
            return(Systems.FirstOrDefault(p => platformName.Equals(p.Name)));
        }