private void InitializeComponent()
 {
     trackBar1     = new CustomTrackBar();
     btnPlay       = new Button();
     btnRewind     = new Button();
     chkLoop       = new CheckBox();
     lblProgress   = new Label();
     previewPanel1 = new PreviewPanel();
     ((ISupportInitialize)trackBar1).BeginInit();
     SuspendLayout();
     //
     // trackBar1
     //
     trackBar1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left
                        | AnchorStyles.Right;
     trackBar1.Location      = new System.Drawing.Point(0, 212);
     trackBar1.Name          = "trackBar1";
     trackBar1.Size          = new System.Drawing.Size(378, 45);
     trackBar1.TabIndex      = 0;
     trackBar1.TickFrequency = 2;
     trackBar1.UserSeek     += new EventHandler(trackBar1_UserSeek);
     trackBar1.ValueChanged += new EventHandler(trackBar1_ValueChanged);
     //
     // btnPlay
     //
     btnPlay.Anchor   = AnchorStyles.Bottom;
     btnPlay.Location = new System.Drawing.Point(152, 263);
     btnPlay.Name     = "btnPlay";
     btnPlay.Size     = new System.Drawing.Size(75, 20);
     btnPlay.TabIndex = 1;
     btnPlay.Text     = "Play";
     btnPlay.UseVisualStyleBackColor = true;
     btnPlay.Click += new EventHandler(btnPlay_Click);
     //
     // btnRewind
     //
     btnRewind.Anchor   = AnchorStyles.Bottom;
     btnRewind.Location = new System.Drawing.Point(122, 263);
     btnRewind.Name     = "btnRewind";
     btnRewind.Size     = new System.Drawing.Size(24, 20);
     btnRewind.TabIndex = 2;
     btnRewind.Text     = "|<";
     btnRewind.UseVisualStyleBackColor = true;
     btnRewind.Click += new EventHandler(btnRewind_Click);
     //
     // chkLoop
     //
     chkLoop.Anchor   = AnchorStyles.Bottom;
     chkLoop.Location = new System.Drawing.Point(54, 263);
     chkLoop.Name     = "chkLoop";
     chkLoop.Size     = new System.Drawing.Size(62, 20);
     chkLoop.TabIndex = 3;
     chkLoop.Text     = "Loop";
     chkLoop.UseVisualStyleBackColor = true;
     chkLoop.CheckedChanged         += new EventHandler(chkLoop_CheckedChanged);
     //
     // lblProgress
     //
     lblProgress.Anchor    = AnchorStyles.Bottom;
     lblProgress.Location  = new System.Drawing.Point(-79, 239);
     lblProgress.Name      = "lblProgress";
     lblProgress.Size      = new System.Drawing.Size(536, 23);
     lblProgress.TabIndex  = 4;
     lblProgress.Text      = "0/0";
     lblProgress.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // previewPanel1
     //
     previewPanel1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom
                            | AnchorStyles.Left
                            | AnchorStyles.Right;
     previewPanel1.CurrentIndex    = 0;
     previewPanel1.DisposeImage    = true;
     previewPanel1.Location        = new System.Drawing.Point(3, 3);
     previewPanel1.Name            = "previewPanel1";
     previewPanel1.RenderingTarget = null;
     previewPanel1.Size            = new System.Drawing.Size(372, 203);
     previewPanel1.TabIndex        = 5;
     //
     // VideoPlaybackPanel
     //
     Controls.Add(previewPanel1);
     Controls.Add(lblProgress);
     Controls.Add(chkLoop);
     Controls.Add(btnRewind);
     Controls.Add(btnPlay);
     Controls.Add(trackBar1);
     Name = "VideoPlaybackPanel";
     Size = new System.Drawing.Size(378, 289);
     ((ISupportInitialize)trackBar1).EndInit();
     ResumeLayout(false);
     PerformLayout();
 }
Пример #2
0
 private void InitializeComponent()
 {
     components       = new Container();
     btnPlay          = new Button();
     btnRewind        = new Button();
     chkLoop          = new CheckBox();
     lblProgress      = new Label();
     tmrUpdate        = new Timer(components);
     lstStreams       = new ComboBox();
     panel2           = new Panel();
     trackBarVolume   = new CustomTrackBar();
     trackBarPosition = new CustomTrackBar();
     panel2.SuspendLayout();
     ((ISupportInitialize)trackBarVolume).BeginInit();
     ((ISupportInitialize)trackBarPosition).BeginInit();
     SuspendLayout();
     //
     // btnPlay
     //
     btnPlay.Location = new System.Drawing.Point(35, 4);
     btnPlay.Name     = "btnPlay";
     btnPlay.Size     = new System.Drawing.Size(73, 20);
     btnPlay.TabIndex = 1;
     btnPlay.Text     = "Play";
     btnPlay.UseVisualStyleBackColor = true;
     btnPlay.Click += new EventHandler(btnPlay_Click);
     //
     // btnRewind
     //
     btnRewind.Location = new System.Drawing.Point(5, 4);
     btnRewind.Name     = "btnRewind";
     btnRewind.Size     = new System.Drawing.Size(24, 20);
     btnRewind.TabIndex = 2;
     btnRewind.Text     = "|<";
     btnRewind.UseVisualStyleBackColor = true;
     btnRewind.Click += new EventHandler(btnRewind_Click);
     //
     // chkLoop
     //
     chkLoop.Location = new System.Drawing.Point(114, 5);
     chkLoop.Name     = "chkLoop";
     chkLoop.Size     = new System.Drawing.Size(50, 20);
     chkLoop.TabIndex = 3;
     chkLoop.Text     = "Loop";
     chkLoop.UseVisualStyleBackColor = true;
     chkLoop.CheckedChanged         += new EventHandler(chkLoop_CheckedChanged);
     //
     // lblProgress
     //
     lblProgress.Anchor = AnchorStyles.Top | AnchorStyles.Left
                          | AnchorStyles.Right;
     lblProgress.Location  = new System.Drawing.Point(0, 31);
     lblProgress.Name      = "lblProgress";
     lblProgress.Size      = new System.Drawing.Size(377, 23);
     lblProgress.TabIndex  = 4;
     lblProgress.Text      = "0/0";
     lblProgress.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // tmrUpdate
     //
     tmrUpdate.Interval = 10;
     tmrUpdate.Tick    += new EventHandler(tmrUpdate_Tick);
     //
     // lstStreams
     //
     lstStreams.Anchor            = AnchorStyles.Top | AnchorStyles.Bottom;
     lstStreams.DropDownStyle     = ComboBoxStyle.DropDownList;
     lstStreams.FormattingEnabled = true;
     lstStreams.Location          = new System.Drawing.Point(219, 34);
     lstStreams.Name                  = "lstStreams";
     lstStreams.Size                  = new System.Drawing.Size(73, 21);
     lstStreams.TabIndex              = 5;
     lstStreams.SelectedIndexChanged += new EventHandler(lstStreams_SelectedIndexChanged);
     //
     // panel2
     //
     panel2.Anchor = AnchorStyles.Top;
     panel2.Controls.Add(btnPlay);
     panel2.Controls.Add(btnRewind);
     panel2.Controls.Add(chkLoop);
     panel2.Location = new System.Drawing.Point(116, 61);
     panel2.Name     = "panel2";
     panel2.Size     = new System.Drawing.Size(167, 30);
     panel2.TabIndex = 9;
     //
     // trackBarVolume
     //
     trackBarVolume.Anchor = AnchorStyles.Top | AnchorStyles.Bottom
                             | AnchorStyles.Right;
     trackBarVolume.Location      = new System.Drawing.Point(329, 31);
     trackBarVolume.Maximum       = 100;
     trackBarVolume.Name          = "trackBarVolume";
     trackBarVolume.Orientation   = Orientation.Vertical;
     trackBarVolume.Size          = new System.Drawing.Size(45, 89);
     trackBarVolume.TabIndex      = 6;
     trackBarVolume.TickFrequency = 25;
     trackBarVolume.Value         = 100;
     trackBarVolume.ValueChanged += new EventHandler(customTrackBar1_ValueChanged);
     //
     // trackBarPosition
     //
     trackBarPosition.Anchor = AnchorStyles.Top | AnchorStyles.Left
                               | AnchorStyles.Right;
     trackBarPosition.Location      = new System.Drawing.Point(0, 4);
     trackBarPosition.Name          = "trackBarPosition";
     trackBarPosition.Size          = new System.Drawing.Size(377, 45);
     trackBarPosition.TabIndex      = 0;
     trackBarPosition.TickFrequency = 2;
     trackBarPosition.UserSeek     += new EventHandler(trackBar1_UserSeek);
     trackBarPosition.ValueChanged += new EventHandler(trackBar1_ValueChanged);
     //
     // AudioPlaybackPanel
     //
     Controls.Add(lstStreams);
     Controls.Add(panel2);
     Controls.Add(trackBarVolume);
     Controls.Add(lblProgress);
     Controls.Add(trackBarPosition);
     Name = "AudioPlaybackPanel";
     Size = new System.Drawing.Size(377, 120);
     panel2.ResumeLayout(false);
     ((ISupportInitialize)trackBarVolume).EndInit();
     ((ISupportInitialize)trackBarPosition).EndInit();
     ResumeLayout(false);
     PerformLayout();
 }