您的位置:首页 > 运维架构

利用C#画视频录制及播放的界面(二)

2006-12-19 16:49 417 查看
昨天花了几个小时,将框架变成了“实实在在”的东西。
先看运行后的界面:(暂时仍未加上LOGO及相关文字)



以下是相应的代码:(公共属性仍未加,因此无法更换皮肤样式哟,有时间再做出一些皮肤样式)
//VideoInterFace.cs(更新时间:2006年12月17日12:05:12)
/*声明:BrawDraw.com, ZPXP.com版权所有:a3news(AT)hotmail.com,仅供学习,参考之用,切勿用于商业用途!*/
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Drawing.Text;
namespace BrawDraw.Com.Video
{
 /// <summary>
 /// 视频录制入回放界面(VideoInterFace)
 /// </summary>
 public class VideoInterFace : System.ComponentModel.Component
 {
  private SolidBrush brush1 = new SolidBrush(Color.FromArgb(0, 0, 0, 0));
  private SolidBrush brush2 = new SolidBrush(Color.FromArgb(255, 0, 0, 0));
  private Pen stroke1 = new Pen(Color.FromArgb(255, 0, 0, 0), 1F);
  private Pen strokeHor = new Pen(Color.FromArgb(255, 0, 0, 0), 1F);
  private Pen strokeOuterBorder = new Pen(Color.FromArgb(255, 0, 0, 0), 2F);
  private Pen strokeEllipseButtonBorder = new Pen(Color.FromArgb(255, 0, 0, 0), 1F);
  private Pen strokeRectLogoWordBorder = new Pen(Color.FromArgb(255, 255, 255, 255), 3F);
  private Pen strokeRectAdBorder = new Pen(Color.FromArgb(255, 255, 255, 255), 2F);
  private Font font1 = new Font("Times New Roman", 10.5F, FontStyle.Regular, GraphicsUnit.Point, 1);
  private StringFormat stringformat1 = new StringFormat(StringFormat.GenericTypographic);   
  private RectangleF Image1Rectangle = new RectangleF(2, 573, 852, 550);       
  protected GraphicsPath outer_RoundRect = new GraphicsPath(
   new PointF[] {
        new PointF(10F, 24F),
        new PointF(10F, 13F),
        new PointF(19F, 7F),
        new PointF(26F, 7F),
        new PointF(825F, 7F),
        new PointF(834F, 7F),
        new PointF(841F, 14F),
        new PointF(841F, 23F),
        new PointF(841F, 525F),
        new PointF(841F, 535F),
        new PointF(836F, 542F),
        new PointF(824F, 542F),
        new PointF(30F, 542F),
        new PointF(16F, 542F),
        new PointF(10F, 535F),
        new PointF(10F, 524F)},
   new System.Byte[] {
          0,
          3,
          3,
          3,
          1,
          3,
          3,
          3,
          1,
          3,
          3,
          3,
          1,
          3,
          3,
          131});
   
  protected GraphicsPath top_RoundRect_Outer = new GraphicsPath(
   new PointF[] {
        new PointF(10F, 63F),
        new PointF(10F, 22F),
        new PointF(11F, 15F),
        new PointF(16F, 8F),
        new PointF(25F, 7F),
        new PointF(826F, 7F),
        new PointF(833F, 7F),
        new PointF(841F, 14F),
        new PointF(841F, 22F),
        new PointF(841F, 63F)},
   new System.Byte[] {
          0,
          1,
          3,
          3,
          3,
          1,
          3,
          3,
          3,
          129});
   
  private Pen top_RoundRect_OuterPen = new Pen(Color.FromArgb(255, 255, 25, 14), 0.1F);
   
  protected GraphicsPath topLeft_BgZone = new GraphicsPath(
   new PointF[] {
        new PointF(10F, 63F),
        new PointF(10F, 24F),
        new PointF(10F, 17F),
        new PointF(15F, 8F),
        new PointF(25F, 7F),
        new PointF(189F, 7F),
        new PointF(199F, 9F),
        new PointF(207F, 19F),
        new PointF(211F, 35F),
        new PointF(214F, 49F),
        new PointF(222F, 59F),
        new PointF(229F, 63F)},
   new System.Byte[] {
          0,
          1,
          3,
          3,
          3,
          1,
          3,
          3,
          3,
          3,
          3,
          131});
   
  protected Rectangle topRight_MinButton_Outer = new Rectangle(711, 19, 33, 33);   
  protected Rectangle topRight_MaxButton_Outer = new Rectangle(753, 19, 33, 33);   
  protected Rectangle topRight_CloseButton_Outer = new Rectangle(794, 19, 33, 33);   
  protected Rectangle topRight_MinButton_Inner = new Rectangle(717, 34, 22, 3);   
  protected Rectangle topRight_MaxButton_Inner = new Rectangle(759, 26, 20, 19);   
  protected PointF Line1PointStart = new PointF(822F, 24F);   
  protected PointF Line1PointEnd = new PointF(798F, 46F);   
  protected PointF Line2PointStart = new PointF(799F, 24F);   
  protected PointF Line2PointEnd = new PointF(823F, 46F);   
  
  protected PointF LineHor1PointStart = new PointF(10F, 63F);   
  protected PointF LineHor1PointEnd = new PointF(841F, 63F);   
  protected PointF LineHor2PointStart = new PointF(10F, 487F);   
  protected PointF LineHor2PointEnd = new PointF(841F, 487F);

  protected Rectangle rect_WordLuo_BgOuter = new Rectangle(248, 18, 38, 37);   
  protected Rectangle rect_WordBo_BgOuter = new Rectangle(290, 18, 38, 37);   
  protected Rectangle rect_WordSu_BgOuter = new Rectangle(332, 18, 38, 37);   
  protected Rectangle rect_WordSmall_BgOuter1 = new Rectangle(380, 27, 28, 28);   
  protected Rectangle Rect7 = new Rectangle(413, 27, 28, 28);   
  protected Rectangle Rect8 = new Rectangle(445, 27, 28, 28);   
  protected Rectangle Rect9 = new Rectangle(478, 27, 28, 28);   
  protected Rectangle Rect10 = new Rectangle(510, 27, 28, 28);   
  protected Rectangle Rect11 = new Rectangle(542, 27, 28, 28);   
  protected GraphicsPath centerRight_RoundRect_NotesZone = new GraphicsPath(
   new PointF[] {
        new PointF(588F, 94F),
        new PointF(588F, 88F),
        new PointF(592F, 82F),
        new PointF(599F, 82F),
        new PointF(809F, 82F),
        new PointF(816F, 82F),
        new PointF(819F, 88F),
        new PointF(819F, 95F),
        new PointF(819F, 451F),
        new PointF(819F, 462F),
        new PointF(814F, 465F),
        new PointF(807F, 465F),
        new PointF(597F, 465F),
        new PointF(593F, 465F),
        new PointF(588F, 461F),
        new PointF(588F, 454F)},
   new System.Byte[] {
          0,
          3,
          3,
          3,
          1,
          3,
          3,
          3,
          1,
          3,
          3,
          3,
          1,
          3,
          3,
          131});
   
  protected GraphicsPath bottomRight_Button_Outer = new GraphicsPath(
   new PointF[] {
                      new PointF(710F, 503F),
                      new PointF(710F, 501F),
                      new PointF(712F, 498F),
                      new PointF(715F, 498F),
                      new PointF(784F, 498F),
                      new PointF(787F, 498F),
                      new PointF(789F, 501F),
                      new PointF(789F, 504F),
                      new PointF(789F, 524F),
                      new PointF(789F, 527F),
                      new PointF(787F, 530F),
                      new PointF(782F, 530F),
                      new PointF(716F, 530F),
                      new PointF(712F, 530F),
                      new PointF(710F, 528F),
                      new PointF(710F, 526F)},
   new System.Byte[] {
          0,
          3,
          3,
          3,
          1,
          3,
          3,
          3,
          1,
          3,
          3,
          3,
          1,
          3,
          3,
          131});
   
  protected GraphicsPath bottom_RoundRect_Outer = new GraphicsPath(
   new PointF[] {
        new PointF(10F, 487F),
        new PointF(10F, 526F),
        new PointF(11F, 536F),
        new PointF(17F, 542F),
        new PointF(30F, 542F),
        new PointF(826F, 542F),
        new PointF(834F, 542F),
        new PointF(841F, 536F),
        new PointF(841F, 527F),
        new PointF(841F, 487F)},
   new System.Byte[] {
          0,
          1,
          3,
          3,
          3,
          1,
          3,
          3,
          3,
          129});
   
  protected GraphicsPath bottomLeft_Outer = new GraphicsPath(
   new PointF[] {
        new PointF(10F, 487F),
        new PointF(10F, 526F),
        new PointF(11F, 536F),
        new PointF(17F, 542F),
        new PointF(30F, 542F),
        new PointF(671F, 542F),
        new PointF(649F, 527F),
        new PointF(657F, 498F),
        new PointF(634F, 487F),
        new PointF(620F, 487F)},
   new System.Byte[] {
          0,
          1,
          3,
          3,
          3,
          1,
          3,
          3,
          3,
          129});
   
  protected Rectangle playButton_Outer = new Rectangle(34, 497, 33, 33);   
  protected Rectangle Ellipse5 = new Rectangle(74, 497, 33, 33);   
  protected Rectangle Ellipse6 = new Rectangle(113, 497, 33, 33);   
  protected Rectangle Ellipse7 = new Rectangle(152, 497, 33, 33);   
  protected Rectangle backwardPlayButton_Outer = new Rectangle(191, 497, 33, 33);   
  protected GraphicsPath progressBarOuter = new GraphicsPath(
   new PointF[] {
        new PointF(243F, 528F),
        new PointF(238F, 527F),
        new PointF(238F, 519F),
        new PointF(243F, 518F),
        new PointF(470F, 518F),
        new PointF(475F, 519F),
        new PointF(475F, 528F),
        new PointF(470F, 528F)},
   new System.Byte[] {
          0,
          3,
          3,
          3,
          1,
          3,
          3,
          131});
   
  protected Rectangle progressBarNotifier = new Rectangle(279, 517, 12, 12);
   
  protected GraphicsPath soundVolumnOuter = new GraphicsPath(
   new PointF[] {
        new PointF(494F, 527F),
        new PointF(632F, 510F),
        new PointF(625F, 527F)},
   new System.Byte[] {
          0,
          1,
          129});
   
  protected Rectangle soundVolumnNotifier = new Rectangle(499, 507, 21, 21);
   
  protected GraphicsPath playButton_innerTriangle = new GraphicsPath(
   new PointF[] {
        new PointF(47F, 520F),
        new PointF(47F, 507F),
        new PointF(58F, 514F)},
   new System.Byte[] {
          0,
          1,
          129});
   
  protected Rectangle bottomLeft_Button_Pause_Inner1 = new Rectangle(85, 507, 5, 14);   
  protected Rectangle bottomLeft_Button_Stop_Inner = new Rectangle(123, 507, 14, 14);   
  protected Rectangle bottomLeft_Button_Next_InnerRect = new Rectangle(172, 507, 2, 14);   
  protected GraphicsPath bottomLeft_Button_Next_InnerTriangle = new GraphicsPath(
   new PointF[] {
        new PointF(162F, 508F),
        new PointF(162F, 521F),
        new PointF(172F, 514F)},
   new System.Byte[] {
          0,
          1,
          129});
   
  protected GraphicsPath bottomLeft_Button_BackPlay_InnerTriangle = new GraphicsPath(
   new PointF[] {
        new PointF(206F, 520F),
        new PointF(206F, 507F),
        new PointF(216F, 514F)},
   new System.Byte[] {
          0,
          1,
          129});
   
  protected Rectangle Rect15 = new Rectangle(201, 507, 2, 14);   
  protected string Text3 = "视频回放";   
  private System.Single Text3PointX = 240;   
  private System.Single Text3PointY = 498;   
  protected string Text4 = "00:56    /   02:12";   
  private RectangleF Text4Rect = new RectangleF(367, 499, 104, 15);   
  protected Rectangle centerLeftRect_VideoZone = new Rectangle(33, 84, 534, 380);
  protected string Text1 = "视频上传";
  private System.Single Text1PointX = 719;   
  private System.Single Text1PointY = 508;
   
  float[] posArrayCenter  =  new float[]
    {
     0f,0.67f,1.0f
    };

  Color[] clrArrayCenter  =  new Color[]
    {
     Color.FromArgb(255,255,255),
     Color.FromArgb(122,184,240),
     Color.FromArgb(255,255,255)
    };
  Color[] clrArrayTopBottom  =  new Color[]
    {
     Color.FromArgb(197,233,255),
     Color.FromArgb(52,134,205),
     Color.FromArgb(255,255,255)
    };
  Color[] clrArrayTopBottomVer  =  new Color[]
    {
     Color.FromArgb(255,255,255),
     Color.FromArgb(52,133,205),
     Color.FromArgb(89,167,233)
    };
  float[] posArrayCenterVer  =  new float[]
    {
     0f,0.33f,1.0f
    };
  float[] posArrayTopBottom  =  new float[]
    {
     0f,0.62f,1.0f
    };
  float[] posArrayTopBottomVer  =  new float[]
    {
     0f,0.38f,1.0f
    };

  ColorBlend colorBlendCenter  =  new ColorBlend();
  ColorBlend colorBlendCenterVer  =  new ColorBlend();
  ColorBlend colorBlendTopBottom  =  new ColorBlend();
  ColorBlend colorBlendTopBottomVer  =  new ColorBlend();

  LinearGradientBrush rgBrushCenter;
  LinearGradientBrush rgBrushTopBottom;
  LinearGradientBrush rgBrushTopBottomVer;
  
  public VideoInterFace()
  {
   this.InitializeGraphics();
  }
   
  private void InitializeGraphics()
  {
   this.stringformat1.Alignment = StringAlignment.Near;
   // Create a ColorBlend object and set its Colors and Positions properties
   colorBlendCenter.Colors  =  clrArrayCenter;
   colorBlendCenter.Positions  =  posArrayCenter;

   colorBlendCenterVer.Colors  =  clrArrayCenter;
   colorBlendCenterVer.Positions  =  posArrayCenterVer;

   colorBlendTopBottom.Colors  =  clrArrayTopBottom;
   colorBlendTopBottom.Positions  =  posArrayTopBottom;

   colorBlendTopBottomVer.Colors  =  clrArrayTopBottomVer;
   colorBlendTopBottomVer.Positions  =  posArrayTopBottomVer;
  }
  
  public virtual void RenderGraphics(Graphics g)
  {
   g.SmoothingMode = SmoothingMode.AntiAlias;
   g.TextRenderingHint = TextRenderingHint.AntiAlias;
   // Create a path gradient brush
   rgBrushCenter  = new LinearGradientBrush(outer_RoundRect.GetBounds(), Color.White, Color.Black, LinearGradientMode.Vertical);
   // Set interpolation colors and focus scales
   rgBrushCenter.InterpolationColors  =  colorBlendCenter;

   g.FillPath(this.rgBrushCenter, this.outer_RoundRect);

   rgBrushTopBottom  = new LinearGradientBrush(top_RoundRect_Outer.GetBounds(), Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottom.InterpolationColors  =  colorBlendTopBottom;
   rgBrushTopBottomVer  = new LinearGradientBrush(top_RoundRect_Outer.GetBounds(), Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;

   g.FillPath(this.rgBrushTopBottomVer, this.top_RoundRect_Outer);
   //g.DrawPath(this.top_RoundRect_OuterPen, this.top_RoundRect_Outer);
   g.FillPath(this.rgBrushTopBottom, this.topLeft_BgZone);
   //g.DrawPath(this.stroke1, this.topLeft_BgZone);
   
   rgBrushTopBottomVer  = new LinearGradientBrush(topRight_MinButton_Outer, Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;

   g.FillEllipse(this.rgBrushTopBottomVer, this.topRight_MinButton_Outer);
   g.DrawEllipse(this.strokeEllipseButtonBorder, this.topRight_MinButton_Outer);
   g.FillEllipse(this.rgBrushTopBottomVer, this.topRight_MaxButton_Outer);
   g.DrawEllipse(this.strokeEllipseButtonBorder, this.topRight_MaxButton_Outer);
   g.FillEllipse(this.rgBrushTopBottomVer, this.topRight_CloseButton_Outer);
   g.DrawEllipse(this.strokeEllipseButtonBorder, this.topRight_CloseButton_Outer);
   g.FillRectangle(this.brush1, this.topRight_MinButton_Inner);
   g.DrawRectangle(this.strokeEllipseButtonBorder, this.topRight_MinButton_Inner);
   g.FillRectangle(this.brush1, this.topRight_MaxButton_Inner);
   g.DrawRectangle(this.strokeEllipseButtonBorder, this.topRight_MaxButton_Inner);
   
   rgBrushTopBottomVer  = new LinearGradientBrush(rect_WordLuo_BgOuter, Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;
   g.FillRectangle(this.rgBrushTopBottomVer, this.rect_WordLuo_BgOuter);
   g.DrawRectangle(this.strokeRectLogoWordBorder, this.rect_WordLuo_BgOuter);
   g.FillRectangle(this.rgBrushTopBottomVer, this.rect_WordBo_BgOuter);
   g.DrawRectangle(this.strokeRectLogoWordBorder, this.rect_WordBo_BgOuter);
   g.FillRectangle(this.rgBrushTopBottomVer, this.rect_WordSu_BgOuter);
   g.DrawRectangle(this.strokeRectLogoWordBorder, this.rect_WordSu_BgOuter);

   rgBrushTopBottom  = new LinearGradientBrush(rect_WordSmall_BgOuter1, Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottom.InterpolationColors  =  colorBlendTopBottom;
   g.FillRectangle(this.rgBrushTopBottom, this.rect_WordSmall_BgOuter1);
   g.DrawRectangle(this.strokeRectAdBorder, this.rect_WordSmall_BgOuter1);
   g.FillRectangle(this.rgBrushTopBottom, this.Rect7);
   g.DrawRectangle(this.strokeRectAdBorder, this.Rect7);
   g.FillRectangle(this.rgBrushTopBottom, this.Rect8);
   g.DrawRectangle(this.strokeRectAdBorder, this.Rect8);
   g.FillRectangle(this.rgBrushTopBottom, this.Rect9);
   g.DrawRectangle(this.strokeRectAdBorder, this.Rect9);
   g.FillRectangle(this.rgBrushTopBottom, this.Rect10);
   g.DrawRectangle(this.strokeRectAdBorder, this.Rect10);
   g.FillRectangle(this.rgBrushTopBottom, this.Rect11);
   g.DrawRectangle(this.strokeRectAdBorder, this.Rect11);

   g.FillPath(this.brush1, this.centerRight_RoundRect_NotesZone);
   g.DrawPath(this.strokeEllipseButtonBorder, this.centerRight_RoundRect_NotesZone);
   
   rgBrushTopBottom  = new LinearGradientBrush(bottom_RoundRect_Outer.GetBounds(), Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottom.InterpolationColors  =  colorBlendTopBottom;
   rgBrushTopBottomVer  = new LinearGradientBrush(bottom_RoundRect_Outer.GetBounds(), Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;

   g.FillPath(this.rgBrushTopBottom, this.bottom_RoundRect_Outer);
   //g.DrawPath(this.stroke1, this.bottom_RoundRect_Outer);
   colorBlendTopBottomVer.Colors  =  clrArrayTopBottomVer;
   colorBlendTopBottomVer.Positions  =  posArrayTopBottom;
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;
   g.FillPath(this.rgBrushTopBottomVer, this.bottomLeft_Outer);
   //g.DrawPath(this.stroke1, this.bottomLeft_Outer);

   rgBrushTopBottomVer  = new LinearGradientBrush(playButton_Outer, Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;

   g.FillEllipse(this.rgBrushTopBottomVer, this.playButton_Outer);
   g.DrawEllipse(this.strokeEllipseButtonBorder, this.playButton_Outer);
   g.FillEllipse(this.rgBrushTopBottomVer, this.Ellipse5);
   g.DrawEllipse(this.strokeEllipseButtonBorder, this.Ellipse5);
   g.FillEllipse(this.rgBrushTopBottomVer, this.Ellipse6);
   g.DrawEllipse(this.strokeEllipseButtonBorder, this.Ellipse6);
   g.FillEllipse(this.rgBrushTopBottomVer, this.Ellipse7);
   g.DrawEllipse(this.strokeEllipseButtonBorder, this.Ellipse7);
   g.FillEllipse(this.rgBrushTopBottomVer, this.backwardPlayButton_Outer);
   g.DrawEllipse(this.strokeEllipseButtonBorder, this.backwardPlayButton_Outer);

   rgBrushTopBottomVer  = new LinearGradientBrush(progressBarOuter.GetBounds(), Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;
   g.FillPath(this.rgBrushTopBottomVer, this.progressBarOuter);
   g.DrawPath(this.strokeEllipseButtonBorder, this.progressBarOuter);

   rgBrushTopBottomVer  = new LinearGradientBrush(progressBarNotifier, Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;
   g.FillEllipse(this.rgBrushTopBottomVer, this.progressBarNotifier);
   g.DrawEllipse(this.strokeEllipseButtonBorder, this.progressBarNotifier);

   rgBrushTopBottomVer  = new LinearGradientBrush(soundVolumnOuter.GetBounds(), Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;
   g.FillPath(this.rgBrushTopBottomVer, this.soundVolumnOuter);
   g.DrawPath(this.strokeEllipseButtonBorder, this.soundVolumnOuter);

   rgBrushTopBottomVer  = new LinearGradientBrush(soundVolumnNotifier, Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;
   g.FillEllipse(this.rgBrushTopBottomVer, this.soundVolumnNotifier);
   g.DrawEllipse(this.strokeEllipseButtonBorder, this.soundVolumnNotifier);

   g.FillPath(this.brush1, this.playButton_innerTriangle);
   g.DrawPath(this.strokeEllipseButtonBorder, this.playButton_innerTriangle);
   g.FillRectangle(this.brush1, this.bottomLeft_Button_Pause_Inner1);
   g.DrawRectangle(this.strokeEllipseButtonBorder, this.bottomLeft_Button_Pause_Inner1);
   
   GraphicsState gs = g.Save();
   g.TranslateTransform(8, 0);
   g.FillRectangle(this.brush1, this.bottomLeft_Button_Pause_Inner1);
   g.DrawRectangle(this.strokeEllipseButtonBorder, this.bottomLeft_Button_Pause_Inner1);
   g.Restore(gs);

   g.FillRectangle(this.brush1, this.bottomLeft_Button_Stop_Inner);
   g.DrawRectangle(this.strokeEllipseButtonBorder, this.bottomLeft_Button_Stop_Inner);
   g.FillRectangle(this.brush1, this.bottomLeft_Button_Next_InnerRect);
   g.DrawRectangle(this.strokeEllipseButtonBorder, this.bottomLeft_Button_Next_InnerRect);
   g.FillPath(this.brush1, this.bottomLeft_Button_Next_InnerTriangle);
   g.DrawPath(this.strokeEllipseButtonBorder, this.bottomLeft_Button_Next_InnerTriangle);
   g.FillPath(this.brush1, this.bottomLeft_Button_BackPlay_InnerTriangle);
   g.DrawPath(this.strokeEllipseButtonBorder, this.bottomLeft_Button_BackPlay_InnerTriangle);
   g.FillRectangle(this.brush1, this.Rect15);
   g.DrawRectangle(this.strokeEllipseButtonBorder, this.Rect15);
   g.FillRectangle(this.brush1, this.centerLeftRect_VideoZone);
   g.DrawRectangle(this.stroke1, this.centerLeftRect_VideoZone);
   
   g.FillPath(this.brush1, this.bottomRight_Button_Outer);
   g.DrawPath(this.strokeHor, this.bottomRight_Button_Outer);

   g.SmoothingMode = SmoothingMode.AntiAlias;
   g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit;
   g.InterpolationMode = InterpolationMode.HighQualityBicubic;
   g.DrawString(this.Text3, this.font1, this.brush2, this.Text3PointX, this.Text3PointY);
   g.DrawString(this.Text4, this.font1, this.brush2, this.Text4Rect, this.stringformat1);
   g.DrawString(this.Text1, this.font1, this.brush2, this.Text1PointX, this.Text1PointY);

   g.DrawLine(this.stroke1, this.Line1PointStart, this.Line1PointEnd);
   g.DrawLine(this.stroke1, this.Line2PointStart, this.Line2PointEnd);
   g.DrawLine(this.strokeHor, this.LineHor1PointStart, this.LineHor1PointEnd);
   g.DrawLine(this.strokeHor, this.LineHor2PointStart, this.LineHor2PointEnd);
   g.DrawPath(this.strokeOuterBorder, this.outer_RoundRect);
  }
   
  // Required to dispose of created resources
  private void DisposeGraphics()
  {
   this.brush1.Dispose();
   this.brush2.Dispose();
   this.stroke1.Dispose();
   this.font1.Dispose();
   this.stringformat1.Dispose();
   this.outer_RoundRect.Dispose();
   this.top_RoundRect_Outer.Dispose();
   this.top_RoundRect_OuterPen.Dispose();
   this.topLeft_BgZone.Dispose();
   this.centerRight_RoundRect_NotesZone.Dispose();
   this.bottomRight_Button_Outer.Dispose();
   this.bottom_RoundRect_Outer.Dispose();
   this.bottomLeft_Outer.Dispose();
   this.progressBarOuter.Dispose();
   this.soundVolumnOuter.Dispose();
   this.playButton_innerTriangle.Dispose();
   this.bottomLeft_Button_Next_InnerTriangle.Dispose();
   this.bottomLeft_Button_BackPlay_InnerTriangle.Dispose();
  }
   
  protected override void Dispose(bool disposing)
  {
   if (disposing)
   {
    this.DisposeGraphics();
   }
  }
 }
}
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息