private void showMaskLrcText() { Bitmap bmp = LrcController.getMaskBMP(this._lrcText); this.imgMask.Source = LrcController.getImageSource(bmp); bmp.Dispose(); }
public void Update() { this.lrcWidths = LrcController.GetWidth(this._lrcText); this.imgMask.Width = 0.0; this.showLrcText(); this.showMaskLrcText(); LrcController.lrcToolBar.Top = (base.Top - LrcController.lrcToolBar.Height) + 5.0; }
private void DrowLrcText(int index, double time) { if ((index > -1) && (index < LrcController.Lyric.LrcList.Count)) { if (this.drawIndex != index) { this.drawIndex = index; if ((this.drawIndex != 0) && (this.imgMask.Width < base.Width)) { this.imgMask.Width = base.Width; Thread.Sleep(100); } this.lrcWidths.Clear(); this._lrcText = LrcController.Lyric.LrcList[this.drawIndex].LrcText; this.lrcWidths = LrcController.GetWidth(this._lrcText); this.imgMask.Width = 0.0; this.showLrcText(); this.showMaskLrcText(); } else { string[] strArray = LrcController.Lyric.LrcList[this.drawIndex].MidTime.Split(new char[] { ',' }); int num = 0; double num2 = 0.0; num = 0; while (num < (strArray.Length - 1)) { if (num < this.lrcWidths.Count) { num2 += (double)this.lrcWidths[num]; } double num3 = Convert.ToDouble(strArray[num]); double num4 = Convert.ToDouble(strArray[num + 1]); if ((time >= num3) && (time <= num4)) { this.imgMask.Width = num2 - (((num4 - time) / (num4 - num3)) * ((double)this.lrcWidths[num])); return; } num++; } if (time >= Convert.ToDouble(strArray[num])) { if ((LrcController.Lyric.LrcList[this.drawIndex].EndTime - Convert.ToDouble(strArray[num])) > 0.0) { this.imgMask.Width = num2 + (((time - Convert.ToDouble(strArray[num])) / (LrcController.Lyric.LrcList[this.drawIndex].EndTime - Convert.ToDouble(strArray[num]))) * ((double)this.lrcWidths[num])); } else { this.imgMask.Width = num2 + ((double)this.lrcWidths[num]); } } } } }
private void btnPlay_MouseDown(object sender, MouseButtonEventArgs e) { if (btnPlay.ToolTip.ToString() != "播放") { LrcController.SetButtonChanged(sender, 2); LrcController.SetPlay(); } else { LrcController.SetButtonChanged(sender, 3); LrcController.SetPause(); } }
private void showLrcText() { Bitmap bmp = LrcController.getBGBMP(this._lrcText); base.Height = bmp.Height; base.Width = bmp.Width; base.Left = (this.w - base.Width) / 2.0; base.Top = (this.h - base.Height) - 50.0; this.imgBG.Source = LrcController.getImageSource(bmp); this.imgBG.Width = base.Width; this.imgBG.Height = base.Height; bmp.Dispose(); }
private void TextBlock_MouseDown_2(object sender, MouseButtonEventArgs e) { LrcController.lrcWindow.Hide(); LrcController.SetButtonChanged(sender, -1); base.Hide(); }
private void TextBlock_MouseDown_1(object sender, MouseButtonEventArgs e) { LrcController.UpdateSize(-4f); return; }
private void skin_SelectionChanged(object sender, SelectionChangedEventArgs e) { LrcController.SkinIndex = this.skin.SelectedIndex; LrcController.ChangeColor(this.skin.SelectedIndex); return; }
private void Image_MouseDown(object sender, MouseButtonEventArgs e) { LrcController.SetButtonChanged(sender, 0); }