This commit is contained in:
Frank Skare
2021-06-20 16:01:04 +02:00
parent 3b6e6167b0
commit 6634ef094c
6 changed files with 51 additions and 4 deletions

View File

@@ -12,6 +12,8 @@ namespace mpvnet
{
public static class App
{
public static event Action ShowCommandPalette;
public static List<string> TempFiles { get; } = new List<string>();
public static string ConfPath { get => Core.ConfigFolder + "mpvnet.conf"; }

View File

@@ -33,7 +33,7 @@ namespace mpvnet
case "shell-execute": ProcessHelp.ShellExecute(args[0]); break;
case "show-about": ShowDialog(typeof(AboutWindow)); break;
case "show-audio-devices": ShowTextWithEditor("audio-device-list", Core.get_property_osd_string("audio-device-list")); break;
case "show-command-palette": ShowDialog(typeof(CommandPaletteWindow)); break;
case "show-command-palette": ShowCommandPalette(); break;
case "show-commands": ShowCommands(); break;
case "show-conf-editor": ShowDialog(typeof(ConfWindow)); break;
case "show-decoders": ShowTextWithEditor("decoder-list", mpvHelp.GetDecoders()); break;

View File

@@ -0,0 +1,12 @@
<UserControl x:Class="mpvnet.WPF.CommandPaletteControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:mpvnet.WPF"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
</Grid>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace mpvnet.WPF
{
/// <summary>
/// Interaction logic for CommandPaletteControl.xaml
/// </summary>
public partial class CommandPaletteControl : UserControl
{
public CommandPaletteControl()
{
InitializeComponent();
}
}
}

View File

@@ -25,9 +25,7 @@ namespace mpvnet
ListView.ItemsSource = CollectionView;
}
public Theme Theme {
get => Theme.Current;
}
public Theme Theme => Theme.Current;
bool Filter(CommandItem item)
{

View File

@@ -86,6 +86,10 @@
</None>
<None Include="Resources\mpvnet-santa.png" />
<Content Include="Resources\theme.txt" />
<Page Include="WPF\CommandPaletteControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="WPF\SearchTextBoxUserControl.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -120,6 +124,9 @@
<Compile Include="Misc\Theme.cs" />
<Compile Include="Misc\PowerShell.cs" />
<Compile Include="Native\StockIcon.cs" />
<Compile Include="WPF\CommandPaletteControl.xaml.cs">
<DependentUpon>CommandPaletteControl.xaml</DependentUpon>
</Compile>
<Compile Include="WPF\SearchTextBoxUserControl.xaml.cs">
<DependentUpon>SearchTextBoxUserControl.xaml</DependentUpon>
</Compile>