mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-08-01 22:59:02 +02:00
Make video player progress bar seek on mouse down instead of up
This commit is contained in:
parent
19c294c53e
commit
92f1e9f7ec
video/TweetDuck.Video
2
video/TweetDuck.Video/FormPlayer.Designer.cs
generated
2
video/TweetDuck.Video/FormPlayer.Designer.cs
generated
@ -88,7 +88,7 @@ private void InitializeComponent() {
|
||||
this.progressSeek.Size = new System.Drawing.Size(62, 13);
|
||||
this.progressSeek.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
|
||||
this.progressSeek.TabIndex = 0;
|
||||
this.progressSeek.Click += new System.EventHandler(this.progressSeek_Click);
|
||||
this.progressSeek.MouseDown += new System.Windows.Forms.MouseEventHandler(this.progressSeek_MouseDown);
|
||||
//
|
||||
// labelTime
|
||||
//
|
||||
|
@ -104,8 +104,10 @@ private void timerData_Tick(object sender, EventArgs e){
|
||||
NativeMethods.PostMessage(NativeMethods.HWND_BROADCAST, Program.VideoPlayerMessage, new UIntPtr((uint)trackBarVolume.Value), ownerHandle);
|
||||
}
|
||||
|
||||
private void progressSeek_Click(object sender, EventArgs e){
|
||||
Player.controls.currentPosition = Player.currentMedia.duration*progressSeek.PointToClient(Cursor.Position).X/progressSeek.Width;
|
||||
private void progressSeek_MouseDown(object sender, MouseEventArgs e){
|
||||
if (e.Button == MouseButtons.Left){
|
||||
Player.controls.currentPosition = Player.currentMedia.duration*progressSeek.PointToClient(Cursor.Position).X/progressSeek.Width;
|
||||
}
|
||||
}
|
||||
|
||||
private void trackBarVolume_ValueChanged(object sender, EventArgs e){
|
||||
|
Loading…
Reference in New Issue
Block a user