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

(续及利用C#画视频录制及播放的界面(一)利用C#画视频录制及播放的界面(二)) 
前两篇介绍了大致的过程,创作出了初始版本,本篇加上了相应的公共属性,并可以随时生成皮肤效果(仍未加上萝卜鼠LOGO,萝卜鼠标准中文字和小标题)。
先看效果:

这是在WINFORM中使用以下代码即可完成的:
  private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
  {
   Graphics g = e.Graphics;
   VideoInterFace vif = new VideoInterFace();
   vif.MainColor = Color.FromArgb(255,60, 0);//这里是主显示色
   vif.LightColor = Color.White;//这里设置光亮色
   g.DrawImageUnscaled(vif.Draw(), 0, 0);
   vif.Dispose();
  }

另一种效果:

private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
  {
   Graphics g = e.Graphics;
   VideoInterFace vif = new VideoInterFace();
   vif.MainColor = Color.Brown; //改了主色
   vif.LightColor = Color.Gold; //改了另一种光亮色
   g.DrawImageUnscaled(vif.Draw(), 0, 0);
   vif.Dispose();
  }

这是主类代码:
//VideoInterface.cs
/*
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 bottomLeft_Button_BackPlay_InnerRect = 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;
   
  Color _mainColor = Color.FromArgb(52,134,205);
  public System.Drawing.Color MainColor
  {
   get { return this._mainColor; }
   set { this._mainColor = value; }
  }
 
  Color _lightColor = Color.White;
  public System.Drawing.Color LightColor
  {
   get { return this._lightColor; }
   set { this._lightColor = value; }
  }

  Color[] _centerColorArray  =  null;
  public Color[] CenterColorArray
  {
   get
   {
    if(_centerColorArray == null)
    {
     _centerColorArray = new Color[]
     {
      this.LightColor,
      //Color.FromArgb(122,184,240),
      Color.FromArgb(80, this.MainColor),
      this.LightColor
     };
    }
    return _centerColorArray;
   }
   set
   {
    _centerColorArray = value;
   }
  }

  Color[] _topBottomColorArray  =  null;
  public Color[] TopBottomColorArray
  {
   get
   {
    if(_topBottomColorArray == null)
    {
     _topBottomColorArray = new Color[]
     {
      this.LightColor,
      //Color.FromArgb(122,184,240),
      this.MainColor,
      this.LightColor
     };
    }
    return _topBottomColorArray;
   }
   set
   {
    _topBottomColorArray = value;
   }
  }

  Color[] _topBottomVerColorArray  =  null;
  public Color[] TopBottomVerColorArray
  {
   get
   {
    if(_topBottomVerColorArray == null)
    {
     _topBottomVerColorArray = new Color[]
     {
      this.LightColor,
      //Color.FromArgb(122,184,240),
      this.MainColor,
      this.LightColor
     };
    }
    return _topBottomVerColorArray;
   }
   set
   {
    _topBottomVerColorArray = value;
   }
  }

  float _colorAlternateRatio = 0.62f;
  public float ColorAlternateRatio
  {
   get { return this._colorAlternateRatio; }
   set { this._colorAlternateRatio = value; }
  }
 
  float[] _centerPositionArray  =  null;
  public float[] CenterPositionArray
  {
   get
   {
    if(_centerPositionArray == null)
    {
     _centerPositionArray = new float[]{
                0f,this.ColorAlternateRatio,1.0f
               };
    }
    return _centerPositionArray;
   }
   set
   {
    _centerPositionArray = value;
   }
  }
  

  float[] CenterVerPositionArray  =  new float[]
    {
     0f,0.38f,1.0f
    };

  float[] TopBottomPositionArray  =  new float[]
    {
     0f,0.62f,1.0f
    };

  float[] TopBottomVerPositionArray  =  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;
  StringFormat formatWordInZone  = null;
  public VideoInterFace()
  {
   this.InitializeGraphics();
  }
   
  private void InitializeGraphics()
  {
   this.stringformat1.Alignment = StringAlignment.Near;
   // Create a ColorBlend object and set its Colors and Positions properties
   this.formatWordInZone = new StringFormat();
   formatWordInZone.Alignment = StringAlignment.Center;
   formatWordInZone.LineAlignment = StringAlignment.Center;
  }

  private void PreInit()
  {
   colorBlendCenter.Colors  =  CenterColorArray;
   colorBlendCenter.Positions  =  CenterPositionArray;

   colorBlendCenterVer.Colors  =  CenterColorArray;
   colorBlendCenterVer.Positions  =  CenterVerPositionArray;

   colorBlendTopBottom.Colors  =  TopBottomColorArray;
   colorBlendTopBottom.Positions  =  TopBottomPositionArray;

   colorBlendTopBottomVer.Colors  =  TopBottomVerColorArray;
   colorBlendTopBottomVer.Positions  =  TopBottomVerPositionArray;
  }

  public Image Draw()
  {
   Image img = new Bitmap(843, 547);
   Graphics g = Graphics.FromImage(img);
   g.Clear(Color.White);
   this.RenderGraphics(g);
   g.Dispose();

   return img;
  }

  public virtual void RenderGraphics(Graphics g)
  {
   this.PreInit();
   //设置绘图质量
   g.SmoothingMode = SmoothingMode.HighQuality;
   g.InterpolationMode = InterpolationMode.HighQualityBicubic;
   g.CompositingQuality = CompositingQuality.HighQuality;
   g.TextRenderingHint = TextRenderingHint.AntiAlias;
   
   g.TranslateTransform(-4, -1);
   //整图底色绘制
   rgBrushCenter  = new LinearGradientBrush(outer_RoundRect.GetBounds(), Color.White, Color.Black, LinearGradientMode.Vertical);
   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  =  TopBottomVerColorArray;
   colorBlendTopBottomVer.Positions  =  TopBottomVerPositionArray;
   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(playButton_innerTriangle.GetBounds(), Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;
   g.FillPath(this.rgBrushTopBottomVer, this.playButton_innerTriangle);
   g.DrawPath(this.strokeEllipseButtonBorder, this.playButton_innerTriangle);

   rgBrushTopBottomVer  = new LinearGradientBrush(bottomLeft_Button_Pause_Inner1, Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;
   g.FillRectangle(this.rgBrushTopBottomVer, 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.rgBrushTopBottomVer, this.bottomLeft_Button_Pause_Inner1);
   g.DrawRectangle(this.strokeEllipseButtonBorder, this.bottomLeft_Button_Pause_Inner1);
   g.Restore(gs);

   rgBrushTopBottomVer  = new LinearGradientBrush(bottomLeft_Button_Stop_Inner, Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;
   g.FillRectangle(this.rgBrushTopBottomVer, this.bottomLeft_Button_Stop_Inner);
   g.DrawRectangle(this.strokeEllipseButtonBorder, this.bottomLeft_Button_Stop_Inner);

   rgBrushTopBottomVer  = new LinearGradientBrush(bottomLeft_Button_Next_InnerRect, Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;
   g.FillRectangle(this.rgBrushTopBottomVer, this.bottomLeft_Button_Next_InnerRect);
   g.DrawRectangle(this.strokeEllipseButtonBorder, this.bottomLeft_Button_Next_InnerRect);

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

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

   //进度条
   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);

   //下部右边按钮
   rgBrushTopBottomVer  = new LinearGradientBrush(bottomRight_Button_Outer.GetBounds(), Color.White, Color.Black, LinearGradientMode.Vertical);
   rgBrushTopBottomVer.InterpolationColors  =  colorBlendTopBottomVer;
   g.FillPath(this.rgBrushTopBottomVer, this.bottomRight_Button_Outer);
   g.DrawPath(this.strokeHor, this.bottomRight_Button_Outer);

   //视频录制回放区域
   //g.FillRectangle(this.rgBrushTopBottomVer, this.centerLeftRect_VideoZone);
   g.DrawRectangle(this.stroke1, this.centerLeftRect_VideoZone);

   //文字
   g.SmoothingMode = SmoothingMode.AntiAlias;
   g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit;
   g.InterpolationMode = InterpolationMode.HighQualityBicubic;

   g.DrawString("视频录制/回放区", new Font("宋体", 9f), new SolidBrush(Color.Black), this.centerLeftRect_VideoZone, formatWordInZone);
   g.DrawString("温馨提示区/广告区", new Font("宋体", 9f), new SolidBrush(Color.Black), this.centerRight_RoundRect_NotesZone.GetBounds(), formatWordInZone);

   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();

   rgBrushCenter.Dispose();
   rgBrushTopBottom.Dispose();
   rgBrushTopBottomVer.Dispose();
  }
   
  protected override void Dispose(bool disposing)
  {
   if (disposing)
   {
    this.DisposeGraphics();
   }
  }
 }
}

还需要完善的地方:
1、将所有按钮做成可交互的XP样式按钮,目前只是“画”了出来。
2、有待视频录制、播放、视频上传等功能的实现。

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


我的更多效果:http://www.zpxp.com(萝卜鼠在线图形图像处理)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
### 回答1: c在计算机科学领域有着多种不同含义和用途。下面是一些常见的用法: 1. C编程语言:C是一种通用的高级编程语言,由贝尔实验室的Dennis Ritchie于20世纪70年代开发。C语言被广泛用于系统软件、嵌入式系统和应用程序的开发。它具有简洁的语法和强大的表达能力,可以直接访问计算机硬件和操作系统。 2. C++编程语言:C++是在C语言基础上发展而来的一种面向对象的编程语言。它包含了C语言的所有特性,并添加了类、继承、多态等面向对象的概念和机制。C++广泛应用于软件开发、游戏开发、图形图像处理等领域。 3. C#编程语言:C#是一种由微软开发的面向对象的编程语言。它结合了C++和Java的特点,具有易学易用的特点。C#被广泛应用于Windows应用程序、Web开发、游戏开发等领域。 4. C语言规范:C语言的语法和语义由国际标准化组织(ISO)发布的《C语言规范》定义。这个规范描述了C语言的语法、语义和标准库等方面的要求,为C语言的实现提供了参考。 总之,C在计算机科学领域起到了非常重要的作用,涉及了多个编程语言和规范,为软件开发和计算机系统设计提供了基础。 ### 回答2: c是大写字母的第个字母,也是英文字母表中的一个字母。它有时被用作表示摄氏度的符号,表示温度的单位。c也可以表示一百,是罗马数字中的一个代表数。此外,c还可以表示光速,即光在真空中的传播速度,其数值约为每秒299,792,458米。光速是宇宙中最快的速度,在相对论物理学中有重要的作用。c还可以表示某个特定的常数,如普朗克常数、光速常数等。在计算机科学中,c通常表示编程语言C,它是一种广泛应用的编程语言,用于开发各种类型的软件和程序。C语言具有高效性和灵活性,是编程初学者学习的一种重要基础语言。总的来说,c在不同的领域中具有多种不同的含义和用途,它是字母表中的一个字母,代表数值、单位、常数和编程语言。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值