private static void MusicService_MusicWaveEventHandler(object sender, MusicWave e) { if (e == null || e.Wave == null) { return; } for (int i = 0; i < Math.Min(MaxWidth, e.Wave.Length); i++) { var w = e.Wave[i] * MaxHeight / 256; for (int j = 0; j < MaxHeight; j++) { if (j <= (MaxHeight - w)) { _topP[i, j] = false; } else { _topP[i, j] = true; } } _topPosition[i] = Math.Max(_topPosition[i] - 1, w); } //// 降落滑块 //for (int i = 0; i < MaxWidth; i++) //{ // var j = MaxHeight - _topPosition[i]; // if (j >= 0 && j < MaxHeight) // { // _topP[i, j] = true; // } //} for (int j = 0; j < MaxHeight; j++) { List <char> buffer2 = new List <char>(MaxHeight); for (int i = 0; i < MaxWidth; i++) { if (_topP[i, j] == true) { buffer2.Add('█'); } else { buffer2.Add(' '); buffer2.Add(' '); } } Console.SetCursorPosition(0, j + 5); Console.WriteLine(buffer2.ToArray(), 0, buffer2.Count); } Console.SetCursorPosition(5, 20); Console.WriteLine(getSongProcess(e.IsPlaying, e.CurrentTime, e.TotalTime)); }
private void _inputStream_MusicWaveEventHandler(object sender, MusicWave e) { if (this.MusicWaveEventHandler != null) { e.IsPlaying = IsPlaying(); MusicWaveEventHandler.Invoke(this, e); } }
public override System.Web.Mvc.ActionResult LogIn(MusicWave.Models.LogInUser model) { var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.LogIn); ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model); LogInOverride(callInfo, model); return callInfo; }
partial void LogInOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, MusicWave.Models.LogInUser model);
public override System.Web.Mvc.ActionResult Register(System.Web.HttpPostedFileBase file, MusicWave.Models.CustomUser model, bool? captchaValid, string captchaErrorMessage) { var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Register); ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "file", file); ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model); ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "captchaValid", captchaValid); ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "captchaErrorMessage", captchaErrorMessage); RegisterOverride(callInfo, file, model, captchaValid, captchaErrorMessage); return callInfo; }
partial void RegisterOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, System.Web.HttpPostedFileBase file, MusicWave.Models.CustomUser model, bool? captchaValid, string captchaErrorMessage);