-
This commit is contained in:
@@ -1,11 +1,16 @@
|
|||||||
###
|
### 4.7
|
||||||
|
|
||||||
- left mouse double click MBTN_LEFT_DBL was not working
|
|
||||||
- remember-height was replaced with start-size, when start-size is set
|
- remember-height was replaced with start-size, when start-size is set
|
||||||
to video the main video starts directly with the native video size,
|
to video the main video starts directly with the native video size,
|
||||||
before it was starting with the autofit size first and was only
|
before it was starting with the autofit size first and was only
|
||||||
afterwards resized to the native video size
|
afterwards resized to the native video size
|
||||||
- on exit the window location can be saved with remember-position
|
- on exit the window location can be saved with remember-position
|
||||||
|
- in the learn window of the input editor underscores were stripped
|
||||||
|
because they have a special meaning in WPF labels
|
||||||
|
- keys/input not working for MBTN_LEFT_DBL, MBTN_BACK, MBTN_FORWARD
|
||||||
|
- in the learn window of the input editor support was added for
|
||||||
|
mouse left, mouse left double, mouse mid, mouse forward, mouse back
|
||||||
|
- libmpv updated to shinchiro 2019-07-07
|
||||||
|
|
||||||
### 4.6
|
### 4.6
|
||||||
|
|
||||||
|
|||||||
@@ -102,9 +102,9 @@ mpv.net is meant to be a small single person project, it's designed to be mpv co
|
|||||||
|
|
||||||
### Target Audience
|
### Target Audience
|
||||||
|
|
||||||
The target audience of mpv.net are Windows programmers and users that need something more advanced than common media players.
|
The target audience of mpv.net are programmers, nerds and software enthusiasts that need something more advanced than typical media players.
|
||||||
|
|
||||||
Furthermore mpv.net is well suited for Windows users who are interested to learn about the Linux operating system and portable apps, even though mpv.net self is not portable.
|
Furthermore mpv.net is well suited for users who are interested to learn mpv, Linux, portable apps and the command line.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("4.6.0.0")]
|
[assembly: AssemblyVersion("4.7.0.0")]
|
||||||
[assembly: AssemblyFileVersion("4.6.0.0")]
|
[assembly: AssemblyFileVersion("4.7.0.0")]
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
# mpv input keys: https://github.com/stax76/mpv.net/wiki/mpv-input-keys
|
# mpv input keys: https://github.com/stax76/mpv.net/wiki/mpv-input-keys
|
||||||
|
|
||||||
|
# run mpv.net in input test mode with: mpvnet --input-test
|
||||||
|
|
||||||
o script-message mpv.net open-files #menu: Open > Open Files...
|
o script-message mpv.net open-files #menu: Open > Open Files...
|
||||||
u script-message mpv.net open-url #menu: Open > Open URL or file path from clipboard
|
u script-message mpv.net open-url #menu: Open > Open URL or file path from clipboard
|
||||||
_ ignore #menu: Open > -
|
_ ignore #menu: Open > -
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Learn Input" Height="200" Width="400" WindowStartupLocation="CenterOwner"
|
Title="Learn Input" Height="200" Width="400" WindowStartupLocation="CenterOwner"
|
||||||
ResizeMode="NoResize" Loaded="Window_Loaded" Background="Black" MouseWheel="Window_MouseWheel">
|
ResizeMode="NoResize" Loaded="Window_Loaded" Background="Black" MouseWheel="Window_MouseWheel" MouseUp="Window_MouseUp" MouseDoubleClick="Window_MouseDoubleClick">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label x:Name="MenuLabel" Grid.ColumnSpan="2" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16"></Label>
|
<TextBlock x:Name="MenuTextBlock" Grid.ColumnSpan="2" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16"></TextBlock>
|
||||||
<Label x:Name="KeyLabel" Grid.Row="1" Grid.ColumnSpan="2" Foreground="White" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="16"></Label>
|
<TextBlock x:Name="KeyTextBlock" Grid.Row="1" Grid.ColumnSpan="2" Foreground="White" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="16"></TextBlock>
|
||||||
<Button x:Name="ConfirmButton" Grid.Row="2" Click="ConfirmButton_Click">Confirm</Button>
|
<Button x:Name="ConfirmButton" Grid.Row="2" Click="ConfirmButton_Click">Confirm</Button>
|
||||||
<Button x:Name="ClearButton" Grid.Row="2" Click="ClearButton_Click" Grid.Column="1">Clear</Button>
|
<Button x:Name="ClearButton" Grid.Row="2" Click="ClearButton_Click" Grid.Column="1">Clear</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
@@ -12,10 +13,7 @@ namespace mpvnet
|
|||||||
public CommandItem InputItem { get; set; }
|
public CommandItem InputItem { get; set; }
|
||||||
public string NewKey { get; set; } = "";
|
public string NewKey { get; set; } = "";
|
||||||
|
|
||||||
public LearnWindow()
|
public LearnWindow() => InitializeComponent();
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
|
private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
|
||||||
{
|
{
|
||||||
@@ -43,8 +41,7 @@ namespace mpvnet
|
|||||||
else
|
else
|
||||||
try {
|
try {
|
||||||
text = Convert.ToChar(charValue).ToString().ToLower().Trim();
|
text = Convert.ToChar(charValue).ToString().ToLower().Trim();
|
||||||
}
|
} catch {}
|
||||||
catch {}
|
|
||||||
|
|
||||||
for (int i = 0; i < 13; i++)
|
for (int i = 0; i < 13; i++)
|
||||||
if ("D" + i.ToString() == text)
|
if ("D" + i.ToString() == text)
|
||||||
@@ -144,8 +141,8 @@ namespace mpvnet
|
|||||||
void SetKey(string key)
|
void SetKey(string key)
|
||||||
{
|
{
|
||||||
NewKey = key;
|
NewKey = key;
|
||||||
MenuLabel.Content = InputItem.Path;
|
MenuTextBlock.Text = InputItem.Path;
|
||||||
KeyLabel.Content = key;
|
KeyTextBlock.Text = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("user32.dll")]
|
[DllImport("user32.dll")]
|
||||||
@@ -295,5 +292,38 @@ namespace mpvnet
|
|||||||
else
|
else
|
||||||
SetKey("WHEEL_DOWN");
|
SetKey("WHEEL_DOWN");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Window_MouseUp(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
switch (e.ChangedButton)
|
||||||
|
{
|
||||||
|
case MouseButton.Left:
|
||||||
|
if (BlockMBTN_LEFT)
|
||||||
|
BlockMBTN_LEFT = false;
|
||||||
|
else
|
||||||
|
SetKey("MBTN_LEFT");
|
||||||
|
break;
|
||||||
|
case MouseButton.Middle:
|
||||||
|
SetKey("MBTN_MID");
|
||||||
|
break;
|
||||||
|
case MouseButton.XButton1:
|
||||||
|
SetKey("MBTN_BACK");
|
||||||
|
break;
|
||||||
|
case MouseButton.XButton2:
|
||||||
|
SetKey("MBTN_FORWARD");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BlockMBTN_LEFT;
|
||||||
|
|
||||||
|
private void Window_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.ChangedButton == MouseButton.Left)
|
||||||
|
{
|
||||||
|
SetKey("MBTN_LEFT_DBL");
|
||||||
|
BlockMBTN_LEFT = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ namespace mpvnet
|
|||||||
int posX = RegHelp.GetInt(App.RegPath, "PosX");
|
int posX = RegHelp.GetInt(App.RegPath, "PosX");
|
||||||
int posY = RegHelp.GetInt(App.RegPath, "PosY");
|
int posY = RegHelp.GetInt(App.RegPath, "PosY");
|
||||||
|
|
||||||
if (posX != 0 && posY != 0)
|
if (posX != 0 && posY != 0 && App.RememberPosition)
|
||||||
{
|
{
|
||||||
Left = posX - Width / 2;
|
Left = posX - Width / 2;
|
||||||
Top = posY - Height / 2;
|
Top = posY - Height / 2;
|
||||||
@@ -89,11 +89,11 @@ namespace mpvnet
|
|||||||
|
|
||||||
public MenuItem FindMenuItem(string text) => FindMenuItem(text, ContextMenu.Items);
|
public MenuItem FindMenuItem(string text) => FindMenuItem(text, ContextMenu.Items);
|
||||||
|
|
||||||
void Idle() => BeginInvoke(new Action(() => { Text = "mpv.net " + Application.ProductVersion; }));
|
void Idle() => BeginInvoke(new Action(() => Text = "mpv.net " + Application.ProductVersion));
|
||||||
|
|
||||||
void CM_Popup(object sender, EventArgs e) => CursorHelp.Show();
|
void CM_Popup(object sender, EventArgs e) => CursorHelp.Show();
|
||||||
|
|
||||||
void VideoSizeChanged() => Invoke(new Action(() => SetFormPosAndSize()));
|
void VideoSizeChanged() => BeginInvoke(new Action(() => SetFormPosAndSize()));
|
||||||
|
|
||||||
void Shutdown() => BeginInvoke(new Action(() => Close()));
|
void Shutdown() => BeginInvoke(new Action(() => Close()));
|
||||||
|
|
||||||
@@ -358,13 +358,15 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
case 0x0201: // WM_LBUTTONDOWN
|
case 0x0201: // WM_LBUTTONDOWN
|
||||||
case 0x0202: // WM_LBUTTONUP
|
case 0x0202: // WM_LBUTTONUP
|
||||||
|
case 0x0207: // WM_MBUTTONDOWN
|
||||||
|
case 0x0208: // WM_MBUTTONUP
|
||||||
|
case 0x020A: // WM_MOUSEWHEEL
|
||||||
|
case 0x020C: // WM_XBUTTONUP
|
||||||
|
case 0x020B: // WM_XBUTTONDOWN
|
||||||
case 0x0100: // WM_KEYDOWN
|
case 0x0100: // WM_KEYDOWN
|
||||||
case 0x0101: // WM_KEYUP
|
case 0x0101: // WM_KEYUP
|
||||||
case 0x0104: // WM_SYSKEYDOWN
|
case 0x0104: // WM_SYSKEYDOWN
|
||||||
case 0x0105: // WM_SYSKEYUP
|
case 0x0105: // WM_SYSKEYUP
|
||||||
case 0x0207: // WM_MBUTTONDOWN
|
|
||||||
case 0x0208: // WM_MBUTTONUP
|
|
||||||
case 0x020A: // WM_MOUSEWHEEL
|
|
||||||
if (mp.WindowHandle != IntPtr.Zero)
|
if (mp.WindowHandle != IntPtr.Zero)
|
||||||
Native.SendMessage(mp.WindowHandle, m.Msg, m.WParam, m.LParam);
|
Native.SendMessage(mp.WindowHandle, m.Msg, m.WParam, m.LParam);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -314,10 +314,11 @@ namespace mpvnet
|
|||||||
if (VideoSize != vidSize && vidSize != Size.Empty)
|
if (VideoSize != vidSize && vidSize != Size.Empty)
|
||||||
{
|
{
|
||||||
VideoSize = vidSize;
|
VideoSize = vidSize;
|
||||||
VideoSizeAutoResetEvent.Set();
|
|
||||||
VideoSizeChanged?.Invoke();
|
VideoSizeChanged?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VideoSizeAutoResetEvent.Set();
|
||||||
|
|
||||||
Task.Run(new Action(() => ReadMetaData()));
|
Task.Run(new Action(() => ReadMetaData()));
|
||||||
break;
|
break;
|
||||||
case mpv_event_id.MPV_EVENT_CHAPTER_CHANGE:
|
case mpv_event_id.MPV_EVENT_CHAPTER_CHANGE:
|
||||||
@@ -515,6 +516,8 @@ namespace mpvnet
|
|||||||
|
|
||||||
Load(files.ToArray(), App.ProcessInstance != "queue", Control.ModifierKeys.HasFlag(Keys.Control));
|
Load(files.ToArray(), App.ProcessInstance != "queue", Control.ModifierKeys.HasFlag(Keys.Control));
|
||||||
|
|
||||||
|
if (files.Count == 0) VideoSizeAutoResetEvent.Set();
|
||||||
|
|
||||||
foreach (string i in args)
|
foreach (string i in args)
|
||||||
{
|
{
|
||||||
if (i.StartsWith("--"))
|
if (i.StartsWith("--"))
|
||||||
@@ -538,7 +541,7 @@ namespace mpvnet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static DateTime LastLoad;
|
public static DateTime LastLoad;
|
||||||
|
|
||||||
public static void Load(string[] files, bool loadFolder, bool append)
|
public static void Load(string[] files, bool loadFolder, bool append)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user