Ejemplo n.º 1
0
        private void DrawTrackBar(Graphics g, TrackBarGdi tb)
        {
            var p = new Pen(_bControl);
            var b = new SolidBrush(Color.Black);

            g.DrawLine(p, tb.X, tb.Y, tb.X, tb.Y + tb.H);
            g.DrawLine(p, tb.X + tb.W, tb.Y, tb.X + tb.W, tb.Y + tb.H);
            g.DrawLine(p, tb.X, tb.Y + tb.H / 2, tb.X + tb.W, tb.Y + tb.H / 2);
            int gx = 1 + Convert.ToInt32((Convert.ToDouble(tb.W - tb.Wgrab - 1) / 100d) * tb.Val);

            g.FillRectangle(b, tb.X + gx, tb.Y + 2, tb.Wgrab, tb.H - 4);
            g.DrawRectangle(p, tb.X + gx, tb.Y + 2, tb.Wgrab, tb.H - 4);
            b.Dispose();
            p.Dispose();
            tb.Grab.X = tb.X + gx + tb.Wgrab / 2;
            tb.Grab.Y = tb.Y + tb.H / 2;
        }
Ejemplo n.º 2
0
        public VideoPlayback()
        {
            SetStyle(
                ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.OptimizedDoubleBuffer |
                ControlStyles.UserPaint, true);
            Margin = new Padding(0, 0, 0, 0);
            Padding = new Padding(0, 0, 0, 0);
            BorderStyle = BorderStyle.None;

            ResizeRedraw = true;
            TmrRefresh = new Timer();
            TmrRefresh.Tick += TmrRefreshTick;
            TmrRefresh.Interval = 100;
            TmrRefresh.Start();
            Time = Duration="00:00:00";
            _tbVolume = new TrackBarGdi(80,25,0,0, 50,0);
            //_tbSpeed = new TrackBarGdi(80, 25, 0, 0, 50,10);

            _toolTip = new ToolTip { AutomaticDelay = 500, AutoPopDelay = 1500 };
        }
Ejemplo n.º 3
0
        public VideoPlayback()
        {
            SetStyle(
                ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.OptimizedDoubleBuffer |
                ControlStyles.UserPaint, true);
            Margin      = new Padding(0, 0, 0, 0);
            Padding     = new Padding(0, 0, 0, 0);
            BorderStyle = BorderStyle.None;

            ResizeRedraw        = true;
            TmrRefresh          = new Timer();
            TmrRefresh.Tick    += TmrRefreshTick;
            TmrRefresh.Interval = 100;
            TmrRefresh.Start();
            Time      = Duration = "00:00:00";
            _tbVolume = new TrackBarGdi(80, 25, 0, 0, 50, 0);
            //_tbSpeed = new TrackBarGdi(80, 25, 0, 0, 50,10);

            _toolTip = new ToolTip {
                AutomaticDelay = 500, AutoPopDelay = 1500
            };
        }
Ejemplo n.º 4
0
 private void DrawTrackBar(Graphics g, TrackBarGdi tb)
 {
     var p = new Pen(_bControl);
     var b = new SolidBrush(Color.Black);
     g.DrawLine(p, tb.X, tb.Y, tb.X, tb.Y + tb.H);
     g.DrawLine(p, tb.X + tb.W, tb.Y, tb.X + tb.W, tb.Y + tb.H);
     g.DrawLine(p, tb.X, tb.Y + tb.H / 2, tb.X + tb.W, tb.Y + tb.H / 2);
     int gx = 1 + Convert.ToInt32((Convert.ToDouble(tb.W -tb.Wgrab - 1) / 100d) * tb.Val);
     g.FillRectangle(b, tb.X + gx, tb.Y + 2, tb.Wgrab, tb.H - 4);
     g.DrawRectangle(p, tb.X + gx, tb.Y + 2, tb.Wgrab, tb.H - 4);
     b.Dispose();
     p.Dispose();
     tb.Grab.X = tb.X + gx + tb.Wgrab / 2;
     tb.Grab.Y = tb.Y + tb.H / 2;
 }