Esempio n. 1
0
 private Beatmap(string setId, IBeatmapMirrorSiteClient mirrorSite)
 {
     _response       = HttpWebHelper.GetResponse(mirrorSite.UrlDownload + setId);
     _setId          = setId;
     _fileName       = mirrorSite.GetFileName(_response);
     _fileLength     = _response.ContentLength;
     _name           = GetBeatmapName(_fileName);
     _downloaded     = 0;
     _downloadStream = _response.GetResponseStream();
 }
Esempio n. 2
0
        public static Beatmap GetBeatmapByBeatmapId(string beatmapId, IBeatmapMirrorSiteClient mirrorSite)
        {
            var result = mirrorSite.SearchBeatmap(beatmapId);

            if (result == null)
            {
                return(null);
            }
            var beatmap = new Beatmap(result.First().Key, mirrorSite)
            {
                _name = result.First().Value
            };

            return(beatmap);
        }
Esempio n. 3
0
 public Main(EntryPoint entryPoint)
 {
     this._injectManager          = new InjectManager(entryPoint.ChannelName);
     this._hookManager            = new HookManager(entryPoint);
     this._mirrorSite             = new BloodCatClient();
     this._progressTimer.Elapsed += (sender, args) =>
     {
         _progressTimer.Stop();
         _canSpeak = true;
     };
     _synth = new SpeechSynthesizer()
     {
         Volume = 100
     };
     _synth.SelectVoiceByHints(VoiceGender.Male, VoiceAge.Adult, 0, new CultureInfo("en-us"));
 }