diff --git a/CSScriptAddon/CSScriptAddon.vb b/CSScriptAddon/CSScriptAddon.vb index 306c25b..2edeabd 100644 --- a/CSScriptAddon/CSScriptAddon.vb +++ b/CSScriptAddon/CSScriptAddon.vb @@ -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 diff --git a/README.md b/README.md index 50bac08..a4660cf 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,10 @@ Please note that PowerShell don't allow assigning to events and mpv.net uses as ### 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 diff --git a/mpv.net/Addon.cs b/mpv.net/Addon.cs index 55231d8..e6963be 100644 --- a/mpv.net/Addon.cs +++ b/mpv.net/Addon.cs @@ -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); } } } diff --git a/mpv.net/Command.cs b/mpv.net/Command.cs index d89b8b5..a00493a 100644 --- a/mpv.net/Command.cs +++ b/mpv.net/Command.cs @@ -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, ""); } diff --git a/mpv.net/MainForm.cs b/mpv.net/MainForm.cs index 17a332b..400de23 100644 --- a/mpv.net/MainForm.cs +++ b/mpv.net/MainForm.cs @@ -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() diff --git a/mpv.net/Misc.cs b/mpv.net/Misc.cs index 1aae737..fa5a7e2 100644 --- a/mpv.net/Misc.cs +++ b/mpv.net/Misc.cs @@ -27,24 +27,6 @@ namespace mpvnet int IComparer.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; diff --git a/mpv.net/PowerShellScript.cs b/mpv.net/PowerShellScript.cs index ddd935c..b8c29da 100644 --- a/mpv.net/PowerShellScript.cs +++ b/mpv.net/PowerShellScript.cs @@ -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); } } } diff --git a/mpv.net/PythonScript.cs b/mpv.net/PythonScript.cs index 54c14e2..8fa633f 100644 --- a/mpv.net/PythonScript.cs +++ b/mpv.net/PythonScript.cs @@ -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); } } } diff --git a/mpv.net/StringExtensions.cs b/mpv.net/StringExtensions.cs deleted file mode 100644 index 6be087c..0000000 --- a/mpv.net/StringExtensions.cs +++ /dev/null @@ -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); - } -} \ No newline at end of file diff --git a/mpv.net/mp.cs b/mpv.net/mp.cs index 6782f74..def4ae4 100644 --- a/mpv.net/mp.cs +++ b/mpv.net/mp.cs @@ -13,7 +13,6 @@ using System.Windows.Forms; using static mpvnet.libmpv; using static mpvnet.Native; -using static mpvnet.StaticUsing; using PyRT = IronPython.Runtime; @@ -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 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); diff --git a/mpv.net/mpv.net.csproj b/mpv.net/mpv.net.csproj index 5fb3fcb..826fa09 100644 --- a/mpv.net/mpv.net.csproj +++ b/mpv.net/mpv.net.csproj @@ -143,7 +143,6 @@ - Form diff --git a/mpvSettingsEditor/App.xaml b/mpvSettingsEditor/App.xaml index 6a20adb..9c27736 100644 --- a/mpvSettingsEditor/App.xaml +++ b/mpvSettingsEditor/App.xaml @@ -4,6 +4,9 @@ xmlns:local="clr-namespace:DynamicGUI" StartupUri="MainWindow.xaml"> - + - + \ No newline at end of file diff --git a/mpvSettingsEditor/Definitions.toml b/mpvSettingsEditor/Definitions.toml index b378de6..585a1d7 100644 --- a/mpvSettingsEditor/Definitions.toml +++ b/mpvSettingsEditor/Definitions.toml @@ -12,8 +12,8 @@ help = "screen= In multi-monitor configurations (i.e. a single des name = "osd-playing-msg" default = "" width = 300 -help = "osd-playing-msg= 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" +help = "osd-playing-msg= 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" @@ -47,8 +47,8 @@ name = "vo" default = "gpu" helpurl = "https://mpv.io/manual/master/#video-output-drivers-vo" help = "gpu= 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 = "keep-open-pause" @@ -60,8 +60,8 @@ options = [{ name = "yes", text = "yes (Default)" }, { name = "no" }] name = "keep-open" default = "no" help = "keep-open= 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]] @@ -70,6 +70,12 @@ alias = "loop" default = "" help = "loop-file=, loop= 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" +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 = "" @@ -85,4 +91,23 @@ help = "input-ar-delay= Delay in milliseconds before we start to autore [[settings]] name = "input-ar-rate" default = "" -help = "input-ar-rate= Number of key presses to generate per second on autorepeat." \ No newline at end of file +help = "input-ar-rate= Number of key presses to generate per second on autorepeat." + +[[settings]] +name = "alang" +default = "" +help = "alang= 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 = "slang" +default = "" +help = "--slang= 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 = "hr-seek" +default = "absolute" +help = "hr-seek= 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)." }] \ No newline at end of file diff --git a/mpvSettingsEditor/DynamicGUI/Controls.cs b/mpvSettingsEditor/DynamicGUI/Controls.cs new file mode 100644 index 0000000..d45bb4b --- /dev/null +++ b/mpvSettingsEditor/DynamicGUI/Controls.cs @@ -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); + } + } +} \ No newline at end of file diff --git a/mpvSettingsEditor/DynamicGUI/DynamicGUI.cs b/mpvSettingsEditor/DynamicGUI/DynamicGUI.cs index 50ed9d6..037d363 100644 --- a/mpvSettingsEditor/DynamicGUI/DynamicGUI.cs +++ b/mpvSettingsEditor/DynamicGUI/DynamicGUI.cs @@ -47,6 +47,7 @@ namespace DynamicGUI baseSetting.Name = setting["name"]; 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); @@ -93,8 +94,6 @@ namespace DynamicGUI set => _Text = value; } - //private bool _IsChecked; - public bool IsChecked { get => OptionSetting.Value == Name ; diff --git a/mpvSettingsEditor/DynamicGUI/OptionSettingControl.xaml b/mpvSettingsEditor/DynamicGUI/OptionSettingControl.xaml index 283100b..d494897 100644 --- a/mpvSettingsEditor/DynamicGUI/OptionSettingControl.xaml +++ b/mpvSettingsEditor/DynamicGUI/OptionSettingControl.xaml @@ -8,7 +8,7 @@ d:DesignHeight="450" d:DesignWidth="800"> - + @@ -19,7 +19,10 @@ - + + + + \ No newline at end of file diff --git a/mpvSettingsEditor/DynamicGUI/OptionSettingControl.xaml.cs b/mpvSettingsEditor/DynamicGUI/OptionSettingControl.xaml.cs index b64375f..9746e44 100644 --- a/mpvSettingsEditor/DynamicGUI/OptionSettingControl.xaml.cs +++ b/mpvSettingsEditor/DynamicGUI/OptionSettingControl.xaml.cs @@ -1,5 +1,4 @@ -using DynamicGUI; -using System.Windows.Controls; +using System.Windows.Controls; namespace DynamicGUI { @@ -14,6 +13,7 @@ namespace DynamicGUI TitleTextBox.Text = optionSetting.Name; HelpTextBox.Text = optionSetting.Help; ItemsControl.ItemsSource = optionSetting.Options; + Link.SetURL(optionSetting.HelpURL); } private string _SearchableText; diff --git a/mpvSettingsEditor/DynamicGUI/StringSettingControl.xaml b/mpvSettingsEditor/DynamicGUI/StringSettingControl.xaml index f5d5288..e61fc1a 100644 --- a/mpvSettingsEditor/DynamicGUI/StringSettingControl.xaml +++ b/mpvSettingsEditor/DynamicGUI/StringSettingControl.xaml @@ -9,7 +9,7 @@ d:DesignWidth="800" > - + diff --git a/mpvSettingsEditor/MainWindow.xaml b/mpvSettingsEditor/MainWindow.xaml index 8172b0d..b48a34b 100644 --- a/mpvSettingsEditor/MainWindow.xaml +++ b/mpvSettingsEditor/MainWindow.xaml @@ -1,17 +1,17 @@ - + Height="500" Width="800" Loaded="MainWindow1_Loaded"> - + diff --git a/mpvSettingsEditor/MainWindow.xaml.cs b/mpvSettingsEditor/MainWindow.xaml.cs index 02c949c..c159130 100644 --- a/mpvSettingsEditor/MainWindow.xaml.cs +++ b/mpvSettingsEditor/MainWindow.xaml.cs @@ -1,4 +1,5 @@ -using System; +using DynamicGUI; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -6,20 +7,20 @@ 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 mpvSettings = Settings.LoadSettings("Definitions.toml"); + private List mpvSettings = Settings.LoadSettings(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\Definitions.toml"); public MainWindow() { InitializeComponent(); Title = (Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), true)[0] as AssemblyProductAttribute).Product + " " + Assembly.GetExecutingAssembly().GetName().Version.ToString(); - + foreach (var setting in mpvSettings) { foreach (var pair in mpvConf) @@ -153,5 +154,10 @@ namespace DynamicGUI MainWrapPanel.Children[i].Visibility = Visibility.Collapsed; } } + + private void MainWindow1_Loaded(object sender, RoutedEventArgs e) + { + FocusManager.SetFocusedElement(SearchGrid, SearchTextBox); + } } } \ No newline at end of file diff --git a/mpvSettingsEditor/Properties/AssemblyInfo.cs b/mpvSettingsEditor/Properties/AssemblyInfo.cs index cd1b98e..4c735d9 100644 --- a/mpvSettingsEditor/Properties/AssemblyInfo.cs +++ b/mpvSettingsEditor/Properties/AssemblyInfo.cs @@ -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("0.2.0.0")] +[assembly: AssemblyFileVersion("0.2.0.0")] diff --git a/mpvSettingsEditor/mpvSettingsEditor.csproj b/mpvSettingsEditor/mpvSettingsEditor.csproj index 08af692..0ab272d 100644 --- a/mpvSettingsEditor/mpvSettingsEditor.csproj +++ b/mpvSettingsEditor/mpvSettingsEditor.csproj @@ -63,6 +63,7 @@ MSBuild:Compile Designer + OptionSettingControl.xaml