-
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
|
||||
to video the main video starts directly with the native video size,
|
||||
before it was starting with the autofit size first and was only
|
||||
afterwards resized to the native video size
|
||||
- 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
|
||||
|
||||
|
||||
@@ -102,9 +102,9 @@ mpv.net is meant to be a small single person project, it's designed to be mpv co
|
||||
|
||||
### 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
|
||||
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("4.6.0.0")]
|
||||
[assembly: AssemblyFileVersion("4.6.0.0")]
|
||||
[assembly: AssemblyVersion("4.7.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
|
||||
|
||||
# run mpv.net in input test mode with: mpvnet --input-test
|
||||
|
||||
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
|
||||
_ ignore #menu: Open > -
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
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.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
@@ -16,8 +16,8 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label x:Name="MenuLabel" Grid.ColumnSpan="2" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16"></Label>
|
||||
<Label x:Name="KeyLabel" Grid.Row="1" Grid.ColumnSpan="2" Foreground="White" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="16"></Label>
|
||||
<TextBlock x:Name="MenuTextBlock" Grid.ColumnSpan="2" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16"></TextBlock>
|
||||
<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="ClearButton" Grid.Row="2" Click="ClearButton_Click" Grid.Column="1">Clear</Button>
|
||||
</Grid>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
@@ -12,10 +13,7 @@ namespace mpvnet
|
||||
public CommandItem InputItem { get; set; }
|
||||
public string NewKey { get; set; } = "";
|
||||
|
||||
public LearnWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public LearnWindow() => InitializeComponent();
|
||||
|
||||
private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
|
||||
{
|
||||
@@ -43,8 +41,7 @@ namespace mpvnet
|
||||
else
|
||||
try {
|
||||
text = Convert.ToChar(charValue).ToString().ToLower().Trim();
|
||||
}
|
||||
catch {}
|
||||
} catch {}
|
||||
|
||||
for (int i = 0; i < 13; i++)
|
||||
if ("D" + i.ToString() == text)
|
||||
@@ -144,8 +141,8 @@ namespace mpvnet
|
||||
void SetKey(string key)
|
||||
{
|
||||
NewKey = key;
|
||||
MenuLabel.Content = InputItem.Path;
|
||||
KeyLabel.Content = key;
|
||||
MenuTextBlock.Text = InputItem.Path;
|
||||
KeyTextBlock.Text = key;
|
||||
}
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
@@ -295,5 +292,38 @@ namespace mpvnet
|
||||
else
|
||||
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 posY = RegHelp.GetInt(App.RegPath, "PosY");
|
||||
|
||||
if (posX != 0 && posY != 0)
|
||||
if (posX != 0 && posY != 0 && App.RememberPosition)
|
||||
{
|
||||
Left = posX - Width / 2;
|
||||
Top = posY - Height / 2;
|
||||
@@ -89,11 +89,11 @@ namespace mpvnet
|
||||
|
||||
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 VideoSizeChanged() => Invoke(new Action(() => SetFormPosAndSize()));
|
||||
void VideoSizeChanged() => BeginInvoke(new Action(() => SetFormPosAndSize()));
|
||||
|
||||
void Shutdown() => BeginInvoke(new Action(() => Close()));
|
||||
|
||||
@@ -358,13 +358,15 @@ namespace mpvnet
|
||||
{
|
||||
case 0x0201: // WM_LBUTTONDOWN
|
||||
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 0x0101: // WM_KEYUP
|
||||
case 0x0104: // WM_SYSKEYDOWN
|
||||
case 0x0105: // WM_SYSKEYUP
|
||||
case 0x0207: // WM_MBUTTONDOWN
|
||||
case 0x0208: // WM_MBUTTONUP
|
||||
case 0x020A: // WM_MOUSEWHEEL
|
||||
if (mp.WindowHandle != IntPtr.Zero)
|
||||
Native.SendMessage(mp.WindowHandle, m.Msg, m.WParam, m.LParam);
|
||||
break;
|
||||
|
||||
@@ -314,10 +314,11 @@ namespace mpvnet
|
||||
if (VideoSize != vidSize && vidSize != Size.Empty)
|
||||
{
|
||||
VideoSize = vidSize;
|
||||
VideoSizeAutoResetEvent.Set();
|
||||
VideoSizeChanged?.Invoke();
|
||||
}
|
||||
|
||||
VideoSizeAutoResetEvent.Set();
|
||||
|
||||
Task.Run(new Action(() => ReadMetaData()));
|
||||
break;
|
||||
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));
|
||||
|
||||
if (files.Count == 0) VideoSizeAutoResetEvent.Set();
|
||||
|
||||
foreach (string i in args)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user