public VideoProgressBar(VideoPlaybackGump owner)
     : base(9, 82)
 {
     this._owner    = owner;
     this._textures = new Texture[3];
     using (Bitmap source = Engine.LoadArchivedBitmap("video-progress.png"))
     {
         this._textures[0] = this.Extract(source, 0, 0, 2, source.Height);
         this._textures[1] = this.Extract(source, 2, 0, source.Width - 4, source.Height);
         this._textures[2] = this.Extract(source, source.Width - 2, 0, 2, source.Height);
     }
 }
 public VideoSpeedBar(VideoPlaybackGump owner)
     : base(343, 11, SliderOrientation.Vertical)
 {
     this.Minimum   = -5;
     this.Maximum   = 5;
     this._owner    = owner;
     this._textures = new Texture[2];
     using (Bitmap source = Engine.LoadArchivedBitmap("video-rate-slider.png"))
     {
         this._textures[0] = this.Extract(source, 0, 0, 16, 23);
         this._textures[1] = this.Extract(source, 18, 0, 16, 23);
     }
 }
            public VideoTimeLabel(VideoPlaybackGump owner)
                : base(36, 24)
            {
                this._owner    = owner;
                this._textures = Texture.FromImageSet("play/images/video-time-font.png", 13, 20, 16, 1);
                int num1   = (int)Math.Ceiling(this._owner._video.Duration.TotalSeconds);
                int length = 3;
                int num2   = num1 / 60;

                if (num2 > 9)
                {
                    ++length;
                    int num3 = num2 / 60;
                    if (num3 > 0)
                    {
                        length += (num3 + 9) / 10;
                    }
                }
                this.digits = new int[length];
            }
            public VideoPlaybackButton(VideoPlaybackGump owner, Bitmap buttonSource, Bitmap iconSource, int type)
                : base(0, 0, 0, 0, 0)
            {
                this._owner    = owner;
                this._type     = type;
                this._textures = new Texture[3];
                int x = type * 30;

                this.X = 6 + x;
                this.Y = 94;
                int[] numArray = new int[3] {
                    40, 120, 80
                };
                for (int index = 0; index < this._textures.Length; ++index)
                {
                    int y = numArray[index];
                    using (Bitmap bitmap = new Bitmap(30, 30))
                    {
                        using (Graphics graphics = Graphics.FromImage((Image)bitmap))
                        {
                            if (y != 0)
                            {
                                graphics.DrawImage((Image)buttonSource, new Rectangle(0, 0, 30, 30), new Rectangle(x, 0, 30, 30), GraphicsUnit.Pixel);
                            }
                            graphics.DrawImage((Image)buttonSource, new Rectangle(0, 0, 30, 30), new Rectangle(x, y, 30, 30), GraphicsUnit.Pixel);
                        }
                        this._textures[index] = Texture.FromBitmap(bitmap);
                    }
                }
                using (Bitmap bitmap = new Bitmap(30, 30))
                {
                    using (Graphics graphics = Graphics.FromImage((Image)bitmap))
                        graphics.DrawImage((Image)iconSource, new Rectangle(0, 0, 30, 30), new Rectangle(type * 30, (type - 1) * 40, 30, 30), GraphicsUnit.Pixel);
                    this._activeIcon = Texture.FromBitmap(bitmap);
                }
            }