Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b75bae3c38 | ||
|
|
2e435dcdc0 | ||
|
|
fec33056cb |
@@ -70,6 +70,13 @@ https://github.com/stax76/mpv.net/wiki/Scripting-(CSharp,-Python,-JavaScript,-Lu
|
|||||||
|
|
||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
|
### 2.6 (2019-04-09)
|
||||||
|
|
||||||
|
- on Win 7 controls in the conf editor were using a difficult too read too light color
|
||||||
|
- context menu renderer changed to look like Win 10 design, except colors are still system theme colors
|
||||||
|
|
||||||
|
[go to download page](https://github.com/stax76/mpv.net/releases)
|
||||||
|
|
||||||
### 2.5 (2019-04-08)
|
### 2.5 (2019-04-08)
|
||||||
|
|
||||||
- in case the input conf don't contain a menu definition mpv.net creates the default menu instead no menu like before
|
- in case the input conf don't contain a menu definition mpv.net creates the default menu instead no menu like before
|
||||||
@@ -98,5 +105,3 @@ https://github.com/stax76/mpv.net/wiki/Scripting-(CSharp,-Python,-JavaScript,-Lu
|
|||||||
'--autofit=50%' on the command line, WxH isn't implemented and only percent values are accepted.
|
'--autofit=50%' on the command line, WxH isn't implemented and only percent values are accepted.
|
||||||
There is a new wiki page explaining the mpv.net limitations compared to the original mpv:
|
There is a new wiki page explaining the mpv.net limitations compared to the original mpv:
|
||||||
[Limitations](https://github.com/stax76/mpv.net/wiki/Limitations)
|
[Limitations](https://github.com/stax76/mpv.net/wiki/Limitations)
|
||||||
|
|
||||||
[go to download page](https://github.com/stax76/mpv.net/releases)
|
|
||||||
@@ -19,7 +19,8 @@
|
|||||||
<DefineDebug>true</DefineDebug>
|
<DefineDebug>true</DefineDebug>
|
||||||
<DefineTrace>true</DefineTrace>
|
<DefineTrace>true</DefineTrace>
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
<DocumentationFile>VBNET.xml</DocumentationFile>
|
<DocumentationFile>
|
||||||
|
</DocumentationFile>
|
||||||
<NoWarn>42353,42354,42355</NoWarn>
|
<NoWarn>42353,42354,42355</NoWarn>
|
||||||
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
|
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -29,7 +30,8 @@
|
|||||||
<DefineTrace>true</DefineTrace>
|
<DefineTrace>true</DefineTrace>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DocumentationFile>VBNET.xml</DocumentationFile>
|
<DocumentationFile>
|
||||||
|
</DocumentationFile>
|
||||||
<NoWarn>42353,42354,42355</NoWarn>
|
<NoWarn>42353,42354,42355</NoWarn>
|
||||||
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
|
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -244,7 +244,6 @@ public class ToolStripRendererEx : ToolStripSystemRenderer
|
|||||||
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e)
|
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e)
|
||||||
{
|
{
|
||||||
e.Item.ForeColor = Color.Black;
|
e.Item.ForeColor = Color.Black;
|
||||||
|
|
||||||
var r = new Rectangle(Point.Empty, e.Item.Size);
|
var r = new Rectangle(Point.Empty, e.Item.Size);
|
||||||
var g = e.Graphics;
|
var g = e.Graphics;
|
||||||
|
|
||||||
@@ -258,20 +257,10 @@ public class ToolStripRendererEx : ToolStripSystemRenderer
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
g.SmoothingMode = SmoothingMode.AntiAlias;
|
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||||
|
|
||||||
var r2 = new Rectangle(r.X + 2, r.Y, r.Width - 4, r.Height - 1);
|
var r2 = new Rectangle(r.X + 2, r.Y, r.Width - 4, r.Height - 1);
|
||||||
|
|
||||||
using (Pen pen = new Pen(ColorBorder))
|
|
||||||
{
|
|
||||||
g.DrawRectangle(pen, r2);
|
|
||||||
}
|
|
||||||
|
|
||||||
r2.Inflate(-1, -1);
|
r2.Inflate(-1, -1);
|
||||||
|
using (SolidBrush b = new SolidBrush(ColorChecked))
|
||||||
using (SolidBrush b = new SolidBrush(ColorBottom))
|
|
||||||
{
|
|
||||||
g.FillRectangle(b, r2);
|
g.FillRectangle(b, r2);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -311,13 +300,20 @@ public class ToolStripRendererEx : ToolStripSystemRenderer
|
|||||||
|
|
||||||
protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
|
protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
|
||||||
{
|
{
|
||||||
var value = e.Direction == ArrowDirection.Down ? 0x36 : 0x34;
|
if (e.Direction == ArrowDirection.Down) throw new NotImplementedException();
|
||||||
var s = Convert.ToChar(value).ToString();
|
float x1 = e.Item.Width - e.Item.Height * 0.6f;
|
||||||
var font = new Font("Marlett", e.Item.Font.Size - 2);
|
float y1 = e.Item.Height * 0.25f;
|
||||||
var size = e.Graphics.MeasureString(s, font);
|
float x2 = x1 + e.Item.Height * 0.25f;
|
||||||
var x = Convert.ToInt32(e.Item.Width - size.Width);
|
float y2 = e.Item.Height / 2f;
|
||||||
var y = Convert.ToInt32((e.Item.Height - size.Height) / 2.0) + 1;
|
float x3 = x1;
|
||||||
e.Graphics.DrawString(s, font, Brushes.Black, x, y);
|
float y3 = e.Item.Height * 0.75f;
|
||||||
|
e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
|
||||||
|
|
||||||
|
using (Pen p = new Pen(Brushes.Black, Control.DefaultFont.Height / 20f))
|
||||||
|
{
|
||||||
|
e.Graphics.DrawLine(p, x1, y1, x2, y2);
|
||||||
|
e.Graphics.DrawLine(p, x2, y2, x3, y3);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e)
|
protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e)
|
||||||
|
|||||||
@@ -28,16 +28,6 @@ namespace mpvnet
|
|||||||
int IComparer<string>.Compare(string x, string y) => IComparerOfString_Compare(x, y);
|
int IComparer<string>.Compare(string x, string y) => IComparerOfString_Compare(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class OSVersion
|
|
||||||
{
|
|
||||||
public static float Windows7 { get; } = 6.1f;
|
|
||||||
public static float Windows8 { get; } = 6.2f;
|
|
||||||
public static float Windows81 { get; } = 6.3f;
|
|
||||||
public static float Windows10 { get; } = 10f;
|
|
||||||
|
|
||||||
public static float Current => Environment.OSVersion.Version.Major + Environment.OSVersion.Version.Minor / 10f;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class FileAssociation
|
public class FileAssociation
|
||||||
{
|
{
|
||||||
static string ExePath = Application.ExecutablePath;
|
static string ExePath = Application.ExecutablePath;
|
||||||
|
|||||||
@@ -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("2.5.0.0")]
|
[assembly: AssemblyVersion("2.6.0.0")]
|
||||||
[assembly: AssemblyFileVersion("2.5.0.0")]
|
[assembly: AssemblyFileVersion("2.6.0.0")]
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
Space cycle pause #menu: Play/Pause
|
Space cycle pause #menu: Play/Pause
|
||||||
s stop #menu: Stop
|
s stop #menu: Stop
|
||||||
_ ignore #menu: -
|
_ ignore #menu: -
|
||||||
f cycle fullscreen #menu: Toggle Fullscreen
|
Enter cycle fullscreen #menu: Toggle Fullscreen
|
||||||
|
|
||||||
F11 playlist-prev #menu: Navigate > Previous
|
F11 playlist-prev #menu: Navigate > Previous
|
||||||
F12 playlist-next #menu: Navigate > Next
|
F12 playlist-next #menu: Navigate > Next
|
||||||
@@ -152,7 +152,6 @@
|
|||||||
Q quit-watch-later #menu: Exit Watch Later
|
Q quit-watch-later #menu: Exit Watch Later
|
||||||
> playlist-next
|
> playlist-next
|
||||||
< playlist-prev
|
< playlist-prev
|
||||||
Enter cycle pause
|
|
||||||
Power quit
|
Power quit
|
||||||
Play cycle pause
|
Play cycle pause
|
||||||
Pause cycle pause
|
Pause cycle pause
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Application x:Class="DynamicGUI.App"
|
<Application x:Class="mpvConfEdit.App"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:DynamicGUI"
|
xmlns:Controls="clr-namespace:Controls"
|
||||||
StartupUri="MainWindow.xaml">
|
StartupUri="MainWindow.xaml">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<Style TargetType="TextBox">
|
<Style TargetType="TextBox">
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
<Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsFocused" Value="true">
|
<Trigger Property="IsFocused" Value="true">
|
||||||
<Setter Property="BorderBrush" TargetName="border" Value="{x:Static SystemParameters.WindowGlassBrush}"/>
|
<Setter Property="BorderBrush" TargetName="border" Value="{x:Static Controls:Controls.ThemeBrush}"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
namespace DynamicGUI
|
namespace mpvConfEdit
|
||||||
{
|
{
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
|
|||||||
18
mpvConfEdit/Controls.cs
Normal file
18
mpvConfEdit/Controls.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
namespace Controls
|
||||||
|
{
|
||||||
|
class Controls
|
||||||
|
{
|
||||||
|
public static Brush ThemeBrush {
|
||||||
|
get {
|
||||||
|
if (Environment.OSVersion.Version.Major < 10)
|
||||||
|
return new SolidColorBrush(Colors.DarkSlateGray);
|
||||||
|
else
|
||||||
|
return SystemParameters.WindowGlassBrush;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid Margin="20,0">
|
<Grid Margin="20,0">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBox x:Name="TitleTextBox" FontSize="24" Margin="0,10" BorderThickness="0" IsReadOnly="True" Foreground="{x:Static SystemParameters.WindowGlassBrush}"></TextBox>
|
<TextBox x:Name="TitleTextBox" FontSize="24" Margin="0,10" BorderThickness="0" IsReadOnly="True"></TextBox>
|
||||||
<ItemsControl x:Name="ItemsControl">
|
<ItemsControl x:Name="ItemsControl">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ namespace DynamicGUI
|
|||||||
HelpTextBox.Text = optionSetting.Help;
|
HelpTextBox.Text = optionSetting.Help;
|
||||||
ItemsControl.ItemsSource = optionSetting.Options;
|
ItemsControl.ItemsSource = optionSetting.Options;
|
||||||
Link.SetURL(optionSetting.HelpURL);
|
Link.SetURL(optionSetting.HelpURL);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(optionSetting.HelpURL))
|
if (string.IsNullOrEmpty(optionSetting.HelpURL))
|
||||||
LinkTextBlock.Visibility = Visibility.Collapsed;
|
LinkTextBlock.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
d:DesignWidth="800" >
|
d:DesignWidth="800" >
|
||||||
<Grid Margin="20,0">
|
<Grid Margin="20,0">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBox x:Name="TitleTextBox" FontSize="24" Margin="0,10" BorderThickness="0" IsReadOnly="True" Foreground="{x:Static SystemParameters.WindowGlassBrush}"></TextBox>
|
<TextBox x:Name="TitleTextBox" FontSize="24" Margin="0,10" BorderThickness="0" IsReadOnly="True"></TextBox>
|
||||||
<Grid Margin="0,0,0,10">
|
<Grid Margin="0,0,0,10">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ namespace DynamicGUI
|
|||||||
if (!StringSetting.IsFolder)
|
if (!StringSetting.IsFolder)
|
||||||
Button.Visibility = Visibility.Hidden;
|
Button.Visibility = Visibility.Hidden;
|
||||||
Link.SetURL(StringSetting.HelpURL);
|
Link.SetURL(StringSetting.HelpURL);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(stringSetting.HelpURL))
|
if (string.IsNullOrEmpty(stringSetting.HelpURL))
|
||||||
LinkTextBlock.Visibility = Visibility.Collapsed;
|
LinkTextBlock.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<StackPanel x:Name="MainStackPanel"></StackPanel>
|
<StackPanel x:Name="MainStackPanel"></StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
<StackPanel Margin="20,0,0,0" Grid.Row="1">
|
<StackPanel Margin="20,0,0,0" Grid.Row="1">
|
||||||
<ListBox x:Name="FilterListBox" ItemsSource="{Binding FilterStrings}" BorderThickness="0" SelectionChanged="ListBox_SelectionChanged" Foreground="{x:Static SystemParameters.WindowGlassBrush}">
|
<ListBox x:Name="FilterListBox" ItemsSource="{Binding FilterStrings}" BorderThickness="0" SelectionChanged="ListBox_SelectionChanged" Foreground="{x:Static Controls:Controls.ThemeBrush}">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
@@ -28,10 +28,10 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
<TextBlock x:Name="OpenSettingsTextBlock" Margin="0,30,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static SystemParameters.WindowGlassBrush}" MouseUp="OpenSettingsTextBlock_MouseUp">Open settings folder</TextBlock>
|
<TextBlock x:Name="OpenSettingsTextBlock" Margin="0,30,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static Controls:Controls.ThemeBrush}" MouseUp="OpenSettingsTextBlock_MouseUp">Open config folder</TextBlock>
|
||||||
<TextBlock x:Name="ShowManualTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static SystemParameters.WindowGlassBrush}" MouseUp="ShowManualTextBlock_MouseUp">Show mpv manual</TextBlock>
|
<TextBlock x:Name="ShowManualTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static Controls:Controls.ThemeBrush}" MouseUp="ShowManualTextBlock_MouseUp">Show mpv manual</TextBlock>
|
||||||
<TextBlock x:Name="SupportTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static SystemParameters.WindowGlassBrush}" MouseUp="SupportTextBlock_MouseUp">Show support forum</TextBlock>
|
<TextBlock x:Name="SupportTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static Controls:Controls.ThemeBrush}" MouseUp="SupportTextBlock_MouseUp">Show support forum</TextBlock>
|
||||||
<TextBlock x:Name="ApplyTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static SystemParameters.WindowGlassBrush}" MouseUp="ApplyTextBlock_MouseUp">Write config to mpv.conf</TextBlock>
|
<TextBlock x:Name="ApplyTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static Controls:Controls.ThemeBrush}" MouseUp="ApplyTextBlock_MouseUp">Write config to mpv.conf</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
@@ -8,7 +8,6 @@ using System.Reflection;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
using DynamicGUI;
|
using DynamicGUI;
|
||||||
|
|
||||||
namespace mpvConfEdit
|
namespace mpvConfEdit
|
||||||
@@ -45,10 +44,14 @@ namespace mpvConfEdit
|
|||||||
switch (setting)
|
switch (setting)
|
||||||
{
|
{
|
||||||
case StringSetting s:
|
case StringSetting s:
|
||||||
MainStackPanel.Children.Add(new StringSettingControl(s));
|
var sc = new StringSettingControl(s);
|
||||||
|
sc.TitleTextBox.Foreground = Controls.Controls.ThemeBrush;
|
||||||
|
MainStackPanel.Children.Add(sc);
|
||||||
break;
|
break;
|
||||||
case OptionSetting s:
|
case OptionSetting s:
|
||||||
MainStackPanel.Children.Add(new OptionSettingControl(s));
|
var oc = new OptionSettingControl(s);
|
||||||
|
oc.TitleTextBox.Foreground = Controls.Controls.ThemeBrush;
|
||||||
|
MainStackPanel.Children.Add(oc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,5 +51,5 @@ using System.Windows;
|
|||||||
// 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("1.3.0.0")]
|
[assembly: AssemblyVersion("1.4.0.0")]
|
||||||
[assembly: AssemblyFileVersion("1.3.0.0")]
|
[assembly: AssemblyFileVersion("1.4.0.0")]
|
||||||
|
|||||||
38
mpvConfEdit/app.manifest
Normal file
38
mpvConfEdit/app.manifest
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<!--
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||||
|
-->
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
</requestedPrivileges>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- Windows 7 -->
|
||||||
|
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
|
||||||
|
|
||||||
|
<!-- Windows 8 -->
|
||||||
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
|
||||||
|
|
||||||
|
<!-- Windows 8.1 -->
|
||||||
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
|
||||||
|
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
|
||||||
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<windowsSettings>
|
||||||
|
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
</assembly>
|
||||||
@@ -44,6 +44,9 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationIcon>mpv.ico</ApplicationIcon>
|
<ApplicationIcon>mpv.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
@@ -66,6 +69,7 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
|
<Compile Include="Controls.cs" />
|
||||||
<Compile Include="DynamicGUI\DynamicGUI.cs" />
|
<Compile Include="DynamicGUI\DynamicGUI.cs" />
|
||||||
<Compile Include="DynamicGUI\OptionSettingControl.xaml.cs">
|
<Compile Include="DynamicGUI\OptionSettingControl.xaml.cs">
|
||||||
<DependentUpon>OptionSettingControl.xaml</DependentUpon>
|
<DependentUpon>OptionSettingControl.xaml</DependentUpon>
|
||||||
@@ -120,6 +124,7 @@
|
|||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<None Include="app.manifest" />
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Application x:Class="mpvInputEdit.App"
|
<Application x:Class="mpvInputEdit.App"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:mpvInputEdit"
|
xmlns:Controls="clr-namespace:Controls"
|
||||||
StartupUri="MainWindow.xaml">
|
StartupUri="MainWindow.xaml">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<Style TargetType="TextBox">
|
<Style TargetType="TextBox">
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
<Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsFocused" Value="true">
|
<Trigger Property="IsFocused" Value="true">
|
||||||
<Setter Property="BorderBrush" TargetName="border" Value="{x:Static SystemParameters.WindowGlassBrush}"/>
|
<Setter Property="BorderBrush" TargetName="border" Value="{x:Static Controls:Controls.ThemeBrush}"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|||||||
18
mpvInputEdit/Controls.cs
Normal file
18
mpvInputEdit/Controls.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
namespace Controls
|
||||||
|
{
|
||||||
|
class Controls
|
||||||
|
{
|
||||||
|
public static Brush ThemeBrush {
|
||||||
|
get {
|
||||||
|
if (Environment.OSVersion.Version.Major < 10)
|
||||||
|
return new SolidColorBrush(Colors.DarkSlateGray);
|
||||||
|
else
|
||||||
|
return SystemParameters.WindowGlassBrush;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -45,7 +45,8 @@ namespace mpvInputEdit
|
|||||||
return item.Input.ToLower().Replace("ctrl+", "").Replace("shift+", "").Replace("alt+", "").Contains(searchText);
|
return item.Input.ToLower().Replace("ctrl+", "").Replace("shift+", "").Replace("alt+", "").Contains(searchText);
|
||||||
else
|
else
|
||||||
return item.Input.ToLower().Contains(searchText);
|
return item.Input.ToLower().Contains(searchText);
|
||||||
} else if (searchText.StartsWith("m ") || searchText.StartsWith("m:"))
|
}
|
||||||
|
else if (searchText.StartsWith("m ") || searchText.StartsWith("m:"))
|
||||||
return item.Menu.ToLower().Contains(searchText.Substring(2).Trim());
|
return item.Menu.ToLower().Contains(searchText.Substring(2).Trim());
|
||||||
else if (searchText.StartsWith("c ") || searchText.StartsWith("c:"))
|
else if (searchText.StartsWith("c ") || searchText.StartsWith("c:"))
|
||||||
return item.Command.ToLower().Contains(searchText.Substring(2).Trim());
|
return item.Command.ToLower().Contains(searchText.Substring(2).Trim());
|
||||||
@@ -86,7 +87,7 @@ namespace mpvInputEdit
|
|||||||
Directory.CreateDirectory(backupDir);
|
Directory.CreateDirectory(backupDir);
|
||||||
|
|
||||||
if (File.Exists(App.InputConfPath))
|
if (File.Exists(App.InputConfPath))
|
||||||
File.Copy(App.InputConfPath, backupDir + "input conf " + DateTime.Now.ToString("yyyy-MM-dd HH-mm") + ".conf");
|
File.Copy(App.InputConfPath, backupDir + "input conf " + DateTime.Now.ToString("yyyy-MM-dd HH-mm") + ".conf", true);
|
||||||
|
|
||||||
string text = "\r\n" + Properties.Settings.Default.input_conf_help + "\r\n\r\n";
|
string text = "\r\n" + Properties.Settings.Default.input_conf_help + "\r\n\r\n";
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System.Windows;
|
|||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyTitle("mpv(.net) input edit")]
|
[assembly: AssemblyTitle("mpv(.net) input edit")]
|
||||||
[assembly: AssemblyDescription("mpv(.net) key bindings editor")]
|
[assembly: AssemblyDescription("mpv(.net) key and mouse bindings editor")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("mpv(.net) input edit")]
|
[assembly: AssemblyProduct("mpv(.net) input edit")]
|
||||||
@@ -51,5 +51,5 @@ using System.Windows;
|
|||||||
// 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("1.2.0.0")]
|
[assembly: AssemblyVersion("1.3.0.0")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0.0")]
|
[assembly: AssemblyFileVersion("1.3.0.0")]
|
||||||
|
|||||||
38
mpvInputEdit/app.manifest
Normal file
38
mpvInputEdit/app.manifest
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<!--
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||||
|
-->
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
</requestedPrivileges>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- Windows 7 -->
|
||||||
|
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
|
||||||
|
|
||||||
|
<!-- Windows 8 -->
|
||||||
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
|
||||||
|
|
||||||
|
<!-- Windows 8.1 -->
|
||||||
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
|
||||||
|
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
|
||||||
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<windowsSettings>
|
||||||
|
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
</assembly>
|
||||||
@@ -38,6 +38,9 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationIcon>mpv.ico</ApplicationIcon>
|
<ApplicationIcon>mpv.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
@@ -60,6 +63,7 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
|
<Compile Include="Controls.cs" />
|
||||||
<Compile Include="SearchTextBoxUserControl.xaml.cs">
|
<Compile Include="SearchTextBoxUserControl.xaml.cs">
|
||||||
<DependentUpon>SearchTextBoxUserControl.xaml</DependentUpon>
|
<DependentUpon>SearchTextBoxUserControl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -106,6 +110,7 @@
|
|||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<None Include="app.manifest" />
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
|||||||
Reference in New Issue
Block a user