Compare commits

...

3 Commits
1.8 ... 1.9

Author SHA1 Message Date
Frank Skare
f7b908a5c4 - 2019-03-27 01:57:33 +01:00
Frank Skare
1080d0afd7 - 2019-03-27 01:52:51 +01:00
Frank Skare
77ba7f105c - 2019-03-25 23:25:51 +01:00
27 changed files with 408 additions and 385 deletions

View File

@@ -23,7 +23,7 @@ Public Class CSScriptAddon
Try
CSScriptLibrary.CSScript.Evaluator.LoadCode(File.ReadAllText(i))
Catch ex As Exception
MsgError(ex.ToString)
MainForm.Instance.ShowMsgBox(ex.ToString(), MessageBoxIcon.Error)
End Try
Next
End Sub

View File

@@ -15,6 +15,7 @@ Table of contents
- [C# Scripting](#cs-scripting)
- [Python Scripting](#python-scripting)
- [PowerShell Scripting](#powershell-scripting)
- [Support](#Support)
- [Changelog](#changelog)
### Features
@@ -130,8 +131,20 @@ $position = [mp]::get_property_number("time-pos");
```
Please note that PowerShell don't allow assigning to events and mpv.net uses as workaround a matching script filename, a list of available events can be found in the mpv manual or in the file mp.cs in the mpv.net source code.
### Support
<https://forum.doom9.org/showthread.php?t=174841>
<https://forum.videohelp.com/threads/392514-mpv-net-a-extendable-media-player-for-windows>
<https://github.com/stax76/mpv.net/issues>
### Changelog
### soon
- all info and error messages are shown now on the main window thread having the main window as parent
### 1.8
- new config editor added

View File

@@ -5,8 +5,6 @@ using System.ComponentModel.Composition.Hosting;
using System.IO;
using System.Windows.Forms;
using static mpvnet.StaticUsing;
namespace mpvnet
{
public class Addon
@@ -42,7 +40,7 @@ namespace mpvnet
}
catch (Exception e)
{
MsgError(e.ToString());
MainForm.Instance.ShowMsgBox(e.ToString(), MessageBoxIcon.Error);
}
}
}

View File

@@ -5,8 +5,6 @@ using System.IO;
using System.Reflection;
using System.Windows.Forms;
using static mpvnet.StaticUsing;
namespace mpvnet
{
public class Command
@@ -72,12 +70,7 @@ namespace mpvnet
public static void show_conf_editor(string[] args)
{
using (var p = new Process())
{
p.StartInfo.FileName = Application.StartupPath + "\\mpvSettingsEditor.exe";
p.StartInfo.WorkingDirectory = Path.GetDirectoryName(Application.ExecutablePath);
p.Start();
}
Process.Start(Application.StartupPath + "\\mpvSettingsEditor.exe");
}
public static void history(string[] args)
@@ -87,7 +80,7 @@ namespace mpvnet
if (File.Exists(fp))
Process.Start(fp);
else
if (MsgQuestion("Create history.txt file in config folder?\n\nmpv.net will write the date, time and filename of opened files to it.") == DialogResult.OK)
if (MainForm.Instance.ShowMsgBox("Create history.txt file in config folder?\n\nmpv.net will write the date, time and filename of opened files to it.", MessageBoxIcon.Question) == DialogResult.OK)
File.WriteAllText(fp, "");
}

View File

@@ -5,10 +5,7 @@ using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
using System.Diagnostics;
using static mpvnet.StaticUsing;
using System.Linq;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace mpvnet
{
@@ -46,7 +43,7 @@ namespace mpvnet
}
catch (Exception e)
{
MsgError(e.ToString());
MainForm.Instance.ShowMsgBox(e.ToString(), MessageBoxIcon.Error);
}
}
@@ -139,20 +136,15 @@ namespace mpvnet
public void BuildMenu()
{
foreach (var i in File.ReadAllText(mp.InputConfPath).SplitLinesNoEmpty())
foreach (var i in File.ReadAllText(mp.InputConfPath).Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries))
{
if (!i.Contains("#menu:"))
continue;
var left = i.Left("#menu:").Trim();
if (left.StartsWith("#"))
continue;
var cmd = left.Right(" ").Trim();
var menu = i.Right("#menu:").Trim();
var key = menu.Left(";").Trim();
var path = menu.Right(";").Trim();
if (!i.Contains("#menu:")) continue;
var left = i.Substring(0, i.IndexOf("#menu:")).Trim();
if (left.StartsWith("#")) continue;
var cmd = left.Substring(left.IndexOf(" ") + 1).Trim();
var menu = i.Substring(i.IndexOf("#menu:") + "#menu:".Length).Trim();
var key = menu.Substring(0, menu.IndexOf(";")).Trim();
var path = menu.Substring(menu.IndexOf(";") + 1).Trim();
if (path == "" || cmd == "")
continue;
@@ -164,7 +156,7 @@ namespace mpvnet
}
catch (Exception e)
{
MsgError(e.ToString());
MainForm.Instance.ShowMsgBox(e.ToString(), MessageBoxIcon.Error);
}
});
@@ -206,7 +198,7 @@ namespace mpvnet
private void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
{
MsgError(e.Exception.ToString());
ShowMsgBox(e.Exception.ToString(), MessageBoxIcon.Error);
}
private void mp_VideoSizeChanged()
@@ -219,10 +211,7 @@ namespace mpvnet
BeginInvoke(new Action(() => Close()));
}
public bool IsFullscreen
{
get => WindowState == FormWindowState.Maximized;
}
public bool IsFullscreen => WindowState == FormWindowState.Maximized;
void mp_ChangeFullscreen(bool value)
{

View File

@@ -27,34 +27,13 @@ namespace mpvnet
int IComparer<string>.Compare(string x, string y) => IComparerOfString_Compare(x, y);
}
public class StaticUsing
{
public static void MsgInfo(string message)
{
MessageBox.Show(message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
public static void MsgError(string message)
{
MessageBox.Show(message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
public static DialogResult MsgQuestion(string message)
{
return MessageBox.Show(message, Application.ProductName, MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
}
}
//public class OSVersion
//{
// public static float Windows7 { get; set; } = 6.1f;
// public static float Windows8 { get; set; } = 6.2f;
// public static float Windows81 { get; set; } = 6.3f;
// public static float Windows10 { get; set; } = 10f;
// 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
// {
// get => Environment.OSVersion.Version.Major + Environment.OSVersion.Version.Minor / 10f;
// }
// public static float Current => Environment.OSVersion.Version.Major + Environment.OSVersion.Version.Minor / 10f;
//}
}

View File

@@ -59,25 +59,10 @@ namespace mpvnet
Bottom = bottom;
}
public Rectangle ToRectangle()
{
return Rectangle.FromLTRB(Left, Top, Right, Bottom);
}
public Size Size
{
get => new Size(Right - Left, Bottom - Top);
}
public int Width
{
get => Right - Left;
}
public int Height
{
get => Bottom - Top;
}
public Rectangle ToRectangle() { return Rectangle.FromLTRB(Left, Top, Right, Bottom); }
public Size Size => new Size(Right - Left, Bottom - Top);
public int Width => Right - Left;
public int Height => Bottom - Top;
}
}
}

View File

@@ -2,10 +2,9 @@
using System.IO;
using System.Threading;
using System.Management.Automation.Runspaces;
using static mpvnet.StaticUsing;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace mpvnet
{
@@ -50,10 +49,10 @@ Using namespace System;
}
catch
{
MsgError("PowerShell Setup Problem\r\n\r\nEnsure you have at least PowerShell 5.1 installed.");
MainForm.Instance.ShowMsgBox("PowerShell Setup Problem\n\nEnsure you have at least PowerShell 5.1 installed.", MessageBoxIcon.Error);
return null;
}
MsgError(ex.ToString());
MainForm.Instance.ShowMsgBox(ex.ToString(), MessageBoxIcon.Error);
}
}
}

View File

@@ -1,97 +1,98 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace mpvnet.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mpvnet.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to # mpv.net key bindings, mouse bindings and context menu configuration
///
/// o script-message mpv.net open-files #menu: O ; Open Files...
/// _ ignore #menu: _ ; -
/// Space cycle pause #menu: Space, Enter ; Play/Pause
/// Enter cycle pause
/// s stop #menu: S ; Stop
/// _ ignore #menu: _ ; -
/// f cycle fullscreen #menu: F ; Toggle Fullscreen /// [rest of string was truncated]&quot;;.
/// </summary>
internal static string input_conf {
get {
return ResourceManager.GetString("input_conf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to input-ar-delay = 500
///input-ar-rate = 20
///volume = 50
///hwdec = yes
///vo = direct3d
///keep-open = yes
///keep-open-pause = no
///osd-playing-msg = &apos;${filename}&apos;
///screenshot-directory = ~~desktop/.
/// </summary>
internal static string mpv_conf {
get {
return ResourceManager.GetString("mpv_conf", resourceCulture);
}
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace mpvnet.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mpvnet.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to # mpv.net key bindings, mouse bindings and context menu configuration
///
/// o script-message mpv.net open-files #menu: O ; Open Files...
/// _ ignore #menu: _ ; -
/// Space cycle pause #menu: Space, Enter ; Play/Pause
/// Enter cycle pause
/// s stop #menu: S ; Stop
/// _ ignore #menu: _ ; -
/// f cycle fullscreen #menu: F ; Toggle Fullscreen
/// [rest of string was truncated]&quot;;.
/// </summary>
internal static string input_conf {
get {
return ResourceManager.GetString("input_conf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to input-ar-delay = 500
///input-ar-rate = 20
///volume = 50
///hwdec = yes
///vo = direct3d
///keep-open = yes
///keep-open-pause = no
///osd-playing-msg = &apos;${filename}&apos;
///screenshot-directory = ~~desktop/.
/// </summary>
internal static string mpv_conf {
get {
return ResourceManager.GetString("mpv_conf", resourceCulture);
}
}
}
}

View File

@@ -1,9 +1,9 @@
using System;
using System.Reflection;
using System.Windows.Forms;
using IronPython.Hosting;
using Microsoft.Scripting.Hosting;
using static mpvnet.StaticUsing;
using PyRT = IronPython.Runtime;
namespace mpvnet
@@ -27,7 +27,7 @@ namespace mpvnet
}
catch (Exception ex)
{
MsgError(ex.ToString());
MainForm.Instance.ShowMsgBox(ex.ToString(), MessageBoxIcon.Error);
}
}
}

View File

@@ -1,120 +0,0 @@
using System;
using System.Linq;
using System.IO;
public static class StringExtensions
{
public static string ExtFull(this string filepath)
{
return Ext(filepath, true);
}
public static string Ext(this string filepath)
{
return Ext(filepath, false);
}
public static string Ext(this string filepath, bool dot)
{
if (string.IsNullOrEmpty(filepath))
return "";
var chars = filepath.ToCharArray();
for (var x = filepath.Length - 1; x >= 0; x += -1)
{
if (chars[x] == Path.DirectorySeparatorChar)
return "";
if (chars[x] == '.')
return filepath.Substring(x + (dot ? 0 : 1)).ToLower();
}
return "";
}
public static string Left(this string value, int index)
{
if (string.IsNullOrEmpty(value) || index < 0)
return "";
if (index > value.Length)
return value;
return value.Substring(0, index);
}
public static string Left(this string value, string start)
{
if (string.IsNullOrEmpty(value) || string.IsNullOrEmpty(start))
return "";
if (!value.Contains(start))
return "";
return value.Substring(0, value.IndexOf(start));
}
public static string LeftLast(this string value, string start)
{
if (!value.Contains(start))
return "";
return value.Substring(0, value.LastIndexOf(start));
}
public static string Right(this string value, string start)
{
if (string.IsNullOrEmpty(value) || string.IsNullOrEmpty(start))
return "";
if (!value.Contains(start))
return "";
return value.Substring(value.IndexOf(start) + start.Length);
}
public static string RightLast(this string value, string start)
{
if (string.IsNullOrEmpty(value) || string.IsNullOrEmpty(start))
return "";
if (!value.Contains(start))
return "";
return value.Substring(value.LastIndexOf(start) + start.Length);
}
public static string[] SplitNoEmpty(this string value, params string[] delimiters)
{
return value.Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
}
public static string[] SplitKeepEmpty(this string value, params string[] delimiters)
{
return value.Split(delimiters, StringSplitOptions.None);
}
public static string[] SplitNoEmptyAndWhiteSpace(this string value, params string[] delimiters)
{
if (string.IsNullOrEmpty(value))
return null;
var a = SplitNoEmpty(value, delimiters);
for (var i = 0; i <= a.Length - 1; i++)
a[i] = a[i].Trim();
var l = a.ToList();
while (l.Contains(""))
l.Remove("");
return l.ToArray();
}
public static string[] SplitLinesNoEmpty(this string value)
{
return SplitNoEmpty(value, Environment.NewLine);
}
}

View File

@@ -13,7 +13,6 @@ using System.Windows.Forms;
using static mpvnet.libmpv;
using static mpvnet.Native;
using static mpvnet.StaticUsing;
using PyRT = IronPython.Runtime;
@@ -61,7 +60,7 @@ namespace mpvnet
public static string mpvConfFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\mpv\\";
public static string InputConfPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\mpv\\input.conf";
public static string mpvConfPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\mpv\\mpv.conf";
public static List<PythonScript> PythonScripts { get; } = new List<PythonScript>();
public static List<PythonScript> PythonScripts => new List<PythonScript>();
public static AutoResetEvent AutoResetEvent = new AutoResetEvent(false);
private static Dictionary<string, string> _mpvConf;
@@ -75,7 +74,7 @@ namespace mpvnet
if (File.Exists(mpvConfPath))
foreach (var i in File.ReadAllLines(mpvConfPath))
if (i.Contains("=") && ! i.StartsWith("#"))
_mpvConf[i.Left("=").Trim()] = i.Right("=").Trim();
_mpvConf[i.Substring(0, i.IndexOf("=")).Trim()] = i.Substring(i.IndexOf("=") + 1).Trim();
}
return _mpvConf;
}
@@ -208,7 +207,7 @@ namespace mpvnet
}
catch (Exception ex)
{
MsgError(ex.GetType().Name + "\r\n\r\n" + ex.ToString());
MainForm.Instance.ShowMsgBox(ex.GetType().Name + "\n\n" + ex.ToString(), MessageBoxIcon.Error);
}
ClientMessage?.Invoke(args);
}
@@ -465,7 +464,7 @@ namespace mpvnet
string[] types = "264 265 3gp aac ac3 avc avi avs bmp divx dts dtshd dtshr dtsma eac3 evo flac flv h264 h265 hevc hvc jpg jpeg m2t m2ts m2v m4a m4v mka mkv mlp mov mp2 mp3 mp4 mpa mpeg mpg mpv mts ogg ogm opus pcm png pva raw rmvb thd thd+ac3 true-hd truehd ts vdr vob vpy w64 wav webm wmv y4m".Split(' ');
string path = get_property_string("path");
List<string> files = Directory.GetFiles(Path.GetDirectoryName(path)).ToList();
files = files.Where((file) => types.Contains(file.Ext())).ToList();
files = files.Where((file) => types.Contains(Path.GetExtension(file).TrimStart(".".ToCharArray()).ToLower())).ToList();
files.Sort(new StringLogicalComparer());
int index = files.IndexOf(path);
files.Remove(path);

View File

@@ -143,7 +143,6 @@
</Compile>
<Compile Include="PowerShellScript.cs" />
<Compile Include="PythonScript.cs" />
<Compile Include="StringExtensions.cs" />
<Compile Include="libmpv.cs" />
<Compile Include="MainForm.cs">
<SubType>Form</SubType>

View File

@@ -4,6 +4,27 @@
xmlns:local="clr-namespace:DynamicGUI"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style TargetType="TextBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Opacity" TargetName="border" Value="0.56"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
</Trigger>
<Trigger Property="IsFocused" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{x:Static SystemParameters.WindowGlassBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
</Application>
</Application>

View File

@@ -1,30 +1,7 @@
[[settings]]
name = "volume"
default = ""
help = "volume=<integer> Set the startup volume. 0 means silence, 100 means no volume reduction or amplification. Negative values can be passed for compatibility, but are treated as 0. Since mpv 0.18.1, this always controls the internal mixer (aka \"softvol\")."
[[settings]]
name = "screen"
default = ""
help = "screen=<default|0-32> In multi-monitor configurations (i.e. a single desktop that spans across multiple displays), this option tells mpv which screen to display the video on. Default: default."
[[settings]]
name = "osd-playing-msg"
default = ""
width = 300
help = "osd-playing-msg=<value> Show a message on OSD when playback starts. The string is expanded for properties, e.g. --osd-playing-msg='file: ${filename}' will show the message file: followed by a space and the currently played filename."
helpurl = "https://mpv.io/manual/master/#property-expansion"
[[settings]]
name = "fullscreen"
alias = "fs"
default = "no"
help = "fullscreen=<yes|no>, fs=<yes|no> Start the player in fullscreen mode. Default: no."
options = [{ name = "yes" }, { name = "no", text = "no (Default)" }]
[[settings]]
name = "hwdec"
default = "no"
filter = "Video"
helpurl = "https://mpv.io/manual/master/#options-hwdec"
help = "hwdec=<mode> Specify the hardware video decoding API that should be used if possible. Whether hardware decoding is actually done depends on the video codec. If hardware decoding is not possible, mpv will fall back on software decoding."
options = [{ name = "no", text = "no (Default)", help = "always use software decoding (Default)" },
@@ -45,44 +22,108 @@ options = [{ name = "no", text = "no (Default)", help = "always use software dec
[[settings]]
name = "vo"
default = "gpu"
filter = "Video"
helpurl = "https://mpv.io/manual/master/#video-output-drivers-vo"
help = "gpu=<mode> Video output drivers to be used. Default = gpu."
options = [{ name = "direct3d", help = "Video output driver that uses the Direct3D interface" },
{ name = "gpu", text = "gpu (Default)", help = "General purpose, customizable, GPU-accelerated video output driver. It supports extended scaling methods, dithering, color management, custom shaders, HDR, and more. (Default)" }]
options = [{ name = "gpu", text = "gpu (Default)", help = "General purpose, customizable, GPU-accelerated video output driver. It supports extended scaling methods, dithering, color management, custom shaders, HDR, and more. (Default)" },
{ name = "direct3d", help = "Video output driver that uses the Direct3D interface" }]
[[settings]]
name = "volume"
default = ""
filter = "Audio"
help = "volume=<integer> Set the startup volume. 0 means silence, 100 means no volume reduction or amplification. Negative values can be passed for compatibility, but are treated as 0. Since mpv 0.18.1, this always controls the internal mixer (aka \"softvol\")."
[[settings]]
name = "slang"
default = ""
filter = "Subtitles"
help = "--slang=<languagecode[,languagecode,...]> Specify a priority list of subtitle languages to use. Different container formats employ different language codes. DVDs use ISO 639-1 two letter language codes, Matroska uses ISO 639-2 three letter language codes while OGM uses a free-form identifier. See also --sid."
[[settings]]
name = "screen"
default = ""
filter = "Screen"
help = "screen=<default|0-32> In multi-monitor configurations (i.e. a single desktop that spans across multiple displays), this option tells mpv which screen to display the video on. Default: default."
[[settings]]
name = "osd-playing-msg"
default = ""
width = 300
filter = "Screen"
helpurl = "https://mpv.io/manual/master/#property-expansion"
help = "osd-playing-msg=<value> Show a message on OSD when playback starts. The string is expanded for properties, e.g. --osd-playing-msg='file: ${filename}' will show the message file: followed by a space and the currently played filename."
[[settings]]
name = "fullscreen"
alias = "fs"
default = "no"
filter = "Screen"
help = "fullscreen=<yes|no>, fs=<yes|no> Start the player in fullscreen mode. Default: no."
options = [{ name = "yes" }, { name = "no", text = "no (Default)" }]
[[settings]]
name = "keep-open-pause"
default = "yes"
filter = "Playback"
help = "keep-open-pause=<yes|no> If set to no, instead of pausing when --keep-open is active, just stop at end of file and continue playing forward when you seek backwards until end where it stops again. Default: yes."
options = [{ name = "yes", text = "yes (Default)" }, { name = "no" }]
[[settings]]
name = "keep-open"
default = "no"
filter = "Playback"
help = "keep-open=<yes|no|always> Do not terminate when playing or seeking beyond the end of the file, and there is not next file to be played (and --loop is not used). Instead, pause the player. When trying to seek beyond end of the file, the player will attempt to seek to the last frame.\n\nNormally, this will act like set pause yes on EOF, unless the --keep-open-pause=no option is set."
options = [{ name = "no", text = "no (Default)", help = "If the current file ends, go to the next file or terminate. (Default.)" },
{ name = "yes", help = "Don't terminate if the current file is the last playlist entry. Equivalent to --keep-open without arguments."},
options = [{ name = "yes", help = "Don't terminate if the current file is the last playlist entry. Equivalent to --keep-open without arguments."},
{ name = "no", text = "no (Default)", help = "If the current file ends, go to the next file or terminate. (Default.)" },
{ name = "always", help = "Like yes, but also applies to files before the last playlist entry. This means playback will never automatically advance to the next file."}]
[[settings]]
name = "loop-file"
alias = "loop"
default = ""
filter = "Playback"
help = "loop-file=<N|inf|no>, loop=<N|inf|no> Loop a single file N times. inf means forever, no means normal playback. For compatibility, --loop-file and --loop-file=yes are also accepted, and are the same as --loop-file=inf.\n\nThe difference to --loop-playlist is that this doesn't loop the playlist, just the file itself. If the playlist contains only a single file, the difference between the two option is that this option performs a seek on loop, instead of reloading the file.\n\n--loop is an alias for this option."
[[settings]]
name = "save-position-on-quit"
default = "no"
filter = "Playback"
help = "Always save the current playback position on quit. When this file is played again later, the player will seek to the old playback position on start. This does not happen if playback of a file is stopped in any other way than quitting. For example, going to the next file in the playlist will not save the position, and start playback at beginning the next time the file is played.\n\nThis behavior is disabled by default, but is always available when quitting the player with Shift+Q."
options = [{ name = "yes" }, { name = "no", text = "no (Default)" }]
[[settings]]
name = "screenshot-directory"
default = ""
width = 500
folder = true
filter = "Screen"
help = "screenshot-directory=<value> Store screenshots in this directory. This path is joined with the filename generated by --screenshot-template. If the template filename is already absolute, the directory is ignored.\n\nIf the directory does not exist, it is created on the first screenshot. If it is not a directory, an error is generated when trying to write a screenshot.\n\nThis option is not set by default, and thus will write screenshots to the directory from which mpv was started. In pseudo-gui mode (see PSEUDO GUI MODE), this is set to the desktop."
[[settings]]
name = "input-ar-delay"
default = ""
filter = "Input"
help = "input-ar-delay=<integer> Delay in milliseconds before we start to autorepeat a key (0 to disable)."
[[settings]]
name = "input-ar-rate"
default = ""
help = "input-ar-rate=<integer> Number of key presses to generate per second on autorepeat."
filter = "Input"
help = "input-ar-rate=<integer> Number of key presses to generate per second on autorepeat."
[[settings]]
name = "alang"
default = ""
filter = "Audio"
help = "alang=<languagecode[,languagecode,...]> Specify a priority list of audio languages to use. Different container formats employ different language codes. DVDs use ISO 639-1 two-letter language codes, Matroska, MPEG-TS and NUT use ISO 639-2 three-letter language codes, while OGM uses a free-form identifier. See also --aid.\n\nExamples\n\nmpv dvd://1 --alang=hu,en chooses the Hungarian language track on a DVD and falls back on English if Hungarian is not available.\n\nmpv --alang=jpn example.mkv plays a Matroska file with Japanese audio."
[[settings]]
name = "hr-seek"
default = "absolute"
filter = "Playback"
help = "hr-seek=<no|absolute|yes> Select when to use precise seeks that are not limited to keyframes. Such seeks require decoding video from the previous keyframe up to the target position and so can take some time depending on decoding performance. For some video formats, precise seeks are disabled. This option selects the default choice to use for seeks; it is possible to explicitly override that default in the definition of key bindings and in input commands."
options = [{ name = "yes", help = "Use precise seeks whenever possible." },
{ name = "no", help = "Never use precise seeks." },
{ name = "absolute", text = "absolute (Default)", help = "Use precise seeks if the seek is to an absolute position in the file, such as a chapter seek, but not for relative seeks like the default behavior of arrow keys (default)." },
{ name = "always", help = "Same as yes (for compatibility)." }]

View File

@@ -0,0 +1,24 @@
using System;
using System.Diagnostics;
using System.Windows.Documents;
using System.Windows.Navigation;
namespace DynamicGUI
{
public class HyperlinkEx : Hyperlink
{
private void HyperLinkEx_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
Process.Start(e.Uri.AbsoluteUri);
}
public void SetURL(string url)
{
if (string.IsNullOrEmpty(url)) return;
NavigateUri = new Uri(url);
RequestNavigate += HyperLinkEx_RequestNavigate;
Inlines.Clear();
Inlines.Add(url);
}
}
}

View File

@@ -46,7 +46,9 @@ namespace DynamicGUI
}
baseSetting.Name = setting["name"];
baseSetting.Filter = setting["filter"];
if (setting.HasKey("help")) baseSetting.Help = setting["help"];
if (setting.HasKey("helpurl")) baseSetting.HelpURL = setting["helpurl"];
if (setting.HasKey("alias")) baseSetting.Alias = setting["alias"];
if (setting.HasKey("width")) baseSetting.Width = setting["width"];
settingsList.Add(baseSetting);
@@ -61,6 +63,7 @@ namespace DynamicGUI
public string Alias { get; set; }
public string Help { get; set; }
public string HelpURL { get; set; }
public string Filter { get; set; }
public int Width { get; set; }
}
@@ -93,8 +96,6 @@ namespace DynamicGUI
set => _Text = value;
}
//private bool _IsChecked;
public bool IsChecked
{
get => OptionSetting.Value == Name ;

View File

@@ -1,7 +1,8 @@
namespace DynamicGUI
{
interface ISearch
interface ISettingControl
{
bool Contains(string searchString);
SettingBase SettingBase { get; }
}
}

View File

@@ -7,8 +7,8 @@
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid Margin="20,0">
<WrapPanel Orientation="Vertical">
<TextBox x:Name="TitleTextBox" FontSize="20" Margin="0,0,0,10" BorderThickness="0" IsReadOnly="True"></TextBox>
<StackPanel>
<TextBox x:Name="TitleTextBox" FontSize="24" Margin="0,10" BorderThickness="0" IsReadOnly="True" Foreground="{x:Static SystemParameters.WindowGlassBrush}"></TextBox>
<ItemsControl x:Name="ItemsControl">
<ItemsControl.ItemTemplate>
<DataTemplate>
@@ -19,7 +19,10 @@
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<TextBox x:Name="HelpTextBox" TextWrapping="WrapWithOverflow" Margin="0,10" BorderThickness="0" IsReadOnly="True" Padding="0"></TextBox>
</WrapPanel>
<TextBox x:Name="HelpTextBox" TextWrapping="WrapWithOverflow" BorderThickness="0" IsReadOnly="True" Margin="0,10,0,0"></TextBox>
<TextBlock x:Name="LinkTextBlock" Margin="0,10">
<local:HyperlinkEx x:Name="Link"></local:HyperlinkEx>
</TextBlock>
</StackPanel>
</Grid>
</UserControl>

View File

@@ -1,9 +1,9 @@
using DynamicGUI;
using System.Windows;
using System.Windows.Controls;
namespace DynamicGUI
{
public partial class OptionSettingControl : UserControl, ISearch
public partial class OptionSettingControl : UserControl, ISettingControl
{
private OptionSetting OptionSetting;
@@ -14,6 +14,10 @@ namespace DynamicGUI
TitleTextBox.Text = optionSetting.Name;
HelpTextBox.Text = optionSetting.Help;
ItemsControl.ItemsSource = optionSetting.Options;
Link.SetURL(optionSetting.HelpURL);
if (string.IsNullOrEmpty(optionSetting.HelpURL))
LinkTextBlock.Visibility = Visibility.Collapsed;
}
private string _SearchableText;
@@ -31,6 +35,7 @@ namespace DynamicGUI
}
}
public SettingBase SettingBase => OptionSetting;
public bool Contains(string searchString) => SearchableText.Contains(searchString.ToLower());
}
}

View File

@@ -8,8 +8,8 @@
d:DesignHeight="450"
d:DesignWidth="800" >
<Grid Margin="20,0">
<WrapPanel Orientation="Vertical">
<TextBox x:Name="TitleTextBox" FontSize="20" Margin="0,0,0,10" BorderThickness="0" IsReadOnly="True"></TextBox>
<StackPanel>
<TextBox x:Name="TitleTextBox" FontSize="24" Margin="0,10" BorderThickness="0" IsReadOnly="True" Foreground="{x:Static SystemParameters.WindowGlassBrush}"></TextBox>
<Grid Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -19,6 +19,9 @@
<Button x:Name="Button" Height="20" Grid.Column="1" Visibility="{Binding Path=Text, ElementName=StringSettingControl1}" Margin="5,0,0,0" Width="20" Click="Button_Click">...</Button>
</Grid>
<TextBox x:Name="HelpTextBox" TextWrapping="WrapWithOverflow" Margin="0,0,0,10" BorderThickness="0" IsReadOnly="True"></TextBox>
</WrapPanel>
<TextBlock x:Name="LinkTextBlock" Margin="0,10">
<local:HyperlinkEx x:Name="Link"></local:HyperlinkEx>
</TextBlock>
</StackPanel>
</Grid>
</UserControl>

View File

@@ -3,7 +3,7 @@ using System.Windows.Controls;
namespace DynamicGUI
{
public partial class StringSettingControl : UserControl, ISearch
public partial class StringSettingControl : UserControl, ISettingControl
{
private StringSetting StringSetting;
@@ -11,7 +11,6 @@ namespace DynamicGUI
{
StringSetting = stringSetting;
InitializeComponent();
TitleTextBox.Text = stringSetting.Name;
HelpTextBox.Text = stringSetting.Help;
ValueTextBox.Text = stringSetting.Value;
@@ -19,6 +18,10 @@ namespace DynamicGUI
ValueTextBox.Width = stringSetting.Width;
if (!StringSetting.IsFolder)
Button.Visibility = Visibility.Hidden;
Link.SetURL(StringSetting.HelpURL);
if (string.IsNullOrEmpty(stringSetting.HelpURL))
LinkTextBlock.Visibility = Visibility.Collapsed;
}
private string _SearchableText;
@@ -33,6 +36,7 @@ namespace DynamicGUI
}
public bool Contains(string searchString) => SearchableText.Contains(searchString.ToLower());
public SettingBase SettingBase => StringSetting;
public string Text
{

View File

@@ -1,22 +1,39 @@
<Window xmlns:DynamicGUI="clr-namespace:DynamicGUI" x:Name="MainWindow1" x:Class="DynamicGUI.MainWindow"
<Window x:Name="MainWindow1" x:Class="mpvSettingsEditor.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:DynamicGUI"
mc:Ignorable="d"
Height="500" Width="800">
Height="500" Width="700" Loaded="MainWindow1_Loaded">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="4*" />
</Grid.RowDefinitions>
<Grid Background="White" Width="300" Margin="0,0,0,10">
<TextBlock Margin="5,2" MinWidth="50" Text="Search..." Foreground="LightSteelBlue" IsHitTestVisible="False" />
<TextBox MinWidth="50" Name="SearchTextBox" Background="Transparent" TextChanged="SearchTextBox_TextChanged" />
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10*" />
<ColumnDefinition Width="60*" />
</Grid.ColumnDefinitions>
<Grid x:Name="SearchGrid" Background="White" Width="300" Margin="0,0,0,10" Grid.ColumnSpan="2">
<TextBlock x:Name="SearchTextBlock" Margin="5,2" Text="Find a setting" Foreground="LightSteelBlue" VerticalAlignment="Center" />
<TextBox Name="SearchTextBox" Padding="1,2,0,0" BorderThickness="2" Background="Transparent" TextChanged="SearchTextBox_TextChanged" Height="25" />
<Button x:Name="SearchClearButton" Background="Transparent" HorizontalAlignment="Right" Margin="2,0,4,0" FontSize="6" Width="16" Height="16" Visibility="Hidden" Click="SearchClearButton_Click"></Button>
</Grid>
<ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="1">
<WrapPanel x:Name="MainWrapPanel"></WrapPanel>
</ScrollViewer>
<ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="1" Grid.Column="1">
<StackPanel x:Name="MainStackPanel"></StackPanel>
</ScrollViewer>
<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.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding}" FontSize="16" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</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="ShowManualTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{x:Static SystemParameters.WindowGlassBrush}" MouseUp="ShowManualTextBlock_MouseUp">Show mpv manual</TextBlock>
</StackPanel>
</Grid>
</Window>

View File

@@ -1,27 +1,32 @@
using System;
using DynamicGUI;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
using DynamicGUI;
using System.Windows.Input;
namespace DynamicGUI
namespace mpvSettingsEditor
{
public partial class MainWindow : Window
{
public string mpvConfPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\mpv\\mpv.conf";
private List<SettingBase> mpvSettings = Settings.LoadSettings("Definitions.toml");
private List<SettingBase> DynamicSettings = Settings.LoadSettings(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\Definitions.toml");
public MainWindow()
{
InitializeComponent();
DataContext = this;
Title = (Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), true)[0] as AssemblyProductAttribute).Product + " " + Assembly.GetExecutingAssembly().GetName().Version.ToString();
foreach (var setting in mpvSettings)
foreach (var setting in DynamicSettings)
{
if (!FilterStrings.Contains(setting.Filter))
FilterStrings.Add(setting.Filter);
foreach (var pair in mpvConf)
{
if (setting.Name == pair.Key || setting.Alias == pair.Key)
@@ -38,10 +43,10 @@ namespace DynamicGUI
switch (setting)
{
case StringSetting s:
MainWrapPanel.Children.Add(new StringSettingControl(s));
MainStackPanel.Children.Add(new StringSettingControl(s));
break;
case OptionSetting s:
MainWrapPanel.Children.Add(new OptionSettingControl(s));
MainStackPanel.Children.Add(new OptionSettingControl(s));
break;
}
}
@@ -67,11 +72,13 @@ namespace DynamicGUI
}
}
public ObservableCollection<string> FilterStrings { get; } = new ObservableCollection<string>();
protected override void OnClosed(EventArgs e)
{
base.OnClosed(e);
foreach (var mpvSetting in mpvSettings)
foreach (var mpvSetting in DynamicSettings)
{
switch (mpvSetting)
{
@@ -95,7 +102,7 @@ namespace DynamicGUI
List<string> lines = File.ReadAllLines(mpvConfPath).ToList();
foreach (var mpvSetting in mpvSettings)
foreach (var mpvSetting in DynamicSettings)
{
foreach (var line in lines.ToArray())
{
@@ -128,7 +135,7 @@ namespace DynamicGUI
lines.Add(pair.Key + " = " + pair.Value);
}
foreach (var mpvSetting in mpvSettings)
foreach (var mpvSetting in DynamicSettings)
{
foreach (var line in lines.ToArray())
{
@@ -140,18 +147,72 @@ namespace DynamicGUI
}
File.WriteAllText(mpvConfPath, String.Join(Environment.NewLine, lines));
MessageBox.Show("If running, restart mpv/mpv.net", Title, MessageBoxButton.OK, MessageBoxImage.Information);
foreach (Process process in Process.GetProcesses())
if (process.ProcessName == "mpv.net")
MessageBox.Show("Restart mpv.net in order to apply changed settings.", Title, MessageBoxButton.OK, MessageBoxImage.Information);
else if (process.ProcessName == "mpv")
MessageBox.Show("Restart mpv in order to apply changed settings.", Title, MessageBoxButton.OK, MessageBoxImage.Information);
}
private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e)
{
for (int i = MainWrapPanel.Children.Count - 1; i >= 0; i--)
SearchTextBlock.Text = SearchTextBox.Text == "" ? "Find a setting" : "";
if (SearchTextBox.Text == "")
SearchClearButton.Visibility = Visibility.Hidden;
else
SearchClearButton.Visibility = Visibility.Visible;
string activeFilter = "";
foreach (var i in FilterStrings)
if (SearchTextBox.Text == i + ":")
activeFilter = i;
if (activeFilter == "")
{
if ((MainWrapPanel.Children[i] as ISearch).Contains(SearchTextBox.Text))
MainWrapPanel.Children[i].Visibility = Visibility.Visible;
else
MainWrapPanel.Children[i].Visibility = Visibility.Collapsed;
foreach (UIElement i in MainStackPanel.Children)
if ((i as ISettingControl).Contains(SearchTextBox.Text))
i.Visibility = Visibility.Visible;
else
i.Visibility = Visibility.Collapsed;
FilterListBox.SelectedItem = null;
}
else
foreach (UIElement i in MainStackPanel.Children)
if ((i as ISettingControl).SettingBase.Filter == activeFilter)
i.Visibility = Visibility.Visible;
else
i.Visibility = Visibility.Collapsed;
}
private void MainWindow1_Loaded(object sender, RoutedEventArgs e)
{
Keyboard.Focus(SearchTextBox);
}
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (e.AddedItems.Count > 0)
SearchTextBox.Text = e.AddedItems[0].ToString() + ":";
}
private void SearchClearButton_Click(object sender, RoutedEventArgs e)
{
SearchTextBox.Text = "";
Keyboard.Focus(SearchTextBox);
}
private void OpenSettingsTextBlock_MouseUp(object sender, MouseButtonEventArgs e)
{
Process.Start(Path.GetDirectoryName(mpvConfPath));
}
private void ShowManualTextBlock_MouseUp(object sender, MouseButtonEventArgs e)
{
Process.Start("https://mpv.io/manual/master/");
}
}
}

View File

@@ -7,11 +7,11 @@ using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("mpv settings editor")]
[assembly: AssemblyTitle("mpv(.net) settings editor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("mpv settings editor")]
[assembly: AssemblyProduct("mpv(.net) settings editor")]
[assembly: AssemblyCopyright("Copyright © stax76")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -51,5 +51,5 @@ using System.Windows;
// 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("0.1.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

BIN
mpvSettingsEditor/mpv.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

View File

@@ -41,6 +41,9 @@
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>mpv.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
@@ -63,6 +66,7 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="DynamicGUI\Controls.cs" />
<Compile Include="DynamicGUI\DynamicGUI.cs" />
<Compile Include="DynamicGUI\OptionSettingControl.xaml.cs">
<DependentUpon>OptionSettingControl.xaml</DependentUpon>
@@ -124,5 +128,8 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Resource Include="mpv.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>